Default to remote

This commit is contained in:
Michal Moskal 2017-07-10 12:53:18 +01:00
parent 0d9e719078
commit 617aae5943
3 changed files with 3 additions and 9 deletions

View File

@ -1,6 +0,0 @@
[ 1] runtime starting...
[ 53] runtime started [V0.60]
[ 55] mmap /dev/lms_analog len=5172 off=0
[ 56] mmap /dev/lms_uart len=42744 off=0
[ 64] Error: 7 [0]
[ 64] PANIC 42

View File

@ -49,6 +49,8 @@ namespace input {
super() super()
this.channel = IrRemoteChannel.Ch0 this.channel = IrRemoteChannel.Ch0
this.buttons = [] this.buttons = []
// otherwise button events won't work
this.mode = IrSensorMode.RemoteControl
for (let i = 0; i < 5; ++i) { for (let i = 0; i < 5; ++i) {
this.buttons.push(new ButtonTS()) this.buttons.push(new ButtonTS())
} }

View File

@ -34,9 +34,7 @@ input.touch.button.onEvent(ButtonEvent.Click, () => {
num++ num++
}) })
input.ir.getRemoteCommand() input.ir.button(IrRemoteButton.TopLeft).onEvent(ButtonEvent.Click, () => {
input.ir.button(IrRemoteButton.TopLeft).onEvent(ButtonEvent.Down, () => {
screen.drawText(10, 60, "TOPLEFT " + num) screen.drawText(10, 60, "TOPLEFT " + num)
num++ num++
}) })