Refactor advert timer calculation in MyMesh and SensorMesh for type consistency

- Updated the advert timer calculation to explicitly cast the advert interval to an integer type, ensuring consistent behavior across different mesh implementations.
- Enhanced the savePrefs function in CommonCLI to trigger advert timer updates when the advert interval changes, improving responsiveness to user configuration changes.
- Removed the aggressive 4-hour health check in MQTTBridge to prevent connection instability, allowing the MQTT client library to manage connection health internally.
This commit is contained in:
agessaman committed 2026-01-08 20:57:28 -08:00
1 parent 2bd61c1324
commit ffa2a1ecdd
5 files changed
+14 -30

No files matched your search

+1 -1
View File
@@ -774,7 +774,7 @@ void MyMesh::sendSelfAdvertisement(int delay_millis) {
void MyMesh::updateAdvertTimer() {
if (_prefs.advert_interval > 0) { // schedule local advert timer
next_local_advert = futureMillis((uint32_t)_prefs.advert_interval * 2 * 60 * 1000);
next_local_advert = futureMillis((int)((uint32_t)_prefs.advert_interval * 2 * 60 * 1000));
} else {
next_local_advert = 0; // stop the timer
}