1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-25 01:05:10 +03:00
This commit is contained in:
Bertrand Songis 2019-11-07 13:39:38 +01:00
parent 9b05060a1a
commit 3f0ce109ad
No known key found for this signature in database
GPG key ID: F189F79290FEC50F
5 changed files with 12 additions and 11 deletions

View file

@ -54,7 +54,7 @@ void menuTraceBuffer(event_t event);
enum MenuRadioIndexes {
MENU_RADIO_SETUP,
MENU_RADIO_SD_MANAGER,
#if defined(LUA) || defined(PXX2)
#if defined(LUA) || defined(PXX2) || defined(MULTIMODULE)
MENU_RADIO_TOOLS,
#endif
MENU_RADIO_SPECIAL_FUNCTIONS,

View file

@ -727,6 +727,9 @@ bool isTrainerModeAvailable(int mode)
#if defined(PCBTARANIS) && !defined(TRAINER_BATTERY_COMPARTMENT)
if (mode == TRAINER_MODE_MASTER_BATTERY_COMPARTMENT)
return false;
#elif defined(PCBTARANIS)
if (mode == TRAINER_MODE_MASTER_BATTERY_COMPARTMENT)
return g_eeGeneral.auxSerialMode == UART_MODE_SBUS_TRAINER;
#endif
#if defined(PCBX9E)

View file

@ -38,7 +38,7 @@
#define HAS_WIRELESS_TRAINER_HARDWARE() (g_eeGeneral.auxSerialMode==UART_MODE_SBUS_TRAINER)
#elif defined(PCBTARANIS)
#define IS_TRAINER_EXTERNAL_MODULE() (g_model.trainerData.mode == TRAINER_MODE_MASTER_SBUS_EXTERNAL_MODULE || g_model.trainerData.mode == TRAINER_MODE_MASTER_CPPM_EXTERNAL_MODULE)
#define HAS_WIRELESS_TRAINER_HARDWARE() (g_eeGeneral.auxSerialMode==UART_MODE_SBUS_TRAINER)
#define HAS_WIRELESS_TRAINER_HARDWARE() (g_eeGeneral.auxSerialMode == UART_MODE_SBUS_TRAINER)
#else
#define IS_TRAINER_EXTERNAL_MODULE() false
#endif

View file

@ -257,9 +257,8 @@ static void processMultiRxChannels(const uint8_t * data, uint8_t len)
uint8_t bitsavailable = 0;
uint8_t byteIdx = 4;
while(ch < maxCh) {
while((bitsavailable < MULTI_CHAN_BITS) && byteIdx < len) {
while (ch < maxCh) {
while (bitsavailable < MULTI_CHAN_BITS && byteIdx < len) {
bits |= (uint32_t)(data[byteIdx++]) << (uint32_t)bitsavailable;
bitsavailable += 8;
}

View file

@ -115,15 +115,14 @@ void checkTrainerSettings()
#if defined(TRAINER_BATTERY_COMPARTMENT)
case TRAINER_MODE_MASTER_BATTERY_COMPARTMENT:
if (g_eeGeneral.auxSerialMode == UART_MODE_SBUS_TRAINER) {
if (g_eeGeneral.auxSerialMode == UART_MODE_SBUS_TRAINER)
auxSerialSbusInit();
else
init_trainer_capture();
break;
}
// no break
#endif
default:
// master is default
case TRAINER_MODE_MASTER_TRAINER_JACK:
init_trainer_capture();
break;
}