Добавлено энергосбережение для увеличения работы от аккума:

- через 60 сек экран выключается и есп уходит в сон
- слейв в ожидании мастера прослушивает не постоянно 20мс/100мс
This commit is contained in:
2026-08-08 10:42:59 +03:00
parent 21f8fe8e13
commit c952c165f8
10 changed files with 173 additions and 7 deletions

View File

@@ -12,6 +12,7 @@ class Radio {
bool sendBroadcast(ProtocolPacket packet);
bool sendTo(const uint8_t mac[6], ProtocolPacket packet);
bool receive(ReceivedPacket &received);
bool setWindowedReceive(bool enabled);
void flush();
uint32_t lastReceiveMs() const { return __atomic_load_n(&lastValidRxMs_, __ATOMIC_RELAXED); }
static void macText(const uint8_t mac[6], char *out, size_t size);
@@ -28,5 +29,6 @@ class Radio {
volatile bool active_ = false;
volatile uint32_t lastValidRxMs_ = 0;
uint32_t lastChannelCheckMs_ = 0;
bool windowedReceive_ = false;
};