Compilation fixes
This commit is contained in:
@@ -1181,7 +1181,7 @@ void menuModelSetup(event_t event)
|
||||
CHECK_INCDEC_MODELVAR_ZERO(event, moduleData.channelsStart, 32-8-moduleData.channelsCount);
|
||||
break;
|
||||
case 1:
|
||||
CHECK_INCDEC_MODELVAR_CHECK(event, moduleData.channelsCount, -4, min<int8_t>(maxModuleChannels_M8(moduleIdx), 32-8-moduleData.channelsStart), isInternalModuleChannelCountAvailable);
|
||||
CHECK_INCDEC_MODELVAR_CHECK(event, moduleData.channelsCount, -4, min<int8_t>(maxModuleChannels_M8(moduleIdx), 32-8-moduleData.channelsStart), moduleData.type == MODULE_TYPE_XJT2 ? isPXX2ChannelsCountAllowed : nullptr);
|
||||
if ((k == ITEM_MODEL_EXTERNAL_MODULE_CHANNELS && g_model.moduleData[EXTERNAL_MODULE].type == MODULE_TYPE_PPM)) {
|
||||
SET_DEFAULT_PPM_FRAME_LENGTH(moduleIdx);
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ void onSdManagerMenu(const char * result)
|
||||
}
|
||||
else if (result == STR_FLASH_EXTERNAL_DEVICE) {
|
||||
getSelectionFullPath(lfn);
|
||||
DeviceFirmwareUpdate device(FLASHING_MODULE);
|
||||
DeviceFirmwareUpdate device(SPORT_MODULE);
|
||||
device.flashFile(lfn);
|
||||
}
|
||||
#if defined(LUA)
|
||||
|
||||
@@ -29,7 +29,14 @@ if(SDCARD)
|
||||
${GUI_SRC}
|
||||
../common/stdlcd/radio_sdmanager.cpp
|
||||
../common/stdlcd/radio_tools.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
if(PXX2)
|
||||
set(GUI_SRC
|
||||
${GUI_SRC}
|
||||
../common/stdlcd/radio_spectrum_analyser.cpp
|
||||
../common/stdlcd/radio_power_meter.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
@@ -153,7 +153,7 @@ void onSdManagerMenu(const char * result)
|
||||
}
|
||||
else if (result == STR_FLASH_EXTERNAL_DEVICE) {
|
||||
getSelectionFullPath(lfn);
|
||||
DeviceFirmwareUpdate device(FLASHING_MODULE);
|
||||
DeviceFirmwareUpdate device(SPORT_MODULE);
|
||||
device.flashFile(lfn);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -37,6 +37,8 @@ void menuRadioTools(event_t event)
|
||||
{
|
||||
SIMPLE_MENU("TOOLS", menuTabGeneral, MENU_RADIO_TOOLS, HEADER_LINE + 2);
|
||||
|
||||
#if defined(PXX2)
|
||||
addRadioTool(0, "Spectrum Analyser", menuRadioSpectrumAnalyser, event);
|
||||
addRadioTool(1, "Power Meter", menuRadioPowerMeter, event);
|
||||
#endif
|
||||
}
|
||||
@@ -56,7 +56,7 @@ bool isSwitchAvailableInTimers(int swtch);
|
||||
bool isR9MModeAvailable(int mode);
|
||||
bool isR9ModuleRunning(int module);
|
||||
bool isR9MMFlex(int module);
|
||||
bool isInternalModuleChannelCountAvailable(int module);
|
||||
bool isPXX2ChannelsCountAllowed(int channels);
|
||||
bool isExternalModuleAvailable(int module);
|
||||
bool isInternalModuleAvailable(int module);
|
||||
bool isRfProtocolAvailable(int protocol);
|
||||
|
||||
@@ -515,14 +515,9 @@ bool isR9MMFlex(int module)
|
||||
return g_model.moduleData[module].r9m.region == MODULE_R9M_REGION_FLEX;
|
||||
}
|
||||
|
||||
bool isInternalModuleChannelCountAvailable(int channels)
|
||||
bool isPXX2ChannelsCountAllowed(int channels)
|
||||
{
|
||||
if (g_model.moduleData[INTERNAL_MODULE].type == MODULE_TYPE_XJT2) {
|
||||
if ( channels % 8 != 0)
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return (channels % 8 == 0);
|
||||
}
|
||||
|
||||
bool isInternalModuleAvailable(int module)
|
||||
|
||||
Reference in New Issue
Block a user