simplified motor API

This commit is contained in:
Peli de Halleux
2017-10-30 21:29:18 -07:00
parent 8f5c930f76
commit 16a025f3a0
4 changed files with 63 additions and 36 deletions

View File

@ -42,14 +42,17 @@
"control.raiseEvent|param|value": "Component specific code indicating the cause of the event.",
"motors.Motor.clearCount": "Clears the motor count",
"motors.Motor.count": "Gets motor step count.",
"motors.Motor.on": "Power on or off the motor.",
"motors.Motor.move": "Moves the motor by a number of degrees",
"motors.Motor.move|param|angle": "the degrees to rotate, eg: 360",
"motors.Motor.move|param|power": "the power from ``100`` full forward to ``-100`` full backward, eg: 50",
"motors.Motor.power": "Sets the motor power level from ``-100`` to ``100``.",
"motors.Motor.power|param|power": "the power from ``100`` full forward to ``-100`` full backward, eg: 50",
"motors.Motor.reset": "Resets the motor.",
"motors.Motor.setBrake": "Sets the automatic brake on or off when the motor is off",
"motors.Motor.setBrake|param|brake": "a value indicating if the motor should break when off",
"motors.Motor.setPower": "Sets the motor power level from ``-100`` to ``100``.",
"motors.Motor.setPower|param|power": "the desired speed to use. eg: 50",
"motors.Motor.setReversed": "Reverses the motor polarity",
"motors.Motor.speed": "Gets motor actual speed.",
"motors.Motor.stop": "Stops the motor",
"motors.Motor.tachoCount": "Gets motor tacho count.",
"motors.stopAllMotors": "Stops all motors",
"output.createBuffer": "Create a new zero-initialized buffer.",

View File

@ -46,11 +46,12 @@
"control.raiseEvent|block": "raise event|from %src|with value %value",
"control|block": "control",
"motors.Motor.count|block": "%motor|count",
"motors.Motor.on|block": "%motor|%onOrOff",
"motors.Motor.setBrake|block": "%motor|set brake %brake",
"motors.Motor.setPower|block": "%motor|set power to %speed",
"motors.Motor.setReversed|block": "%motor|set reversed %reversed",
"motors.Motor.move|block": "move %motor|by %angle|degrees at %power|%",
"motors.Motor.power|block": "power %motor|to %power|%",
"motors.Motor.setBrake|block": "set %motor|brake %brake",
"motors.Motor.setReversed|block": "set %motor|reversed %reversed",
"motors.Motor.speed|block": "%motor|speed",
"motors.Motor.stop|block": "stop %motor",
"motors.Motor.tachoCount|block": "%motor|tacho count",
"motors.largeMotorA|block": "large motor A",
"motors.largeMotorB|block": "large motor B",