From cde2c46b4fcc027e7e64510a3241c196f6fe5ba0 Mon Sep 17 00:00:00 2001 From: uvok Date: Sat, 19 Jul 2025 13:21:56 +0200 Subject: Add very ugly prev/next navigation --- src/main.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index a15b93c..d4b9fd9 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -56,7 +56,12 @@ void setup() void loop() { uint16_t pressDuration = de::uvok::badge::gpio_poll(); - if (pressDuration > PRESS_TIME_BLE_ADV) + if (pressDuration < 64) + { + if (pressDuration == NEXT_KEY) de::uvok::badge::display_next(); + if (pressDuration == PRV_KEY) de::uvok::badge::display_prev(); + } + else if (pressDuration > PRESS_TIME_BLE_ADV) { if (!pAdvertising->isAdvertising()) { -- cgit v1.2.3