@@ -20,6 +20,9 @@ export interface Motor extends Resource {
20
20
* await motor.setPower(0.4);
21
21
* ```
22
22
*
23
+ * For more information, see [Motor
24
+ * API](https://docs.viam.com/dev/reference/apis/components/motor/#setpower).
25
+ *
23
26
* @param power - A value between -1 and 1 where negative values indicate a
24
27
* backwards direction and positive values a forward direction.
25
28
*/
@@ -39,6 +42,9 @@ export interface Motor extends Resource {
39
42
* await motor.goFor(60, 7.2);
40
43
* ```
41
44
*
45
+ * For more information, see [Motor
46
+ * API](https://docs.viam.com/dev/reference/apis/components/motor/#gofor).
47
+ *
42
48
* @param rpm - Speed in revolutions per minute.
43
49
* @param revolutions - Number of revolutions relative to the motor's starting
44
50
* position. If this value is 0, this will run the motor at the given rpm
@@ -60,6 +66,9 @@ export interface Motor extends Resource {
60
66
* await motor.goTo(75, 8.3);
61
67
* ```
62
68
*
69
+ * For more information, see [Motor
70
+ * API](https://docs.viam.com/dev/reference/apis/components/motor/#goto).
71
+ *
63
72
* @param rpm - Speed in revolutions per minute.
64
73
* @param positionRevolutions - Number of revolutions relative to the motor's
65
74
* home position.
@@ -79,6 +88,9 @@ export interface Motor extends Resource {
79
88
* await motor.setRPM(75);
80
89
* ```
81
90
*
91
+ * For more information, see [Motor
92
+ * API](https://docs.viam.com/dev/reference/apis/components/motor/#setrpm).
93
+ *
82
94
* @param rpm - Speed in revolutions per minute.
83
95
*/
84
96
setRPM ( rpm : number , extra ?: Struct ) : Promise < void > ;
@@ -96,6 +108,9 @@ export interface Motor extends Resource {
96
108
* await motor.resetZeroPosition(0.0);
97
109
* ```
98
110
*
111
+ * For more information, see [Motor
112
+ * API](https://docs.viam.com/dev/reference/apis/components/motor/#resetzeroposition).
113
+ *
99
114
* @param offset - Position from which to offset the current position.
100
115
*/
101
116
resetZeroPosition ( offset : number , extra ?: Struct ) : Promise < void > ;
@@ -111,6 +126,9 @@ export interface Motor extends Resource {
111
126
* // Stop the motor
112
127
* await motor.stop();
113
128
* ```
129
+ *
130
+ * For more information, see [Motor
131
+ * API](https://docs.viam.com/dev/reference/apis/components/motor/#stop).
114
132
*/
115
133
stop ( extra ?: Struct ) : Promise < void > ;
116
134
@@ -127,6 +145,9 @@ export interface Motor extends Resource {
127
145
* const properties = await motor.getProperties();
128
146
* console.log('Properties:', properties);
129
147
* ```
148
+ *
149
+ * For more information, see [Motor
150
+ * API](https://docs.viam.com/dev/reference/apis/components/motor/#getproperties).
130
151
*/
131
152
getProperties ( extra ?: Struct ) : Promise < Properties > ;
132
153
@@ -143,6 +164,9 @@ export interface Motor extends Resource {
143
164
* const position = await motor.getPosition();
144
165
* console.log('Position:', position);
145
166
* ```
167
+ *
168
+ * For more information, see [Motor
169
+ * API](https://docs.viam.com/dev/reference/apis/components/motor/#getposition).
146
170
*/
147
171
getPosition ( extra ?: Struct ) : Promise < number > ;
148
172
@@ -159,6 +183,9 @@ export interface Motor extends Resource {
159
183
* console.log('Powered:', isPowered);
160
184
* console.log('Power percentage:', powerPct);
161
185
* ```
186
+ *
187
+ * For more information, see [Motor
188
+ * API](https://docs.viam.com/dev/reference/apis/components/motor/#ispowered).
162
189
*/
163
190
isPowered ( extra ?: Struct ) : Promise < readonly [ boolean , number ] > ;
164
191
@@ -174,6 +201,9 @@ export interface Motor extends Resource {
174
201
* const moving = await motor.isMoving();
175
202
* console.log('Moving:', moving);
176
203
* ```
204
+ *
205
+ * For more information, see [Motor
206
+ * API](https://docs.viam.com/dev/reference/apis/components/motor/#ismoving).
177
207
*/
178
208
isMoving ( ) : Promise < boolean > ;
179
209
}
0 commit comments