Futaba: T-FHSS Surface and SR left out of AIR builds (#1216)

The serial AIR firmware (MULTI_AIR) no longer fit the 128KB STM32 after
T-FHSS and FrSkyA: 476 bytes over. T-FHSS Surface and SR are surface
sub protocols (cars, boats), so AIR builds keep T-FHSS Air only, as DSM
drops DSMR and DSM2_SFC there: FUTABA_init() invalidates TFHSS and
TFHSS_SR, and their code isn't linked. -1060 bytes, AIR now 120224 of
120808.

Co-authored-by: Raphael Coeffic <1050031+raphaelcoeffic@users.noreply.github.com>
This commit is contained in:
Raphael CoefficandRaphael Coeffic authored and GitHub committed 2026-11-21 16:35:17 +01:00
1 parent 56c286c379
commit eea0a0f3c2
2 files changed
+19 -4

No files matched your search

+18 -3
View File
@@ -590,6 +590,9 @@ static uint16_t __attribute__((unused)) TFHSS_callback()
phase = TFHSS_DATA;
return 1000;
}
#ifdef MULTI_AIR
return TFHSS_air_callback(); // Surface and SR: not in AIR builds
#else
if(sub_protocol == TFHSS_AIR)
return TFHSS_air_callback();
@@ -634,6 +637,7 @@ static uint16_t __attribute__((unused)) TFHSS_callback()
return TFHSS_PERIOD - TFHSS_RX_ON;
}
return TFHSS_PERIOD;
#endif
}
static void __attribute__((unused)) TFHSS_init()
@@ -643,9 +647,13 @@ static void __attribute__((unused)) TFHSS_init()
for(uint8_t i = 0; i < 4; i++)
TFHSS_id[i] = id >> (8 * i);
// Surface: the receiver's ID from the last bind of this model
uint16_t addr = TFHSS_eeprom();
for(uint8_t i = 0; i < 4; i++)
TFHSS_rx_id[i] = sub_protocol == TFHSS_AIR ? 0 : eeprom_read_byte((EE_ADDR)(addr + i));
#ifdef MULTI_AIR
memset(TFHSS_rx_id, 0, 4);
#else
uint16_t addr = TFHSS_eeprom();
for(uint8_t i = 0; i < 4; i++)
TFHSS_rx_id[i] = sub_protocol == TFHSS_AIR ? 0 : eeprom_read_byte((EE_ADDR)(addr + i));
#endif
TFHSS_row = id % TFHSS_CHANNELS;
TFHSS_rx_known = false;
TFHSS_misses = 0;
@@ -686,6 +694,13 @@ uint16_t FUTABA_callback()
void FUTABA_init()
{
#ifdef MULTI_AIR
if(sub_protocol == TFHSS || sub_protocol == TFHSS_SR)
{ // Surface sub protocols: SURFACE and full builds only (space)
SUB_PROTO_INVALID;
return;
}
#endif
if(sub_protocol == SFHSS)
SFHSS_init();
else
+1 -1
View File
@@ -1175,7 +1175,7 @@ Settings include:
* setting failsafe values
## Futaba - *21*
Also called SFHSS depending on radio version. Sub protocols S-FHSS, T-FHSS (Surface), T-FHSS SR and T-FHSS Air. The T-FHSS sub protocols are only available on the 128KB STM32 modules.
Also called SFHSS depending on radio version. Sub protocols S-FHSS, T-FHSS (Surface), T-FHSS SR and T-FHSS Air. The T-FHSS sub protocols are only available on the 128KB STM32 modules, and the AIR firmwares only have T-FHSS Air (TFHSS and TFHSS_SR are surface sub protocols).
### Sub_protocol SFHSS - *0*
Models: Futaba SFHSS RXs and some XK models.