Skip to content

Commit 9c0c5bf

Browse files
committed
Fixes
1 parent 6091789 commit 9c0c5bf

File tree

5 files changed

+34
-49
lines changed

5 files changed

+34
-49
lines changed

lib/src/app/app.dart

+3-1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ class AppClient {
3131
/// Create a new [Organization]
3232
///
3333
/// For more information, see [Fleet Management API](https://docs.viam.com/appendix/apis/fleet/). Future<Organization> createOrganization(String name) async {
34+
Future<Organization> createOrganization(String name) async {
3435
final request = CreateOrganizationRequest()..name = name;
3536
final CreateOrganizationResponse response = await _client.createOrganization(request);
3637
return response.organization;
@@ -74,7 +75,8 @@ class AppClient {
7475

7576
/// Checks for namespace availablity throughout all [Organization]s.
7677
///
77-
/// For more information, see [Fleet Management API](https://docs.viam.com/appendix/apis/fleet/). Future<bool> getOrganizationNamespaceAvailability(String publicNamespace) async {
78+
/// For more information, see [Fleet Management API](https://docs.viam.com/appendix/apis/fleet/).
79+
Future<bool> getOrganizationNamespaceAvailability(String publicNamespace) async {
7880
final request = GetOrganizationNamespaceAvailabilityRequest()..publicNamespace = publicNamespace;
7981
final GetOrganizationNamespaceAvailabilityResponse response = await _client.getOrganizationNamespaceAvailability(request);
8082
return response.available;

lib/src/components/arm/arm.dart

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ abstract class Arm extends Resource {
1111
/// Get the current [Pose] of the end of the arm.
1212
///
1313
/// ```
14-
/// // Get the pose of an arm named "myArm2"
1514
/// final currentPose = await myArm.endPosition();
1615
/// ```
1716
///

lib/src/components/camera/camera.dart

-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ abstract class Camera extends Resource {
2020
/// ```
2121
///
2222
/// For more information, see [Camera component](https://docs.viam.com/components/camera/).
23-
2423
Future<ViamImage> image({MimeType? mimeType, Map<String, dynamic>? extra});
2524

2625
/// Get the next point cloud from the camera.
@@ -30,8 +29,6 @@ abstract class Camera extends Resource {
3029
/// ```
3130
///
3231
/// For more information, see [Camera component](https://docs.viam.com/components/camera/).
33-
///
34-
/// For more information, see [Camera component](https://docs.viam.com/components/camera/).
3532
Future<ViamImage> pointCloud({Map<String, dynamic>? extra});
3633

3734
/// Get the camera's intrinsic parameters and the camera's distortion parameters.

lib/src/components/motor/motor.dart

+22-24
Original file line numberDiff line numberDiff line change
@@ -25,128 +25,126 @@ abstract class Motor extends Resource {
2525
/// Sets the "percentage" of power the [Motor] should employ between -1 and 1.
2626
/// When [powerPct] is negative, the rotation will be in the backward direction.
2727
///
28-
/// For more information, see [Motor component](https://docs.viam.com/components/motor/).
29-
///
3028
/// ```
3129
/// // Set the power to 40% forwards.
3230
/// await myMotor.setPower(0.4);
3331
/// ```
32+
///
33+
/// For more information, see [Motor component](https://docs.viam.com/components/motor/).
3434
Future<void> setPower(double powerPct, {Map<String, dynamic>? extra});
3535

3636
/// Spin the [Motor] the specified number of [revolutions] at specified [rpm].
3737
/// When [rpm] or [revolutions] is a negative value, the rotation will be in the backward direction.
3838
/// Note: if both [rpm] and [revolutions] are negative, the motor will spin in the forward direction.
3939
///
40-
/// For more information, see [Motor component](https://docs.viam.com/components/motor/).
41-
///
4240
/// ```
4341
/// // Turn the motor 7.2 revolutions forward at 60 RPM.
4442
/// await myMotor.goFor(60, 7.2);
4543
/// ```
44+
///
45+
/// For more information, see [Motor component](https://docs.viam.com/components/motor/).
4646
Future<void> goFor(double rpm, double revolutions, {Map<String, dynamic>? extra});
4747

4848
/// Spin the [Motor] to the specified position (provided in revolutions from home/zero),
4949
/// at the specified speed, in revolutions per minute.
5050
/// Regardless of the directionality of the [rpm] this function will move
5151
/// the [Motor] towards the specified position.
5252
///
53-
/// For more information, see [Motor component](https://docs.viam.com/components/motor/).
54-
///
5553
/// ```
5654
/// // Turn the motor to 8.3 revolutions from home at 75 RPM.
5755
/// await myMotor.goTo(75, 8.3);
5856
/// ```
57+
///
58+
/// For more information, see [Motor component](https://docs.viam.com/components/motor/).
5959
Future<void> goTo(double rpm, double positionRevolutions, {Map<String, dynamic>? extra});
6060

6161
/// Spin the [Motor] indefinitely at the specified speed, in revolutions per minute.
6262
/// If [rpm] is positive, the motor will spin forwards, and if [rpm] is negative, the motor will spin backwards.
6363
///
64-
/// For more information, see [Motor component](https://docs.viam.com/components/motor/).
65-
///
6664
/// ```
6765
/// // Set the motor to turn backwards at 120.5 RPM.
6866
/// await myMotor.setRPM(-120.5);
6967
/// ```
68+
///
69+
/// For more information, see [Motor component](https://docs.viam.com/components/motor/).
7070
Future<void> setRPM(double rpm, {Map<String, dynamic>? extra});
7171

7272
/// Set the current position (modified by [offset]) to be the new zero (home) position.
7373
///
74-
/// For more information, see [Motor component](https://docs.viam.com/components/motor/).
75-
///
7674
/// ```
7775
/// // Set the current position as the new home position with no offset.
7876
/// await myMotor.resetZeroPosition(0.0);
7977
/// ```
78+
///
79+
/// For more information, see [Motor component](https://docs.viam.com/components/motor/).
8080
Future<void> resetZeroPosition(double offset, {Map<String, dynamic>? extra});
8181

8282
/// Report the position of the motor based on its encoder.
8383
/// The value returned is the number of revolutions relative to its zero position.
8484
/// This method will raise an exception if position reporting is not supported by the motor.
8585
///
86-
/// For more information, see [Motor component](https://docs.viam.com/components/motor/).
87-
///
8886
/// ```
8987
/// // Get the current position of an encoded motor.
9088
/// var position = await myMotor.position();
9189
/// ```
90+
///
91+
/// For more information, see [Motor component](https://docs.viam.com/components/motor/).
9292
Future<double> position({Map<String, dynamic>? extra});
9393

9494
/// Report a dictionary mapping each optional property to
9595
/// whether it is supported by this motor.
9696
///
97-
/// For more information, see [Motor component](https://docs.viam.com/components/motor/).
98-
///
9997
/// ```
10098
/// // Return whether the motor supports certain optional features
10199
/// var properties = await myMotor.properties();
102100
/// ```
101+
///
102+
/// For more information, see [Motor component](https://docs.viam.com/components/motor/).
103103
Future<MotorProperties> properties({Map<String, dynamic>? extra});
104104

105105
/// Stop the motor immediately, without any gradual step down.
106106
///
107-
/// For more information, see [Motor component](https://docs.viam.com/components/motor/).
108-
Future<void> stop({Map<String, dynamic>? extra});
109-
///
110107
/// ```
111108
/// // Stop the motor.
112109
/// await myMotor.stop();
113110
/// ```
111+
///
112+
/// For more information, see [Motor component](https://docs.viam.com/components/motor/).
114113
Future<void> stop({Map<String, dynamic>? extra});
115114

116115
/// Returns whether or not the motor is currently powered, and the portion
117116
/// of max power (between 0 and 1; 0 indicates that power is off). Stepper
118117
/// motors report `true` if they are being powered while holding a position,
119118
/// as well as when they are turning themselves.
120119
///
121-
/// For more information, see [Motor component](https://docs.viam.com/components/motor/).
122-
///
123120
/// ```
124121
/// // Check whether the motor is currently powered and
125122
/// // check the percentage of max power to the motor.
126123
/// var powerState = await myMotor.powerState();
127124
/// var powered = powerState.isOn;
128125
/// var pct = powerState.powerPct;
129126
/// ```
127+
///
128+
/// For more information, see [Motor component](https://docs.viam.com/components/motor/).
130129
Future<PowerState> powerState({Map<String, dynamic>? extra});
131130

132131
/// Get if the [Motor] is currently moving.
133132
///
134-
/// For more information, see [Motor component](https://docs.viam.com/components/motor/).
135-
///
136133
/// ```
137134
/// // Check whether the motor is moving.
138135
/// var moving = await myMotor.isMoving();
139136
/// ```
140-
Future<bool> isMoving({Map<String, dynamic>? extra});
141-
142-
/// Get the [ResourceName] for this [Motor] with the given [name]
143137
///
144138
/// For more information, see [Motor component](https://docs.viam.com/components/motor/).
139+
Future<bool> isMoving({Map<String, dynamic>? extra});
140+
141+
/// Get the [ResourceName] for this [Motor] with the given [name].
145142
///
146143
/// ```
147144
/// var name = Motor.getResourceName('myMotor');
148145
/// ```
149146
///
147+
/// For more information, see [Motor component](https://docs.viam.com/components/motor/).
150148
Future<bool> isMoving({Map<String, dynamic>? extra});
151149
static ResourceName getResourceName(String name) {
152150
return Motor.subtype.getResourceName(name);

lib/src/components/servo/servo.dart

+9-20
Original file line numberDiff line numberDiff line change
@@ -15,50 +15,39 @@ abstract class Servo extends Resource {
1515

1616
/// Get the current angle (degrees) of the [Servo].
1717
///
18-
/// For more information, see [Servo component](https://docs.viam.com/components/servo/).
19-
///
2018
/// ```
2119
/// var angle = await myServo.position();
2220
/// ```
23-
Future<int> position({Map<String, dynamic>? extra});
24-
25-
/// Stop the [Servo]. It is assumed that the servo stops immediately.
26-
///
27-
/// For more information, see [Servo component](https://docs.viam.com/components/servo/).
28-
///
29-
Future<void> stop({Map<String, dynamic>? extra});
30-
31-
/// Get if the [Servo] is currently moving.
3221
///
3322
/// For more information, see [Servo component](https://docs.viam.com/components/servo/).
34-
Future<bool> isMoving();
23+
Future<int> position({Map<String, dynamic>? extra});
3524

36-
/// Get the [ResourceName] for this [Servo] with the given [name]
37-
///
38-
/// For more information, see [Servo component](https://docs.viam.com/components/servo/).
25+
/// Stop the [Servo]. It is assumed that the servo stops immediately.
3926
///
4027
/// ```
4128
/// await myServo.stop();
4229
/// ```
43-
Future<void> stop({Map<String, dynamic>? extra});
44-
45-
/// Whether the [Servo] is currently moving.
4630
///
4731
/// For more information, see [Servo component](https://docs.viam.com/components/servo/).
32+
Future<void> stop({Map<String, dynamic>? extra});
33+
34+
/// Get if the [Servo] is currently moving.
4835
///
4936
/// ```
5037
/// var isItMoving = await myServo.isMoving();
5138
/// ```
39+
///
40+
/// For more information, see [Servo component](https://docs.viam.com/components/servo/).
5241
Future<bool> isMoving();
5342

5443
/// Get the [ResourceName] for this [Servo] with the given [name].
5544
///
56-
/// For more information, see [Servo component](https://docs.viam.com/components/servo/).
57-
///
5845
/// ```
5946
/// // Example:
6047
/// var name = Servo.getResourceName('myServo');
6148
/// ```
49+
///
50+
/// For more information, see [Servo component](https://docs.viam.com/components/servo/).
6251
static ResourceName getResourceName(String name) {
6352
return Servo.subtype.getResourceName(name);
6453
}

0 commit comments

Comments
 (0)