From d91e998a43e6a2ea59903bc1481b99906dd522ac Mon Sep 17 00:00:00 2001 From: killerdevildog Date: Mon, 16 Mar 2026 19:26:30 -0600 Subject: [PATCH] fix: add missing break in SX1280 switch case The RADIO_SX1280 case was missing a break statement, causing it to fall through to the default case. This overwrote the SX1280 RadioHal with an SX1268 RadioHal, leaked the SX1280 object, and used the wrong radio module. All boards configured for SX1280 (e.g. LilyGo T3S3 2.4GHz) were silently running with an SX1268 driver, which would fail to initialize or behave incorrectly on the 2.4GHz radio hardware. --- tinyGS/src/Radio/Radio.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tinyGS/src/Radio/Radio.cpp b/tinyGS/src/Radio/Radio.cpp index a3cae365..1e265aa7 100644 --- a/tinyGS/src/Radio/Radio.cpp +++ b/tinyGS/src/Radio/Radio.cpp @@ -88,6 +88,7 @@ void Radio::init() case RADIO_SX1280: radioHal = new RadioHal(new Module(board.L_NSS, board.L_DI01, board.L_RST, board.L_BUSSY, spi, SPISettings(2000000, MSBFIRST, SPI_MODE0))); moduleNameString="SX1280"; + break; default: radioHal = new RadioHal(new Module(board.L_NSS, board.L_DI01, board.L_RST, board.L_BUSSY, spi, SPISettings(2000000, MSBFIRST, SPI_MODE0))); moduleNameString="default SX1268";