Keep sender OLED on longer; faster page cycle
This commit is contained in:
@@ -50,13 +50,14 @@ constexpr uint8_t LORA_SYNC_WORD = 0x34;
|
|||||||
// Timing
|
// Timing
|
||||||
constexpr uint32_t SENDER_WAKE_INTERVAL_SEC = 30;
|
constexpr uint32_t SENDER_WAKE_INTERVAL_SEC = 30;
|
||||||
constexpr uint32_t TIME_SYNC_INTERVAL_SEC = 60;
|
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 OLED_AUTO_OFF_MS = 10UL * 60UL * 1000UL;
|
||||||
|
constexpr uint32_t SENDER_OLED_READ_MS = 10000;
|
||||||
|
|
||||||
constexpr uint8_t NUM_SENDERS = 1;
|
constexpr uint8_t NUM_SENDERS = 1;
|
||||||
inline constexpr uint16_t EXPECTED_SENDER_IDS[NUM_SENDERS] = {
|
inline constexpr uint16_t EXPECTED_SENDER_IDS[NUM_SENDERS] = {
|
||||||
//0xF19C //433mhz sender
|
0xF19C //433mhz sender
|
||||||
0x7EB4 //868mhz sender
|
//0x7EB4 //868mhz sender
|
||||||
};
|
};
|
||||||
|
|
||||||
DeviceRole detect_role();
|
DeviceRole detect_role();
|
||||||
|
|||||||
@@ -120,7 +120,11 @@ static void sender_cycle() {
|
|||||||
time_handle_timesync_payload(rx.payload, rx.payload_len);
|
time_handle_timesync_payload(rx.payload, rx.payload_len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t start = millis();
|
||||||
|
while (millis() - start < SENDER_OLED_READ_MS) {
|
||||||
|
display_tick();
|
||||||
delay(50);
|
delay(50);
|
||||||
|
}
|
||||||
display_power_down();
|
display_power_down();
|
||||||
lora_sleep();
|
lora_sleep();
|
||||||
go_to_deep_sleep(SENDER_WAKE_INTERVAL_SEC);
|
go_to_deep_sleep(SENDER_WAKE_INTERVAL_SEC);
|
||||||
|
|||||||
Reference in New Issue
Block a user