* updated ramp block

* updated example
This commit is contained in:
Peli de Halleux
2019-09-04 14:51:45 -07:00
committed by GitHub
parent 9c5d5f9a86
commit 17ab24eaa9
2 changed files with 13 additions and 11 deletions

View File

@ -1,9 +1,9 @@
# Schedule
# Ramp
Schedules an acceleration, constant and deceleration phase at a given speed.
```sig
motors.largeA.schedule(50, 100, 500, 100)
motors.largeA.ramp(50, 100, 500, 100)
```
The speed setting is a percentage of the motor's full speed. Full speed is the speed that the motor runs when the brick supplies maximum output voltage to the port.
@ -30,7 +30,7 @@ brick.buttonLeft.onEvent(ButtonEvent.Pressed, function () {
acc += -100
})
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
motors.largeB.schedule(50, acc, steady, dec, MoveUnit.MilliSeconds)
motors.largeB.ramp(50, steady, MoveUnit.MilliSeconds, acc, dec)
})
brick.buttonRight.onEvent(ButtonEvent.Pressed, function () {
acc += 100