Reduce background polling and radio power use

This commit is contained in:
mikecarper committed 2026-07-13 14:36:34 -07:00
1 parent b9e7e416be
commit 4f839d3477
19 files changed
+802 -273

No files matched your search

+6
View File
@@ -7,6 +7,9 @@ class PacketQueue {
uint8_t* _pri_table;
uint32_t* _schedule_table;
int _size, _num;
uint32_t _next_schedule;
void rebuildNextTime();
public:
PacketQueue(int max_entries);
@@ -15,6 +18,7 @@ public:
bool add(mesh::Packet* packet, uint8_t priority, uint32_t scheduled_for);
int count() const { return _num; }
int countBefore(uint32_t now) const;
bool getNextTime(uint32_t now, uint32_t& scheduled_for) const;
mesh::Packet* itemAt(int i) const { return _table[i]; }
mesh::Packet* removeByIdx(int i);
};
@@ -32,9 +36,11 @@ public:
mesh::Packet* peekNextOutbound(uint32_t now) override;
int getOutboundCount(uint32_t now) const override;
int getOutboundTotal() const override;
bool getNextOutboundTime(uint32_t now, uint32_t& scheduled_for) const override;
int getFreeCount() const override;
mesh::Packet* getOutboundByIdx(int i) override;
mesh::Packet* removeOutboundByIdx(int i) override;
void queueInbound(mesh::Packet* packet, uint32_t scheduled_for) override;
mesh::Packet* getNextInbound(uint32_t now) override;
bool getNextInboundTime(uint32_t now, uint32_t& scheduled_for) const override;
};