Fix issue with currentSpeed having to go through driver.

This commit is contained in:
Edgar O Silva 2013-10-30 20:37:42 -06:00
parent 6a9c5eb60e
commit ea472f9e12
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ Cylon.robot
every 0.05.seconds(), -> every 0.05.seconds(), ->
speed += increment speed += increment
my.motor.speed(speed) my.motor.speed(speed)
console.log("current speed => #{ my.motor.driver.currentSpeed }") console.log("current speed => #{ my.motor.currentSpeed() }")
increment = -increment if (speed is 0) or (speed is 255) increment = -increment if (speed is 0) or (speed is 255)
.start() .start()