fix input.input. typing

This commit is contained in:
Amerlander
2020-03-19 16:26:40 +01:00
parent 0803a13033
commit f30ff02987
57 changed files with 101 additions and 101 deletions

View File

@ -43,7 +43,7 @@ music.onEvent(MusicEvent.BackgroundMelodyResumed, () => {
music.onEvent(MusicEvent.BackgroundMelodyRepeated, () => {
serial.writeLine("background repeated")
})
input.input.onButtonEvent(Button.A, ButtonEvent.Click, () => {
input.onButtonEvent(Button.A, ButtonEvent.Click, () => {
music.beginMelody(music.builtInMelody(Melodies.BaDing), MelodyOptions.Once)
})
music.setTempo(100)

View File

@ -17,7 +17,7 @@ This example send the frequency and duration over radio
and plays it on the remote @boardname@.
```typescript
input.input.onButtonEvent(Button.A, ButtonEvent.Click, () => {
input.onButtonEvent(Button.A, ButtonEvent.Click, () => {
music.playTone(440, 120)
led.toggle(0, 0)
})
@ -26,7 +26,7 @@ radio.onReceivedNumber(function (receivedNumber) {
const duration = receivedNumber & 0xffff;
music.playTone(freq, duration);
})
input.input.onButtonEvent(Button.B, ButtonEvent.Click, () => {
input.onButtonEvent(Button.B, ButtonEvent.Click, () => {
music.setPlayTone((frequency: number, duration: number) => {
radio.sendNumber((frequency << 16) | (duration & 0xffff));
})