Repository navigation
3.x.x maintenance update - #7
Merged
Merged
Conversation
* Move MAVLink buffers into MAVLink serial connector This reduces RAM usage when not in MAVLink mode. * Reduce RAM slightly in mavlink mode too
…3240) * Dynamically allocate tcp-crsf buffers, remove client leak * Move crsf2msp into tcpsocket * Move msp2crsf to tcpsocket
* Double-free on client timeout * Remove unnecessary send()
Extract EnableLBT function
Still need to figure out _how_ this is happening!
Backport: Fix LR1121 not committing power change when switching band
Backport: Disable backpack in wifi and BLE modes (ExpressLRS#2940)
Extend tcpsocket idle timeout
…gh-fix Only use the default UART0 for passthrough flashing
Extend VTX Admin disconnect debounce V3
Merge master elrs.lua changes
Signed-off-by: ncerzzk <[email protected]>
Disable PA in TXRXdisable() whether in rx_enable or tx_enable state for esp8285
… environment name.
Fix build issue with latest platformio for stm32 bootloaders.
* old code said: `DIV4`, but comment read `72 / 8 = 9Mhz`, but using DIV4 would mean a frequency of 18Mhz (72 / 4). * L432 has a higher system clock (80Mhz) than what was in use when the comment was written (probably F1 @ 72Mhz), so the resulting frequency is 20Mhz on the L4.
* communication error failures were observed at 20Mhz, which is out-of-spec.
Without distinguishing between built-in and external TX
Lower STM32L432 SPI clock to spec
…backpack Allows updating backpack firmware via USB
Refactor waveform_8266 for possibly tighter timings
ESP8285 PWM Refactor for v3
Fix FM30 not enabling the DCDC due to use of an outdated/incorrect `#define`.
There was a problem hiding this comment.
Pull request overview
Maintenance update spanning firmware, build tooling, and UI to add ESP32-C3 TX targets, refactor telemetry/LBT/radio APIs (including LR1121 update/status handling), and adjust assorted platform-specific behaviors.
Changes:
- Add new PlatformIO environments (notably Unified ESP32-C3 TX variants) and tweak build/board configuration.
- Refactor telemetry payload retrieval to write into caller-provided buffers; update call sites and tests.
- Rework radio/LBT plumbing (TX/RX flow, frequency switching, and strongest-radio selection) and extend HoTT telemetry mapping.
Reviewed changes
Copilot reviewed 67 out of 70 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/test/test_telemetry/test_telemetry.cpp | Updates tests for new Telemetry::GetNextPayload buffer-based API. |
| src/targets/unified.ini | Adds Unified ESP32-C3 TX build environments (2400/900/LR1121, via ETX/UART/WIFI). |
| src/targets/diy_2400.ini | Updates referenced bootloader filename for DIY 2400 target. |
| src/targets/common.ini | Adds common ESP32-C3 TX env; adjusts esp82xx board/ldscript/cpu/flash settings and linker wrap flags. |
| src/src/tx_main.cpp | Updates platform USB/ESP8266 MAC handling; refactors FHSS/LBT/Radio TX paths and selection of transmitting radio. |
| src/src/rx_main.cpp | Refactors telemetry buffer usage; routes MAVLink payload handling via SerialMavlink; updates LBT hooks. |
| src/src/rx-serial/SerialSBUS.cpp | Adds target-specific conditional around DJI RS Pro mapping path. |
| src/src/rx-serial/SerialMavlink.h | Moves FIFO buffers into class; adds forward/payload extraction helpers. |
| src/src/rx-serial/SerialMavlink.cpp | Implements forwardMessage() and GetNextPayload() using internal FIFOs. |
| src/src/rx-serial/SerialHoTT_TLM.h | Adds HoTT scaling constants; extends sender state for additional CRSF sensors; adjusts ESC packet field type. |
| src/src/rx-serial/SerialHoTT_TLM.cpp | Expands HoTT→CRSF telemetry scheduling and adds RPM/TEMP/CELLS/VOLT/AIRSPEED senders. |
| src/src/rx-serial/SerialCRSF.cpp | Switches MSP/WiFi bridge output path to TCPSOCKET APIs. |
| src/python/serve_html.py | Adds manual flag in LR1121 JSON response. |
| src/python/build_flags.py | Refines regulatory-domain compatibility check for SX127X vs LR1121. |
| src/lua/elrsV3.lua | Updates EXIT version string, loading text behavior, and refresh timing for local vs remote. |
| src/lib/WIFI/lr1121.cpp | Refactors LR1121 status and update flow; adds SPIFFS tag for “manual” firmware. |
| src/lib/WIFI/devWIFI.cpp | Reworks MSP-over-WiFi bridge instantiation; adds reset option for LR1121 tag file; delegates handling to TCPSOCKET. |
| src/lib/VTX/devVTX.cpp | Increases VTX disconnect debounce. |
| src/lib/Telemetry/telemetry.h | Changes GetNextPayload signature to accept destination buffer; removes internal persistent payload buffer. |
| src/lib/Telemetry/telemetry.cpp | Updates CRSF length validation; rewires MSP-over-WiFi forwarding; implements new GetNextPayload semantics. |
| src/lib/TCPSOCKET/tcpsocket.h | Refactors TCPSOCKET into a bridge facade (MSP/CRSF ingress/egress APIs) with internal buffers/bridge helpers. |
| src/lib/TCPSOCKET/tcpsocket.cpp | Implements new TCPSOCKET bridge flow, client lifecycle, and FIFO pumping logic. |
| src/lib/ServoOutput/devServoOutput.cpp | Changes DShot mapping/clamping; defers PWM/DShot init until connection; adjusts lifecycle hooks. |
| src/lib/ServoOutput/DShotRMT.cpp | Adjusts min-throttle encoding behavior in DShot packets. |
| src/lib/SX12xxDriverCommon/SX12xxDriverCommon.h | Replaces “lastSuccessfulPacketRadio” with “strongestReceivingRadio” accessor. |
| src/lib/SX1280Driver/SX1280_hal.cpp | Updates SPI clock divider logic with STM32L432-specific handling and datasheet notes. |
| src/lib/SX1280Driver/SX1280_Regs.h | Removes unused SX1280_MODE_RX enum value. |
| src/lib/SX1280Driver/SX1280.h | Simplifies radio APIs (TXnb/RXnb/SetFrequencyReg/Config signatures). |
| src/lib/SX1280Driver/SX1280.cpp | Implements new SX1280 API semantics (continuous RX, frequency set with optional RX, strongest-radio tracking). |
| src/lib/SX127xDriver/SX127x.h | Simplifies SX127x radio APIs (removes timeout APIs, changes TXnb signature, SetFrequencyReg signature). |
| src/lib/SX127xDriver/SX127x.cpp | Implements new SX127x API semantics (continuous RX, frequency set with optional RX, strongest-radio tracking). |
| src/lib/RFAMP/RFAMP_hal.h | Consolidates TX enable state tracking into a single tx_enabled flag (non-ESP32 path). |
| src/lib/RFAMP/RFAMP_hal.cpp | Updates RFAMP state machine to use consolidated TX enable flag and simplified disable logic. |
| src/lib/PWM/waveform_8266.cpp | Refactors ESP8266 waveform timer logic; adds linker-wrap hooks for PWM stop symbols. |
| src/lib/POWERMGNT/POWERMGNT.cpp | Adds CE/LR1121 sub-GHz power limiting logic and keeps dual-band power handling distinct. |
| src/lib/LUA/tx_devLUA.cpp | Updates CE limit info string (LR1121-specific) and minor formatting. |
| src/lib/LUA/rxtx_devLua.h | Includes LBT header for shared Lua power/options logic. |
| src/lib/LUA/rxtx_devLua.cpp | Adjusts Lua power level strings for CE+LR1121 dual-band representation. |
| src/lib/LUA/rx_devLUA.cpp | Restricts available serial protocols for TARGET_RX_GHOST_ATTO_V1. |
| src/lib/LR1121Driver/LR1121_hal.cpp | Lowers SPI frequency and increases busy-wait timeout for reliability. |
| src/lib/LR1121Driver/LR1121_Regs.h | Removes unused LR1121_MODE_RX; adds experimental firmware command opcodes. |
| src/lib/LR1121Driver/LR1121.h | Adds firmware version struct and firmware update APIs; adjusts Config/TX/RX method signatures. |
| src/lib/LR1121Driver/LR1121.cpp | Adds firmware auto-upgrade/update plumbing, packet/RSSI handling changes, and strongest-radio tracking. |
| src/lib/LQCALC/LQCALC.h | Marks add() as ICACHE_RAM_ATTR for ISR/IRAM placement. |
| src/lib/LED/esp32rgb.cpp | Makes I2S LED write non-blocking and starts I2S only on success. |
| src/lib/LBT/LBT.h | Refactors LBT API surface; provides no-op stubs when CE LBT not enabled. |
| src/lib/LBT/LBT.cpp | Reworks LBT enable/CCA timing/channel-clear checks; adds LR1121 timing and gating logic. |
| src/lib/Handset/PPMHandset.h | Chooses RMT channel for ESP32-C3. |
| src/lib/Handset/PPMHandset.cpp | Constrains PPM pulse width before mapping to CRSF range. |
| src/lib/Handset/CRSFHandset.cpp | Enables autobaud for ESP32-C3 as well as ESP32-S3. |
| src/lib/FHSS/FHSS.cpp | Adjusts LR1121 dual-band domain label for CE; exposes primary-band helper. |
| src/lib/CrsfProtocol/crsf_protocol.h | Adds CRSF min packet length constant; clamps fmap() output to uint16 range. |
| src/lib/CRSF2MSP/msp2crsf.h | Removes global extern for MSP2CROSSFIRE instance. |
| src/lib/CRSF2MSP/crsf2msp.h | Removes global extern for CROSSFIRE2MSP instance. |
| src/lib/CONFIG/config.cpp | Improves PWM channel defaults for I2C/serial pins; changes throttle failsafe default. |
| src/lib/Backpack/devBackpack.cpp | Refactors passthrough uplink selection; changes UART pin selection for passthrough; disables backpack in BLE joystick/WiFi update states. |
| src/include/targets.h | Includes ESP32 UART pin definitions header when building for ESP32. |
| src/include/target/Unified_ESP32_TX.h | Disables OLED/thermal related pin macros for ESP32-C3. |
| src/include/target/FM30_TX.h | Renames DCDC define to USE_HARDWARE_DCDC. |
| src/html/scan.js | Replaces local POST helper with shared postWithFeedback(). |
| src/html/lr1121.js | Adds LR1121 “manual” UI behavior and reset action; improves upload UI flow. |
| src/html/lr1121.html | Adds manual firmware warning panel and includes mui.js. |
| src/html/libs.js | Adds shared postWithFeedback() helper. |
| src/bootloader/sx1280_rx_nano_pcb_v0_5_bootloader.bin | Adds bootloader binary artifact. |
| src/bootloader/sx1280_rx_2020_pcb_v0_2_bootloader.bin | Adds bootloader binary artifact. |
| src/bootloader/src/platformio.ini | Renames bootloader env names to use underscores instead of dots. |
| src/boards/esp8285-8285.json | Removes custom ESP8285 board definition JSON. |
| src/boards/GHOST_ATTO.json | Adjusts max firmware size to reflect smaller available flash. |
| .github/workflows/build.yml | Adds LR1121 release builds for multiple regulatory domain variants and output paths. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+417
to
+423
| crsfCells.p.cell[0] = htobe16(eam.cellL[0] * HOTT_CELL_SCALE); | ||
| crsfCells.p.cell[1] = htobe16(eam.cellL[1] * HOTT_CELL_SCALE); | ||
| crsfCells.p.cell[2] = htobe16(eam.cellL[2] * HOTT_CELL_SCALE); | ||
| crsfCells.p.cell[3] = htobe16(eam.cellL[3] * HOTT_CELL_SCALE); | ||
| crsfCells.p.cell[4] = htobe16(eam.cellL[4] * HOTT_CELL_SCALE); | ||
| crsfCells.p.cell[4] = htobe16(eam.cellL[5] * HOTT_CELL_SCALE); | ||
| crsfCells.p.cell[6] = htobe16(eam.cellL[6] * HOTT_CELL_SCALE); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.