fix(B&W): Include gvars in input sources (#3102)
This commit is contained in:
@@ -300,6 +300,9 @@ bool isSourceAvailableInInputs(int source)
|
|||||||
return isTelemetryFieldAvailable(qr.quot) && isTelemetryFieldComparisonAvailable(qr.quot);
|
return isTelemetryFieldAvailable(qr.quot) && isTelemetryFieldComparisonAvailable(qr.quot);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (source >= MIXSRC_FIRST_GVAR && source <= MIXSRC_LAST_GVAR)
|
||||||
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -400,7 +403,7 @@ bool isSerialModeAvailable(uint8_t port_nr, int mode)
|
|||||||
if (port_nr == SP_VCP && mode == UART_MODE_NONE && isInternalModuleCrossfire())
|
if (port_nr == SP_VCP && mode == UART_MODE_NONE && isInternalModuleCrossfire())
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (mode == UART_MODE_NONE)
|
if (mode == UART_MODE_NONE)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
@@ -440,7 +443,7 @@ bool isSerialModeAvailable(uint8_t port_nr, int mode)
|
|||||||
if (mode == UART_MODE_EXT_MODULE && port_nr != SP_AUX1)
|
if (mode == UART_MODE_EXT_MODULE && port_nr != SP_AUX1)
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(LUA)
|
#if !defined(LUA)
|
||||||
if (mode == UART_MODE_LUA)
|
if (mode == UART_MODE_LUA)
|
||||||
return false;
|
return false;
|
||||||
@@ -452,7 +455,7 @@ bool isSerialModeAvailable(uint8_t port_nr, int mode)
|
|||||||
(mode == UART_MODE_TELEMETRY || mode == UART_MODE_SBUS_TRAINER))
|
(mode == UART_MODE_TELEMETRY || mode == UART_MODE_SBUS_TRAINER))
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
auto p = hasSerialMode(mode);
|
auto p = hasSerialMode(mode);
|
||||||
if (p >= 0 && p != port_nr) return false;
|
if (p >= 0 && p != port_nr) return false;
|
||||||
return true;
|
return true;
|
||||||
@@ -733,7 +736,7 @@ bool isModuleUsingSport(uint8_t moduleBay, uint8_t moduleType)
|
|||||||
if (moduleBay == INTERNAL_MODULE)
|
if (moduleBay == INTERNAL_MODULE)
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -776,7 +779,7 @@ bool isInternalModuleSupported(int moduleType)
|
|||||||
bool isInternalModuleAvailable(int moduleType)
|
bool isInternalModuleAvailable(int moduleType)
|
||||||
{
|
{
|
||||||
#if defined(MUTUALLY_EXCLUSIVE_MODULES)
|
#if defined(MUTUALLY_EXCLUSIVE_MODULES)
|
||||||
if (!isModuleNone(EXTERNAL_MODULE))
|
if (!isModuleNone(EXTERNAL_MODULE))
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -821,7 +824,7 @@ bool isExternalModuleAvailable(int moduleType)
|
|||||||
{
|
{
|
||||||
|
|
||||||
#if defined(MUTUALLY_EXCLUSIVE_MODULES)
|
#if defined(MUTUALLY_EXCLUSIVE_MODULES)
|
||||||
if (!isModuleNone(INTERNAL_MODULE))
|
if (!isModuleNone(INTERNAL_MODULE))
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -1035,7 +1038,7 @@ bool isTrainerModeAvailable(int mode)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(MULTIMODULE) || !defined(HARDWARE_INTERNAL_MODULE) || !defined(HARDWARE_EXTERNAL_MODULE)
|
#if !defined(MULTIMODULE) || !defined(HARDWARE_INTERNAL_MODULE) || !defined(HARDWARE_EXTERNAL_MODULE)
|
||||||
if (mode == TRAINER_MODE_MULTI)
|
if (mode == TRAINER_MODE_MULTI)
|
||||||
return false;
|
return false;
|
||||||
#else
|
#else
|
||||||
if (mode == TRAINER_MODE_MULTI &&
|
if (mode == TRAINER_MODE_MULTI &&
|
||||||
|
|||||||
Reference in New Issue
Block a user