fixed missing arguments for blocks
This commit is contained in:
parent
90d23f74fd
commit
a97427ee49
4
main.ts
4
main.ts
@ -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(() => {
|
||||||
|
Loading…
Reference in New Issue
Block a user