Update motor APIs

This commit is contained in:
Sam El-Husseini
2017-08-07 17:39:37 -07:00
parent 88e21db35e
commit 15f50966aa
7 changed files with 107 additions and 18 deletions

View File

@ -21,7 +21,23 @@
"output.createBuffer": "Create a new zero-initialized buffer.",
"output.createBuffer|param|size": "number of bytes in the buffer",
"output.getPattern": "Pattern block.",
"output.getPattern|param|pattern": "the lights pattern to use. eg: LightsPattern.Green",
"output.setLights": "Set lights.",
"output.setLights|param|pattern": "the lights pattern to use.",
"output.setPower": "Set motor power.",
"output.setPower|param|out": "the output connection that the motor is connected to",
"output.setPower|param|power": "the desired power to use. eg: 100",
"output.setSpeed": "Set motor speed.",
"output.setSpeed|param|out": "the output connection that the motor is connected to",
"output.setSpeed|param|speed": "the desired speed to use. eg: 100",
"output.start": "Turn motor on.",
"output.start|param|out": "the output connection that the motor is connected to",
"output.stop": "Turn motor off.",
"output.stop|param|out": "the output connection that the motor is connected to",
"output.turn": "Turn a motor on for a specified number of milliseconds.",
"output.turn|param|ms": "the number of milliseconds to turn the motor on, eg: 500",
"output.turn|param|out": "the output connection that the motor is connected to",
"output.turn|param|useBrake": "whether or not to use the brake, defaults to false",
"screen.clear": "Clear screen and reset font to normal.",
"screen.doubleIcon": "Double size of an icon.",
"screen.drawIcon": "Draw an icon on the screen.",

View File

@ -3,7 +3,7 @@
"ButtonEvent.Down|block": "down",
"ButtonEvent.LongClick|block": "long click",
"ButtonEvent.Up|block": "up",
"control.raiseEvent|block": "raise event|from %src|with value value",
"control.raiseEvent|block": "raise event|from %src|with value %value",
"control|block": "control",
"input.buttonDown|block": "button down",
"input.buttonEnter|block": "button enter",
@ -17,7 +17,12 @@
"input.remoteTopRight|block": "remote top-right",
"input|block": "input",
"output.getPattern|block": "%pattern",
"output.setLights|block": "set lights %pattern=led_pattern",
"output.setLights|block": "set status light %pattern=led_pattern",
"output.setPower|block": "set motor %out| power to %power",
"output.setSpeed|block": "set motor %out| speed to %speed",
"output.start|block": "turn motor %out| on",
"output.stop|block": "turn motor %out| off",
"output.turn|block": "turn motor %out| on for %ms| milliseconds",
"output|block": "output",
"screen|block": "screen",
"serial|block": "serial",
@ -25,5 +30,7 @@
"{id:category}Input": "Input",
"{id:category}Output": "Output",
"{id:category}Screen": "Screen",
"{id:category}Serial": "Serial"
"{id:category}Serial": "Serial",
"{id:group}Lights": "Lights",
"{id:group}Motors": "Motors"
}