Repository navigation
Mavlink dynamic sysIDv3 - #3032
Conversation
|
@LupusTheCanine we've merged the new eventing framework and now this one should be able to implemented on top of master quite simply. |
I will take a look. Unfortunately, it won't be quite simple as I have to modify subscribed events depending on which subdriver is loaded if we are to avoid unnecessary event calls. Main serialIO driver is subscribed to EVENT_CONNECTION_CHANGED and I need to respond to EVENT_CONFIG_SERIAL_CHANGE. |
I'm happy for you no add another subscription to the serial driver. The subscriptions are bits that can be ORed together. .subscribe = EVENT_CONNECTION_CHANGED | EVENT_CONFIG_SERIAL_CHANGEI don't think it will be a big deal responding to the both events as they are both very infrequent. |
3cce048 to
94a575b
Compare
|
What's the status of this? Looks like the update to Serial0's .subscribe is still missing. |
Good catch, I had thought that had been done! I've added it in now. |
Brings feature/stm32 (fork point ELRS 4.0.1, b5a5b5f) up to ELRS master 15c7899 (all of 4.1 + 4.2-dev, ~85 PRs). Plan and per-file recipes: /Volumes/External/src/Plans/elrs-master-merge/ELRS_MASTER_MERGE_PLAN.md (+ appendix/). Decisions: - LR2021: upstream driver taken verbatim (PRAM 1.1.2, TCXO from layout, command timeouts, FLRC, X-band/1RSS fixes) + STM32 delta: 10 MHz SPI4 init (BUG #2 fix), BUSY pull-down, no LittleFS include, bounded BUSY waits at boot (first command, POR, PRAM load). - RADIO_LR11XX umbrella macro removed; upstream `RADIO_LR1121 || RADIO_LR2021` guards and RadioBandMod everywhere (incl. tx_mavlink, display, config). 24-row LR2021 rate table. - Kept TLRS-only features: MAVLink param protocol + mLRS link stats (MAVLink lib pin cd78b9bf), USB CRSF handset input, RX serial runtime reconfig / UAF fix / SerialIO virtuals, Backpack web-LUA (router delivers to all connectors), W25Q64 storage, unified STM32 (titanSlot), USB NIC / config API / webDFU, TD web UI (functional port of upstream web changes follows in a separate commit). - Upstream wins where TLRS hand-fixed the same thing (ExpressLRS#3032 sysid, MAVLink payload sizes, htobe24 capacity), except: SerialMavlink keeps forwarding BAD_CRC (ArduPilot-dialect) uplink frames verbatim, and the flight-mode frame keeps the fixed sizeof(crsffm.p) (upstream's sizeof(len+1) truncates to 4 bytes). - Config: TX stays v9 (no migration work: no customer units); TxConfig owns its EEPROM upstream-style, STM32 calls Begin() in Load() and keeps the global `eeprom` options.cpp uses. - STM32 ports for new upstream code: checkRebootTime -> HAL_NVIC_SystemReset, GPS baud change via end()/begin(), GPS TX pin from the layout, VbatCalibration ESP-only, TH920 domain map, ANT_GROUP / PWM_OUT_ONLY / RFSW macros in the unified STM32 headers, isArmed / scheduleRebootTime in the USB config API, MSP bind phrase rejected on STM32 (no MD5; would unbind), Scorpion in the RX MAVLink param values. - Build: upstream per-MCU target ini split + targets/unified_stm32.ini; common.ini radio block = upstream (the auto-merge had LR2021 ignoring its own driver); CI keeps the Titan-Dynamics targets repo, param-doc check, release job; LR2021 targets get LBT builds. Verified at this commit: STM32H743 LR2021 TX/RX (DFU + STLINK), ESP32 LR1121 TX/RX, ESP32 LR2021 TX/RX, ESP32 2400 TX, ESP8285 2400 RX build; pio test -e native 198/198; gen_param_metadata --check OK. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Makes source and target SysID dynamic
Adds event handler to SerialMavlink that updates SysIDs when the config is changed
Requires #3031