Add size-safe stable MOTA bridge mode

This commit is contained in:
mikecarper committed 2026-07-31 01:01:14 -07:00
1 parent a57e2848a6
commit 8ba658db92
6 files changed
+14 -12

No files matched your search

+1 -1
View File
@@ -402,7 +402,7 @@ static mesh::RadioParamApplyResult applyFixedRadioParams(float freq, float bw, u
#endif
int MyMesh::calcRxDelay(float score, uint32_t air_time) const {
if (_prefs.rx_delay_base <= 0.0f) return 0;
return (int)((pow(_prefs.rx_delay_base, 0.85f - score) - 1.0) * air_time);
return (int)((powf(_prefs.rx_delay_base, 0.85f - score) - 1.0f) * air_time);
}
uint32_t MyMesh::getRetransmitDelay(const mesh::Packet *packet) {
+7 -7
View File
@@ -954,7 +954,7 @@ void MyMesh::logRx(mesh::Packet *pkt, int len, float score) {
}
#endif
if (_logging) {
if (false) {
File f = openAppend(PACKET_LOG_FILE);
if (f) {
f.print(getLogDateTime());
@@ -984,7 +984,7 @@ void MyMesh::logTx(mesh::Packet *pkt, int len) {
}
#endif
if (_logging) {
if (false) {
File f = openAppend(PACKET_LOG_FILE);
if (f) {
f.print(getLogDateTime());
@@ -1003,7 +1003,7 @@ void MyMesh::logTx(mesh::Packet *pkt, int len) {
}
void MyMesh::logTxFail(mesh::Packet *pkt, int len) {
if (_logging) {
if (false) {
File f = openAppend(PACKET_LOG_FILE);
if (f) {
f.print(getLogDateTime());
@@ -1016,7 +1016,7 @@ void MyMesh::logTxFail(mesh::Packet *pkt, int len) {
int MyMesh::calcRxDelay(float score, uint32_t air_time) const {
if (_prefs.rx_delay_base <= 0.0f) return 0;
return (int)((pow(_prefs.rx_delay_base, 0.85f - score) - 1.0) * air_time);
return (int)((powf(_prefs.rx_delay_base, 0.85f - score) - 1.0f) * air_time);
}
uint32_t MyMesh::getRetransmitDelay(const mesh::Packet *packet) {
@@ -1300,7 +1300,7 @@ void MyMesh::onDirectRetryEvent(const char* event, const mesh::Packet* packet, u
(uint32_t)log_cr,
(uint32_t)log_preamble_len);
#endif
if (_logging) {
if (false) {
File f = openAppend(PACKET_LOG_FILE);
if (f) {
f.print(getLogDateTime());
@@ -1880,7 +1880,7 @@ void MyMesh::onFloodRetryEvent(const char* event, const mesh::Packet* packet, ui
if (packet == NULL) {
MESH_DEBUG_PRINTLN("flood retry %s (retry=%u, elapsed_ms=%lu, packet=released)",
event, (unsigned int)retry_attempt, (unsigned long)delay_millis);
if (_logging) {
if (false) {
File f = openAppend(PACKET_LOG_FILE);
if (f) {
f.print(getLogDateTime());
@@ -1928,7 +1928,7 @@ void MyMesh::onFloodRetryEvent(const char* event, const mesh::Packet* packet, ui
(uint32_t)log_cr,
(uint32_t)log_preamble_len);
if (_logging) {
if (false) {
File f = openAppend(PACKET_LOG_FILE);
if (f) {
f.print(getLogDateTime());
+3 -1
View File
@@ -667,7 +667,9 @@ public:
void updateAdvertTimer() override;
void updateFloodAdvertTimer() override;
void setLoggingOn(bool enable) override { _logging = enable; }
// Stable MOTA bridge builds keep repeater and LoRa OTA behavior but omit
// runtime packet-file logging to preserve in-place apply headroom.
void setLoggingOn(bool enable) override { (void)enable; }
void eraseLogFile() override {
_fs->remove(PACKET_LOG_FILE);
+1 -1
View File
@@ -297,7 +297,7 @@ void MyMesh::logTxFail(mesh::Packet *pkt, int len) {
int MyMesh::calcRxDelay(float score, uint32_t air_time) const {
if (_prefs.rx_delay_base <= 0.0f) return 0;
return (int)((pow(_prefs.rx_delay_base, 0.85f - score) - 1.0) * air_time);
return (int)((powf(_prefs.rx_delay_base, 0.85f - score) - 1.0f) * air_time);
}
const char *MyMesh::getLogDateTime() {
+1 -1
View File
@@ -354,7 +354,7 @@ bool SensorMesh::allowPacketForward(const mesh::Packet* packet) {
int SensorMesh::calcRxDelay(float score, uint32_t air_time) const {
if (_prefs.rx_delay_base <= 0.0f) return 0;
return (int) ((pow(_prefs.rx_delay_base, 0.85f - score) - 1.0) * air_time);
return (int) ((powf(_prefs.rx_delay_base, 0.85f - score) - 1.0f) * air_time);
}
uint32_t SensorMesh::getRetransmitDelay(const mesh::Packet* packet) {
+1 -1
View File
@@ -79,7 +79,7 @@ void Dispatcher::restoreOutboundTxOverrides() {
}
int Dispatcher::calcRxDelay(float score, uint32_t air_time) const {
return (int) ((pow(10, 0.85f - score) - 1.0) * air_time);
return (int) ((powf(10.0f, 0.85f - score) - 1.0f) * air_time);
}
uint32_t Dispatcher::getCADFailRetryDelay() const {