Comment out all the power = 0 checks that came over from WeDo.

This commit is contained in:
Evelyn Eastmond 2019-04-26 16:42:07 -04:00
parent 270a445703
commit 83bf1be066

View file

@ -477,7 +477,8 @@ class BoostMotor {
* @private * @private
*/ */
_turnOn () { _turnOn () {
if (this.power === 0) return; //if (this.power === 0) return;
const cmd = this._parent.generateOutputCommand( const cmd = this._parent.generateOutputCommand(
this._index, this._index,
BoostOutputExecution.EXECUTE_IMMEDIATELY, BoostOutputExecution.EXECUTE_IMMEDIATELY,
@ -496,9 +497,9 @@ class BoostMotor {
* @param {boolean} [resetState=true] - whether to reset the state of the motor when running this command. * @param {boolean} [resetState=true] - whether to reset the state of the motor when running this command.
*/ */
turnOnForever (resetState = true){ turnOnForever (resetState = true){
if (this.power === 0) { /* if (this.power === 0) {
this.turnOff(false); this.turnOff(false);
} } */
if (resetState) this.status = BoostMotorState.ON_FOREVER; if (resetState) this.status = BoostMotorState.ON_FOREVER;
this._turnOn(); this._turnOn();
@ -510,9 +511,9 @@ class BoostMotor {
* @param {boolean} [resetState=true] - whether to reset the state of the motor when running this command. * @param {boolean} [resetState=true] - whether to reset the state of the motor when running this command.
*/ */
turnOnFor (milliseconds, resetState = true) { turnOnFor (milliseconds, resetState = true) {
if (this.power === 0) { /* if (this.power === 0) {
this.turnOff(false); this.turnOff(false);
} } */
milliseconds = Math.max(0, milliseconds); milliseconds = Math.max(0, milliseconds);
if (resetState) this.status = BoostMotorState.ON_FOR_TIME; if (resetState) this.status = BoostMotorState.ON_FOR_TIME;