Another big refactoring

This commit is contained in:
Bertrand Songis
2016-08-02 22:15:29 +02:00
parent 52435703a0
commit 7fbd963b3f
140 changed files with 1311 additions and 1292 deletions
+12 -7
View File
@@ -366,7 +366,7 @@ bool isSwitchAvailableInLogicalSwitches(int swtch)
bool isSwitchAvailableInCustomFunctions(int swtch)
{
if (menuHandlers[menuLevel] == menuModelCustomFunctions)
if (menuHandlers[menuLevel] == menuModelSpecialFunctions)
return isSwitchAvailable(swtch, ModelCustomFunctionsContext);
else
return isSwitchAvailable(swtch, GeneralCustomFunctionsContext);
@@ -418,7 +418,7 @@ bool isLogicalSwitchFunctionAvailable(int function)
bool isAssignableFunctionAvailable(int function)
{
#if defined(OVERRIDE_CHANNEL_FUNCTION) || defined(GVARS)
bool modelFunctions = (menuHandlers[menuLevel] == menuModelCustomFunctions);
bool modelFunctions = (menuHandlers[menuLevel] == menuModelSpecialFunctions);
#endif
switch (function) {
@@ -525,21 +525,26 @@ bool isRfProtocolAvailable(int protocol)
#if defined(CPUARM)
bool isTelemetryProtocolAvailable(int protocol)
{
#if defined(PCBTARANIS)
if(protocol == PROTOCOL_FRSKY_D_SECONDARY && g_eeGeneral.serial2Mode != UART_MODE_TELEMETRY)
if (protocol == PROTOCOL_FRSKY_D_SECONDARY && g_eeGeneral.serial2Mode != UART_MODE_TELEMETRY) {
return false;
}
#endif
if (protocol== PROTOCOL_PULSES_CROSSFIRE)
if (protocol== PROTOCOL_PULSES_CROSSFIRE) {
return false;
}
#if !defined(MULTIMODULE)
if (protocol== PROTOCOL_SPEKTRUM)
if (protocol== PROTOCOL_SPEKTRUM) {
return false;
}
#endif
#if defined(PBHORUS)
if (protocol == PROTOCOL_FRSKY_D_SECONDARY)
if (protocol == PROTOCOL_FRSKY_D_SECONDARY) {
return false;
}
#endif
return true;