mirror of
https://github.com/agessaman/MeshCore.git
synced 2026-07-15 06:28:52 +00:00
Merge mcarper/keymindCascade into mqtt-observer-plus
Integrates Mike Carper's transmission-reliability work (direct retries with SNR-adaptive backoff and CR, flood retry controls, alt-path replies, flood channel gates) plus its upstream/dev base (as of 2026-07-06) on top of the observer stack. The flex branch is untouched; this branch is the experimental integration line. Conflict-resolution decisions, for future re-syncs (git rerere is enabled and has recorded these): - NodePrefs adopts keymind/upstream member order + retry/flood tail. Member order is in-memory only: /com_prefs stays field-by-field with the same canonical file order both sides already share through offset 294; keymind appends the retry tail at 295+ (new canonical size 676). Flex fleet files load unchanged; retry fields default via direct_retry_prefs_magic. - loadPrefsInt keeps the fork's legacy MQTT-gap recovery but moves its detection boundary from 'extra > 5' to 'extra > LEGACY_MQTT_GAP_3SLOT (864)' so keymind-size tails take the normal read path. COM_PREFS_TAIL_BYTES retired. - Dispatcher/RadioLibWrappers: fork watchdog additions + keymind TX overrides and CAD busy counter are unioned; RxReservePacketManager::queueOutbound follows upstream's new bool return (false when shedding). - CommonCLI: fork observer dispatch + versioned /mqtt_prefs machinery kept; keymind CLI (retry/flood/radioat) taken; duplicate CAD/FEM handlers and sanitise lines deduped (kept keymind placements to minimize future diff). - MyMesh (repeater/room): fork alerter/OTA/observer wiring kept; keymind scheduled-radio system replaces the old pending_* temp-radio members; applySavedRadioParams() replaces raw setParams at startup. - ESP32Board: fork manifest-OTA + keymind powerOff/deepSleep and stopOTAUpdate unioned; startOTAUpdate keeps fork's STA-aware IP with keymind's idempotency guard. - build.sh taken wholesale from keymind (fleet builds use GH Actions). Verified: Heltec_v3_repeater_observer_mqtt, Heltec_v3_repeater, heltec_v4_repeater_observer_mqtt, Heltec_v3_room_server_observer_mqtt build; host migration harness (13 MQTT + non-MQTT scenarios) passes with updated expectations (676-byte /com_prefs; odd-size files normalize on save, not load); native unit tests 13/13.
This commit is contained in:
@@ -327,6 +327,9 @@ uint32_t SensorMesh::getDirectRetransmitDelay(const mesh::Packet* packet) {
|
||||
int SensorMesh::getInterferenceThreshold() const {
|
||||
return _prefs.interference_threshold;
|
||||
}
|
||||
bool SensorMesh::getCADEnabled() const {
|
||||
return _prefs.cad_enabled;
|
||||
}
|
||||
int SensorMesh::getAGCResetInterval() const {
|
||||
return ((int)_prefs.agc_reset_interval) * 4000; // milliseconds
|
||||
}
|
||||
@@ -729,6 +732,7 @@ SensorMesh::SensorMesh(mesh::MainBoard& board, mesh::Radio& radio, mesh::Millise
|
||||
_prefs.flood_advert_interval = 0; // disabled
|
||||
_prefs.disable_fwd = true;
|
||||
_prefs.flood_max = 64;
|
||||
_prefs.flood_channel_data_enabled = 1;
|
||||
_prefs.interference_threshold = 0; // disabled
|
||||
_prefs.radio_fem_rxgain = 1; // LoRa FEM RX gain on by default (FEM boards)
|
||||
_prefs.cad_enabled = 0; // hardware CAD before TX (off by default; 'set cad on')
|
||||
@@ -737,6 +741,7 @@ SensorMesh::SensorMesh(mesh::MainBoard& board, mesh::Radio& radio, mesh::Millise
|
||||
_prefs.gps_enabled = 0;
|
||||
_prefs.gps_interval = 0;
|
||||
_prefs.advert_loc_policy = ADVERT_LOC_PREFS;
|
||||
_prefs.radio_fem_rxgain = 1;
|
||||
|
||||
memset(default_scope.key, 0, sizeof(default_scope.key));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user