fixed missing arguments for blocks

This commit is contained in:
Michael Klein 2019-11-13 15:39:05 +01:00 committed by Baozhu Zuo
parent 90d23f74fd
commit a97427ee49

View File

@ -375,7 +375,7 @@ namespace grove {
* @param xPin * @param xPin
* @param yPin * @param yPin
*/ */
//% blockId=grove_joystick_read block="%strip|read position of joystick" //% blockId=grove_joystick_read block="%strip|read position of joystick at|%xpin|and|%ypin"
//% advanced=true //% advanced=true
read(xPin: AnalogPin, yPin: AnalogPin): number { read(xPin: AnalogPin, yPin: AnalogPin): number {
let xdata = 0, ydata = 0, result = 0; let xdata = 0, ydata = 0, result = 0;
@ -548,7 +548,7 @@ namespace grove {
* @param ypin * @param ypin
* @param handler code to run * @param handler code to run
*/ */
//% blockId=grove_joystick_create_event block="on Key|%key" //% blockId=grove_joystick_create_event block="on Key|%key at |%xpin|and|%ypin"
export function onJoystick(key: GroveJoystickKey, xpin: AnalogPin, ypin: AnalogPin, handler: () => void) { export function onJoystick(key: GroveJoystickKey, xpin: AnalogPin, ypin: AnalogPin, handler: () => void) {
control.onEvent(joystickEventID, key, handler); control.onEvent(joystickEventID, key, handler);
control.inBackground(() => { control.inBackground(() => {