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
2026-01-08 20:57:28 -08:00
parent 2bd61c1324
commit ffa2a1ecdd
5 changed files with 14 additions and 30 deletions
+1 -1
View File
@@ -799,7 +799,7 @@ void SensorMesh::sendSelfAdvertisement(int delay_millis) {
void SensorMesh::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
}