mirror of
https://github.com/opentx/opentx.git
synced 2025-07-25 01:05:10 +03:00
Companion bugfixes
This commit is contained in:
parent
96ddda7bef
commit
ef15ccf321
4 changed files with 12 additions and 5 deletions
|
@ -37,7 +37,7 @@
|
|||
#define AUDIO
|
||||
#define VOICE
|
||||
#define HAPTIC
|
||||
#define PXX
|
||||
// #define PXX
|
||||
#define DSM2
|
||||
#define DSM2_PPM
|
||||
#define DBLKEYS
|
||||
|
|
|
@ -741,9 +741,9 @@ int OpenTxEepromInterface::isAvailable(Protocol proto, int port)
|
|||
case 0:
|
||||
switch (proto) {
|
||||
case PPM:
|
||||
case PXX_XJT_X16:
|
||||
case PXX_XJT_D8:
|
||||
case PXX_XJT_LR12:
|
||||
// case PXX_XJT_X16:
|
||||
// case PXX_XJT_D8:
|
||||
// case PXX_XJT_LR12:
|
||||
case LP45:
|
||||
case DSM2:
|
||||
case DSMX:
|
||||
|
|
|
@ -1390,7 +1390,7 @@ void menuModelSetup(uint8_t event)
|
|||
case ITEM_MODEL_EXTERNAL_MODULE_MODE:
|
||||
lcd_putsLeft(y, STR_MODE);
|
||||
lcd_putsiAtt(MODEL_SETUP_2ND_COLUMN, y, STR_TARANIS_PROTOCOLS, g_model.externalModule, m_posHorz==0 ? attr : 0);
|
||||
if (g_model.externalModule == MODULE_TYPE_XJT)
|
||||
if (IS_MODULE_XJT(EXTERNAL_MODULE))
|
||||
lcd_putsiAtt(MODEL_SETUP_2ND_COLUMN+5*FW, y, STR_XJT_PROTOCOLS, 1+g_model.moduleData[EXTERNAL_MODULE].rfProtocol, m_posHorz==1 ? attr : 0);
|
||||
else if (IS_MODULE_DSM2(EXTERNAL_MODULE))
|
||||
lcd_putsiAtt(MODEL_SETUP_2ND_COLUMN+5*FW, y, STR_DSM_PROTOCOLS, g_model.moduleData[EXTERNAL_MODULE].rfProtocol, m_posHorz==1 ? attr : 0);
|
||||
|
@ -1399,6 +1399,7 @@ void menuModelSetup(uint8_t event)
|
|||
case 0:
|
||||
g_model.externalModule = checkIncDec(event, g_model.externalModule, MODULE_TYPE_NONE, MODULE_TYPE_COUNT-1, EE_MODEL, isModuleAvailable);
|
||||
if (checkIncDec_Ret) {
|
||||
g_model.moduleData[EXTERNAL_MODULE].rfProtocol = 0;
|
||||
g_model.moduleData[EXTERNAL_MODULE].channelsStart = 0;
|
||||
if (g_model.externalModule == MODULE_TYPE_PPM)
|
||||
g_model.moduleData[EXTERNAL_MODULE].channelsCount = 0;
|
||||
|
|
|
@ -1576,10 +1576,16 @@ bool isAssignableFunctionAvailable(int function)
|
|||
|
||||
bool isModuleAvailable(int module)
|
||||
{
|
||||
#if defined(PCBSKY9X)
|
||||
if (module == MODULE_TYPE_NONE)
|
||||
return false;
|
||||
#endif
|
||||
|
||||
#if !defined(PXX)
|
||||
if (module == MODULE_TYPE_XJT)
|
||||
return false;
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue