Update src/devices/colordistancesensor.ts

Co-Authored-By: Michał Szafrański <szafranski@gmail.com>
This commit is contained in:
Nathan Kellenicki 2020-03-25 09:57:25 -07:00 committed by GitHub
parent 3145fec599
commit 97d0c407cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -112,7 +112,7 @@ export class ColorDistanceSensor extends Device {
* @param {number} power -7 (full reverse) to 7 (full forward). 0 is stop. 8 is brake. * @param {number} power -7 (full reverse) to 7 (full forward). 0 is stop. 8 is brake.
* @returns {Promise} Resolved upon successful issuance of the command. * @returns {Promise} Resolved upon successful issuance of the command.
*/ */
public setPFPower (channel: number, output: string, power: number) { public setPFPower (channel: number, output: "RED" | "BLUE", power: number) {
let address = 0; let address = 0;
if (channel > 4) { if (channel > 4) {
channel -= 4; channel -= 4;