Telemetry sources removed from the Reset Global Function
This commit is contained in:
@@ -663,7 +663,7 @@ void CustomFunctionsPanel::populateFuncParamCB(QComboBox *b, uint function, unsi
|
||||
}
|
||||
if (IS_ARM(firmware->getBoard())) {
|
||||
for (int i=0; i<C9X_MAX_SENSORS; ++i) {
|
||||
if (model->sensorData[i].isAvailable()) {
|
||||
if (model && model->sensorData[i].isAvailable()) {
|
||||
RawSource item = RawSource(SOURCE_TYPE_TELEMETRY, 3*i);
|
||||
qs.append(item.toString(model));
|
||||
}
|
||||
|
||||
@@ -353,7 +353,15 @@ bool isAssignableFunctionAvailable(int function)
|
||||
}
|
||||
}
|
||||
|
||||
bool isAvailableInResetSpecialFunction(int index)
|
||||
bool isSourceAvailableInGlobalResetSpecialFunction(int index)
|
||||
{
|
||||
if (index >= FUNC_RESET_PARAM_FIRST_TELEM)
|
||||
return false;
|
||||
else
|
||||
return isSourceAvailableInResetSpecialFunction(index);
|
||||
}
|
||||
|
||||
bool isSourceAvailableInResetSpecialFunction(int index)
|
||||
{
|
||||
if (index >= FUNC_RESET_PARAM_FIRST_TELEM) {
|
||||
TelemetrySensor & telemetrySensor = g_model.telemetrySensors[index-FUNC_RESET_PARAM_FIRST_TELEM];
|
||||
|
||||
@@ -231,7 +231,7 @@ void menuCustomFunctions(uint8_t event, CustomFunctionData * functions, CustomFu
|
||||
TelemetrySensor * sensor = & g_model.telemetrySensors[param-FUNC_RESET_PARAM_FIRST_TELEM];
|
||||
lcd_putsnAtt(MODEL_CUSTOM_FUNC_3RD_COLUMN, y, sensor->label, TELEM_LABEL_LEN, attr|ZCHAR);
|
||||
}
|
||||
INCDEC_ENABLE_CHECK(isAvailableInResetSpecialFunction);
|
||||
INCDEC_ENABLE_CHECK(functionsContext == &globalFunctionsContext ? isSourceAvailableInGlobalResetSpecialFunction : isSourceAvailableInResetSpecialFunction);
|
||||
}
|
||||
#if defined(OVERRIDE_CHANNEL_FUNCTION)
|
||||
else if (func == FUNC_OVERRIDE_CHANNEL) {
|
||||
|
||||
@@ -196,7 +196,8 @@ int8_t checkIncDecMovedSwitch(int8_t val);
|
||||
bool isThrottleSourceAvailable(int source);
|
||||
bool isLogicalSwitchFunctionAvailable(int function);
|
||||
bool isAssignableFunctionAvailable(int function);
|
||||
bool isAvailableInResetSpecialFunction(int index);
|
||||
bool isSourceAvailableInResetSpecialFunction(int index);
|
||||
bool isSourceAvailableInGlobalResetSpecialFunction(int index);
|
||||
bool isLogicalSwitchAvailable(int index);
|
||||
bool isSwitchAvailableInLogicalSwitches(int swtch);
|
||||
bool isSwitchAvailableInCustomFunctions(int swtch);
|
||||
|
||||
Reference in New Issue
Block a user