From ac819ecb20e93302e0b4cf8ad9ec05019e382d3e Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Fri, 27 Sep 2024 00:27:24 +0200 Subject: [PATCH] Added input button actions --- RNode_Firmware.ino | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/RNode_Firmware.ino b/RNode_Firmware.ino index 4410a91..ab1b2e0 100644 --- a/RNode_Firmware.ino +++ b/RNode_Firmware.ino @@ -1326,8 +1326,19 @@ void sleep_now() { } void button_event(uint8_t event, unsigned long duration) { - if (duration > 2000) { + if (duration > 6000) { + bt_enable_pairing(); + } else if (duration > 4000) { + console_active = true; + console_start(); + } else if (duration > 2000) { sleep_now(); + } else { + if (bt_state == BT_STATE_OFF) { + bt_start(); + } else { + bt_stop(); + } } }