[128x64] Telemetry item handling in Reset SF
This commit is contained in:
@@ -176,8 +176,16 @@ void menuSpecialFunctions(event_t event, CustomFunctionData * functions, CustomF
|
|||||||
uint8_t val_max = 255;
|
uint8_t val_max = 255;
|
||||||
#endif
|
#endif
|
||||||
if (func == FUNC_RESET) {
|
if (func == FUNC_RESET) {
|
||||||
val_max = FUNC_RESET_PARAM_LAST;
|
val_max = FUNC_RESET_PARAM_FIRST_TELEM+lastUsedTelemetryIndex();
|
||||||
lcdDrawTextAtIndex(MODEL_SPECIAL_FUNC_3RD_COLUMN, y, STR_VFSWRESET, CFN_PARAM(cfn), attr);
|
int param = CFN_PARAM(cfn);
|
||||||
|
if (param < FUNC_RESET_PARAM_FIRST_TELEM) {
|
||||||
|
lcdDrawTextAtIndex(MODEL_SPECIAL_FUNC_3RD_COLUMN, y, STR_VFSWRESET, param, attr);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
TelemetrySensor * sensor = & g_model.telemetrySensors[param-FUNC_RESET_PARAM_FIRST_TELEM];
|
||||||
|
lcdDrawSizedText(MODEL_SPECIAL_FUNC_3RD_COLUMN, y, sensor->label, TELEM_LABEL_LEN, attr|ZCHAR);
|
||||||
|
}
|
||||||
|
if (active) INCDEC_ENABLE_CHECK(functionsContext == &globalFunctionsContext ? isSourceAvailableInGlobalResetSpecialFunction : isSourceAvailableInResetSpecialFunction);
|
||||||
}
|
}
|
||||||
#if defined(OVERRIDE_CHANNEL_FUNCTION)
|
#if defined(OVERRIDE_CHANNEL_FUNCTION)
|
||||||
else if (func == FUNC_OVERRIDE_CHANNEL) {
|
else if (func == FUNC_OVERRIDE_CHANNEL) {
|
||||||
|
|||||||
Reference in New Issue
Block a user