diff --git a/include/config.h b/include/config.h index 2c0fffe..cc0a3a9 100644 --- a/include/config.h +++ b/include/config.h @@ -50,13 +50,14 @@ constexpr uint8_t LORA_SYNC_WORD = 0x34; // Timing constexpr uint32_t SENDER_WAKE_INTERVAL_SEC = 30; constexpr uint32_t TIME_SYNC_INTERVAL_SEC = 60; -constexpr uint32_t OLED_PAGE_INTERVAL_MS = 10000; +constexpr uint32_t OLED_PAGE_INTERVAL_MS = 4000; constexpr uint32_t OLED_AUTO_OFF_MS = 10UL * 60UL * 1000UL; +constexpr uint32_t SENDER_OLED_READ_MS = 10000; constexpr uint8_t NUM_SENDERS = 1; inline constexpr uint16_t EXPECTED_SENDER_IDS[NUM_SENDERS] = { - //0xF19C //433mhz sender - 0x7EB4 //868mhz sender + 0xF19C //433mhz sender + //0x7EB4 //868mhz sender }; DeviceRole detect_role(); diff --git a/src/main.cpp b/src/main.cpp index 5e54a96..9d31a42 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -120,7 +120,11 @@ static void sender_cycle() { time_handle_timesync_payload(rx.payload, rx.payload_len); } - delay(50); + uint32_t start = millis(); + while (millis() - start < SENDER_OLED_READ_MS) { + display_tick(); + delay(50); + } display_power_down(); lora_sleep(); go_to_deep_sleep(SENDER_WAKE_INTERVAL_SEC);