Add persistent LoRa OTA speed control and harden timing
Add get/set ota.speed and OTA CLI aliases for factors from 0.05 to 3, defaulting to the existing pace. Persist the setting independently of the OTA workspace and apply it to OTA packet pacing, relays, discovery and adverts while retaining the configured airtime budget. Preserve physical proof/retry allowances, account for both participating radio profiles, keep optional deadlines armed across millis rollover, and exclude intentional pacing from observer stale-packet age. Keep local verification at its normal rate and retain a valid saved speed if backup recovery cannot finish. Add documentation and CI regression coverage. Validation: 1,491 native tests and 26 CLI/integration tests passed. Built ESP32 full repeater, ESP32 full Companion, nRF52 full Companion and STM32 USB Companion successfully, including their memory/size checks.
This commit is contained in:
1 parent
a07f39c6dd
commit
b2f2b5bf02
22 files changed
+1032
-36
No files matched your search
@@ -21,6 +21,9 @@
|
||||
#if defined(ENABLE_OTA) && defined(OTA_HEAP_CONTEXT)
|
||||
#include <helpers/ota/OtaContext.h>
|
||||
#endif
|
||||
#if defined(ENABLE_OTA)
|
||||
#include <helpers/ota/OtaSpeedConfig.h>
|
||||
#endif
|
||||
#include "helpers/radiolib/RXPowerSaving.h"
|
||||
#include "helpers/radiolib/RxBoostedGainDefaults.h"
|
||||
#include "helpers/radiolib/CadTiming.h"
|
||||
@@ -1699,6 +1702,9 @@ void MyMesh::begin(bool has_display, bool radio_available) {
|
||||
initializeOfflineQueue();
|
||||
BaseChatMesh::begin();
|
||||
_radio_profiles.begin(_store->getPrimaryFS(), _radio, getRTCClock());
|
||||
#if defined(ENABLE_OTA)
|
||||
mesh::ota::beginSpeedConfig(_store->getPrimaryFS());
|
||||
#endif
|
||||
|
||||
const bool identity_loaded = _store->loadMainIdentity(self_id);
|
||||
const bool is_new_install = !identity_loaded
|
||||
@@ -2399,6 +2405,9 @@ bool MyMesh::handleLocalControlCommand(const char* command, char* reply,
|
||||
while (*command == ' ') command++;
|
||||
|
||||
if (handleTxRoutingCommand(command, reply, reply_size)) return true;
|
||||
#if COMPANION_FEATURE_OTA_CLI
|
||||
if (mesh::ota::handleSpeedCommand(command, reply, reply_size)) return true;
|
||||
#endif
|
||||
if (handleCompanionBluetoothCommand(command, reply, reply_size)) return true;
|
||||
if (handleCompanionWirelessCommand(command, reply, reply_size)) return true;
|
||||
|
||||
|
||||
Reference in new issue
Block a user