feat: add "Trims" option to Reset special function (#5278)

Co-authored-by: elecpower <elecpower@users.noreply.github.com>
This commit is contained in:
3djc
2024-07-28 11:45:03 +10:00
committed by GitHub
co-authored by elecpower
parent 62d2cf3764
commit 2638c6d229
24 changed files with 78 additions and 34 deletions
+7
View File
@@ -215,6 +215,13 @@ void evalFunctions(const CustomFunctionData * functions, CustomFunctionsContext
case FUNC_RESET_TELEMETRY:
telemetryReset();
break;
case FUNC_RESET_TRIMS: {
for (uint8_t i = 0; i < keysGetMaxTrims(); i++) {
setTrimValue(mixerCurrentFlightMode, i, 0);
}
break;
}
}
if (CFN_PARAM(cfn) >= FUNC_RESET_PARAM_FIRST_TELEM) {
uint8_t item = CFN_PARAM(cfn) - FUNC_RESET_PARAM_FIRST_TELEM;