simplify motor API

This commit is contained in:
Peli de Halleux
2017-10-27 01:47:25 -07:00
parent 12cdad72c8
commit 712c2178d2
4 changed files with 42 additions and 79 deletions

View File

@ -56,17 +56,9 @@
"input.remoteButtonCenter": "Remote beacon (center) button.",
"input.remoteButtonTopLeft": "Remote top-left button.",
"input.remoteButtonTopRight": "Remote top-right button.",
"output.Motor.off": "Power off the motor.",
"output.Motor.on": "Power on the motor.",
"output.Motor.onForAngle": "Powers on the motor for a specified number of milliseconds.",
"output.Motor.onForAngle|param|brake": "whether or not to use the brake",
"output.Motor.onForAngle|param|degrees": "the number of degrees to turn, eg: 90",
"output.Motor.onForAngle|param|power": "the motor power level from ``-100`` to ``100``, eg: 50",
"output.Motor.onForTime": "Powers on the motor for a specified number of milliseconds.",
"output.Motor.onForTime|param|brake": "whether or not to use the brake",
"output.Motor.onForTime|param|milliseconds": "the number of milliseconds to turn the motor on, eg: 500",
"output.Motor.onForTime|param|power": "the motor power level from ``-100`` to ``100``, eg: 50",
"output.Motor.on|param|power": "the motor power level from ``-100`` to ``100``, eg: 50",
"output.Motor.on": "Power on or off the motor.",
"output.Motor.setBrake": "Sets the automatic brake on or off when the motor is off",
"output.Motor.setBrake|param|brake": "a value indicating if the motor should break when off",
"output.Motor.setPower": "Sets the motor power level from ``-100`` to ``100``.",
"output.Motor.setPower|param|power": "the desired speed to use. eg: 50",
"output.Motor.speed": "Gets motor actual speed.",

View File

@ -82,10 +82,8 @@
"input.ultrasonic3|block": "ultrasonic sensor 3",
"input.ultrasonic4|block": "ultrasonic sensor 4",
"input|block": "input",
"output.Motor.off|block": "%motor|OFF then brake %brake",
"output.Motor.onForAngle|block": "%motor|ON at power %power|for %degrees|deg then brake %brake",
"output.Motor.onForTime|block": "%motor|ON at power %power|for %milliseconds=timePicker|ms then brake %brake",
"output.Motor.on|block": "%motor|ON at power %power",
"output.Motor.on|block": "%motor|%onOrOff",
"output.Motor.setBrake|block": "%motor|set brake %brake",
"output.Motor.setPower|block": "%motor|set power to %speed",
"output.Motor.speed|block": "%motor|speed",
"output.largeMotorA|block": "large motor A",