@@ -67,8 +67,8 @@ export class TachoMotor extends BasicMotor {
67
67
* @method TachoMotor#setAccelerationTime
68
68
* @param {number } time How long acceleration should last (in milliseconds).
69
69
* @param {number } profile 0 by default
70
- * @param {boolean } interrupt If true, previous commands are discarded.
71
- * @returns {Promise<CommandFeedback> } Resolved upon completion of command (ie . once the motor is finished).
70
+ * @param {boolean } [ interrupt=false] If true, previous commands are discarded.
71
+ * @returns {Promise<CommandFeedback> } Resolved upon completion of command (i.e . once the motor is finished).
72
72
*/
73
73
public setAccelerationTime ( time : number , profile : number = 0x00 , interrupt : boolean = false ) {
74
74
const message = Buffer . from ( [ 0x05 , 0x00 , 0x00 , profile ] ) ;
@@ -82,8 +82,8 @@ export class TachoMotor extends BasicMotor {
82
82
* @method TachoMotor#setDecelerationTime
83
83
* @param {number } time How long deceleration should last (in milliseconds).
84
84
* @param {number } profile 0 by default
85
- * @param {boolean } interrupt If true, previous commands are discarded.
86
- * @returns {Promise<CommandFeedback> } Resolved upon completion of command (ie . once the motor is finished).
85
+ * @param {boolean } [ interrupt=false] If true, previous commands are discarded.
86
+ * @returns {Promise<CommandFeedback> } Resolved upon completion of command (i.e . once the motor is finished).
87
87
*/
88
88
public setDecelerationTime ( time : number , profile : number = 0x00 , interrupt : boolean = true ) {
89
89
const message = Buffer . from ( [ 0x06 , 0x00 , 0x00 , profile ] ) ;
@@ -97,8 +97,8 @@ export class TachoMotor extends BasicMotor {
97
97
* @method TachoMotor#setSpeed
98
98
* @param {number } speed For forward, a value between 1 - 100 should be set. For reverse, a value between -1 to -100. Stop is 0.
99
99
* @param {number } time How long the motor should run for (in milliseconds).
100
- * @param {boolean } interrupt If true, previous commands are discarded.
101
- * @returns {Promise<CommandFeedback> } Resolved upon completion of command (ie . once the motor is finished).
100
+ * @param {boolean } [ interrupt=false] If true, previous commands are discarded.
101
+ * @returns {Promise<CommandFeedback> } Resolved upon completion of command (i.e . once the motor is finished).
102
102
*/
103
103
public setSpeed ( speed : [ number , number ] | number , time : number | undefined , interrupt : boolean = false ) {
104
104
if ( ! this . isVirtualPort && speed instanceof Array ) {
@@ -133,8 +133,8 @@ export class TachoMotor extends BasicMotor {
133
133
* @method TachoMotor#rotateByDegrees
134
134
* @param {number } degrees How much the motor should be rotated (in degrees).
135
135
* @param {number } [speed=100] For forward, a value between 1 - 100 should be set. For reverse, a value between -1 to -100.
136
- * @param {boolean } interrupt If true, previous commands are discarded.
137
- * @returns {Promise<CommandFeedback> } Resolved upon completion of command (ie . once the motor is finished).
136
+ * @param {boolean } [ interrupt=false] If true, previous commands are discarded.
137
+ * @returns {Promise<CommandFeedback> } Resolved upon completion of command (i.e . once the motor is finished).
138
138
*/
139
139
public rotateByDegrees ( degrees : number , speed : [ number , number ] | number , interrupt : boolean = false ) {
140
140
if ( ! this . isVirtualPort && speed instanceof Array ) {
0 commit comments