From 617aae59430a7b16d6da41825d8dfd39541684d5 Mon Sep 17 00:00:00 2001 From: Michal Moskal Date: Mon, 10 Jul 2017 12:53:18 +0100 Subject: [PATCH] Default to remote --- libs/core/dmesg.txt | 6 ------ libs/core/ir.ts | 2 ++ libs/core/test.ts | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) delete mode 100644 libs/core/dmesg.txt diff --git a/libs/core/dmesg.txt b/libs/core/dmesg.txt deleted file mode 100644 index 319d31f8..00000000 --- a/libs/core/dmesg.txt +++ /dev/null @@ -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 diff --git a/libs/core/ir.ts b/libs/core/ir.ts index f216c8fd..5d6db175 100644 --- a/libs/core/ir.ts +++ b/libs/core/ir.ts @@ -49,6 +49,8 @@ namespace input { super() this.channel = IrRemoteChannel.Ch0 this.buttons = [] + // otherwise button events won't work + this.mode = IrSensorMode.RemoteControl for (let i = 0; i < 5; ++i) { this.buttons.push(new ButtonTS()) } diff --git a/libs/core/test.ts b/libs/core/test.ts index 722baf3c..c5a17f49 100644 --- a/libs/core/test.ts +++ b/libs/core/test.ts @@ -34,9 +34,7 @@ input.touch.button.onEvent(ButtonEvent.Click, () => { num++ }) -input.ir.getRemoteCommand() - -input.ir.button(IrRemoteButton.TopLeft).onEvent(ButtonEvent.Down, () => { +input.ir.button(IrRemoteButton.TopLeft).onEvent(ButtonEvent.Click, () => { screen.drawText(10, 60, "TOPLEFT " + num) num++ })