Honor retry settings across firmware roles

This commit is contained in:
mikecarper committed 2026-07-13 15:22:36 -07:00
1 parent 4f839d3477
commit b8f438d6ea
11 files changed
+356 -27

No files matched your search

+5
View File
@@ -918,6 +918,11 @@ uint32_t MyMesh::getDirectRetransmitDelay(const mesh::Packet *packet) {
return getRNG()->nextInt(0, 5*t + 1);
}
void MyMesh::onRetryConfigChanged() {
if (!_prefs.direct_retry_enabled) cancelAllDirectRetries();
if (_prefs.disable_fwd || _prefs.flood_retry_attempts == 0) cancelAllFloodRetries();
}
bool MyMesh::extractDirectRetryPrefix(const mesh::Packet* packet, uint8_t* prefix, uint8_t& prefix_len) const {
if (packet == NULL || !packet->isRouteDirect() || packet->getPathHashCount() == 0) {
return false;
+3
View File
@@ -326,6 +326,9 @@ protected:
uint32_t getRetransmitDelay(const mesh::Packet* packet) override;
uint32_t getDirectRetransmitDelay(const mesh::Packet* packet) override;
bool supportsBasicRetryConfig() const override { return true; }
bool supportsAdvancedRetryConfig() const override { return true; }
void onRetryConfigChanged() override;
uint8_t getDefaultTxCodingRate() const override { return active_cr; }
bool allowDirectRetry(const mesh::Packet* packet, const uint8_t* next_hop_hash, uint8_t next_hop_hash_len) const override;
bool maybeShortCircuitDirect(mesh::Packet* packet) override;