diff --git a/src/devices/absolutemotor.ts b/src/devices/absolutemotor.ts index b46651c..eb19e56 100644 --- a/src/devices/absolutemotor.ts +++ b/src/devices/absolutemotor.ts @@ -40,8 +40,8 @@ export class AbsoluteMotor extends TachoMotor { * @method AbsoluteMotor#gotoAngle * @param {number} angle Absolute position the motor should go to (degrees from 0). * @param {number} [speed=100] For forward, a value between 1 - 100 should be set. For reverse, a value between -1 to -100. - * @param {boolean} interrupt If true, previous commands are discarded. - * @returns {Promise} Resolved upon completion of command (ie. once the motor is finished). + * @param {boolean} [interrupt=false] If true, previous commands are discarded. + * @returns {Promise} Resolved upon completion of command (i.e. once the motor is finished). */ public gotoAngle (angle: [number, number] | number, speed: number = 100, interrupt: boolean = false) { if (!this.isVirtualPort && angle instanceof Array) { @@ -72,7 +72,7 @@ export class AbsoluteMotor extends TachoMotor { * Real zero is marked on Technic angular motors (SPIKE Prime). It is also available on Technic linear motors (Control+) but is unmarked. * @method AbsoluteMotor#gotoRealZero * @param {number} [speed=100] Speed between 1 - 100. Note that this will always take the shortest path to zero. - * @returns {Promise} Resolved upon completion of command (ie. once the motor is finished). + * @returns {Promise} Resolved upon completion of command (i.e. once the motor is finished). */ public gotoRealZero (speed: number = 100) { return new Promise((resolve) => { @@ -101,8 +101,8 @@ export class AbsoluteMotor extends TachoMotor { /** * Reset zero to current position * @method AbsoluteMotor#resetZero - * @param {boolean} interrupt If true, previous commands are discarded. - * @returns {Promise} Resolved upon completion of command (ie. once the motor is finished). + * @param {boolean} [interrupt=false] If true, previous commands are discarded. + * @returns {Promise} Resolved upon completion of command (i.e. once the motor is finished). */ public resetZero (interrupt: boolean = false) { const data = Buffer.from([0x51, 0x02, 0x00, 0x00, 0x00, 0x00]); diff --git a/src/devices/basicmotor.ts b/src/devices/basicmotor.ts index 3041fd4..ff6d8d2 100644 --- a/src/devices/basicmotor.ts +++ b/src/devices/basicmotor.ts @@ -19,7 +19,7 @@ export class BasicMotor extends Device { * Set the motor power. * @method BasicMotor#setPower * @param {number} power For forward, a value between 1 - 100 should be set. For reverse, a value between -1 to -100. Stop is 0. - * @param {boolean} interrupt If true, previous commands are discarded. + * @param {boolean} [interrupt=false] If true, previous commands are discarded. * @returns {Promise} Resolved upon completion of command. */ public setPower (power: number, interrupt: boolean = false) { diff --git a/src/devices/light.ts b/src/devices/light.ts index b40abf0..33526ab 100644 --- a/src/devices/light.ts +++ b/src/devices/light.ts @@ -20,7 +20,7 @@ export class Light extends Device { * @method Light#setBrightness * @param {number} brightness Brightness value between 0-100 (0 is off) * @param {number} brightness Brightness value between 0-100 (0 is off) - * @param {boolean} interrupt If true, previous commands are discarded. + * @param {boolean} [interrupt=false] If true, previous commands are discarded. * @returns {Promise} Resolved upon completion of command. */ public setBrightness (brightness: number, interrupt: boolean = false) { diff --git a/src/devices/piezobuzzer.ts b/src/devices/piezobuzzer.ts index 5a3f8fa..8de1e05 100644 --- a/src/devices/piezobuzzer.ts +++ b/src/devices/piezobuzzer.ts @@ -21,7 +21,7 @@ export class PiezoBuzzer extends Device { * @method PiezoBuzzer#playTone * @param {number} frequency * @param {number} time How long the tone should play for (in milliseconds). - * @returns {Promise} Resolved upon completion of command (ie. once the tone has finished playing). + * @returns {Promise} Resolved upon completion of command (i.e. once the tone has finished playing). */ public playTone (frequency: number, time: number) { return new Promise((resolve) => { diff --git a/src/devices/tachomotor.ts b/src/devices/tachomotor.ts index 233e6a1..0e7df86 100644 --- a/src/devices/tachomotor.ts +++ b/src/devices/tachomotor.ts @@ -67,8 +67,8 @@ export class TachoMotor extends BasicMotor { * @method TachoMotor#setAccelerationTime * @param {number} time How long acceleration should last (in milliseconds). * @param {number} profile 0 by default - * @param {boolean} interrupt If true, previous commands are discarded. - * @returns {Promise} Resolved upon completion of command (ie. once the motor is finished). + * @param {boolean} [interrupt=false] If true, previous commands are discarded. + * @returns {Promise} Resolved upon completion of command (i.e. once the motor is finished). */ public setAccelerationTime (time: number, profile: number = 0x00, interrupt: boolean = false) { const message = Buffer.from([0x05, 0x00, 0x00, profile]); @@ -82,8 +82,8 @@ export class TachoMotor extends BasicMotor { * @method TachoMotor#setDecelerationTime * @param {number} time How long deceleration should last (in milliseconds). * @param {number} profile 0 by default - * @param {boolean} interrupt If true, previous commands are discarded. - * @returns {Promise} Resolved upon completion of command (ie. once the motor is finished). + * @param {boolean} [interrupt=false] If true, previous commands are discarded. + * @returns {Promise} Resolved upon completion of command (i.e. once the motor is finished). */ public setDecelerationTime (time: number, profile: number = 0x00, interrupt: boolean = true) { const message = Buffer.from([0x06, 0x00, 0x00, profile]); @@ -97,8 +97,8 @@ export class TachoMotor extends BasicMotor { * @method TachoMotor#setSpeed * @param {number} speed For forward, a value between 1 - 100 should be set. For reverse, a value between -1 to -100. Stop is 0. * @param {number} time How long the motor should run for (in milliseconds). - * @param {boolean} interrupt If true, previous commands are discarded. - * @returns {Promise} Resolved upon completion of command (ie. once the motor is finished). + * @param {boolean} [interrupt=false] If true, previous commands are discarded. + * @returns {Promise} Resolved upon completion of command (i.e. once the motor is finished). */ public setSpeed (speed: [number, number] | number, time: number | undefined, interrupt: boolean = false) { if (!this.isVirtualPort && speed instanceof Array) { @@ -133,8 +133,8 @@ export class TachoMotor extends BasicMotor { * @method TachoMotor#rotateByDegrees * @param {number} degrees How much the motor should be rotated (in degrees). * @param {number} [speed=100] For forward, a value between 1 - 100 should be set. For reverse, a value between -1 to -100. - * @param {boolean} interrupt If true, previous commands are discarded. - * @returns {Promise} Resolved upon completion of command (ie. once the motor is finished). + * @param {boolean} [interrupt=false] If true, previous commands are discarded. + * @returns {Promise} Resolved upon completion of command (i.e. once the motor is finished). */ public rotateByDegrees (degrees: number, speed: [number, number] | number, interrupt: boolean = false) { if (!this.isVirtualPort && speed instanceof Array) {