mirror of
https://github.com/opentx/opentx.git
synced 2025-07-26 01:35:21 +03:00
Reduce RF_PROTO_OFF logic, disable R9M Sport out when internal telemetry is on (#5159)
* Remove most of the special logic associated with RF_PROTO_OFF This simplifies code in many areas since the internal module does not require special handling and also fixes a few bugs with INTERNAL_PPM * Disable R9M sport option if internal module has telemetry * Fix X12s build * Use macros instead of direct comparisions * Fix sport bit sent the wrong way. Rename S.port out to Telemetry * Compile fix
This commit is contained in:
parent
8e84724c62
commit
e16b48db30
29 changed files with 87 additions and 60 deletions
|
@ -55,9 +55,20 @@ void preModelLoad()
|
|||
|
||||
pauseMixerCalculations();
|
||||
}
|
||||
#if defined(PCBTARANIS) || defined(PCBHORUS)
|
||||
static void fixUpModel()
|
||||
{
|
||||
// Ensure that when rfProtocol is RF_PROTO_OFF the type of the module is MODULE_TYPE_NONE
|
||||
if (g_model.moduleData[INTERNAL_MODULE].type == MODULE_TYPE_XJT && g_model.moduleData[INTERNAL_MODULE].rfProtocol == RF_PROTO_OFF)
|
||||
g_model.moduleData[INTERNAL_MODULE].type = MODULE_TYPE_NONE;
|
||||
}
|
||||
#endif
|
||||
|
||||
void postModelLoad(bool alarms)
|
||||
{
|
||||
#if defined(PCBTARANIS) || defined(PCBHORUS)
|
||||
fixUpModel();
|
||||
#endif
|
||||
AUDIO_FLUSH();
|
||||
flightReset(false);
|
||||
|
||||
|
@ -70,6 +81,7 @@ void postModelLoad(bool alarms)
|
|||
resumePulses();
|
||||
}
|
||||
|
||||
|
||||
customFunctionsReset();
|
||||
|
||||
restoreTimers();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue