From 032f61e4b151346bf51e78cc2e0e037be2ad4c3a Mon Sep 17 00:00:00 2001 From: "Pawel Spychalski (DzikuVx)" Date: Mon, 15 Apr 2024 21:30:39 +0200 Subject: [PATCH] enforce rx auto smoothing in ez tune --- .vscode/tasks.json | 8 ++++---- src/main/flight/ez_tune.c | 5 +++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 3ca90b787d3..7be2cd3d176 100755 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -4,9 +4,9 @@ "version": "2.0.0", "tasks": [ { - "label": "Build Matek F722-SE", + "label": "Build AOCODARCH7DUAL", "type": "shell", - "command": "make MATEKF722SE", + "command": "make AOCODARCH7DUAL", "group": "build", "problemMatcher": [], "options": { @@ -14,9 +14,9 @@ } }, { - "label": "Build Matek F722", + "label": "Build AOCODARCH7DUAL", "type": "shell", - "command": "make MATEKF722", + "command": "make AOCODARCH7DUAL", "group": { "kind": "build", "isDefault": true diff --git a/src/main/flight/ez_tune.c b/src/main/flight/ez_tune.c index 128a108ccb0..050ad0735d9 100644 --- a/src/main/flight/ez_tune.c +++ b/src/main/flight/ez_tune.c @@ -34,6 +34,8 @@ #include "sensors/gyro.h" #include "fc/controlrate_profile.h" +#include "rx/rx.h" + PG_REGISTER_PROFILE_WITH_RESET_TEMPLATE(ezTuneSettings_t, ezTune, PG_EZ_TUNE, 0); PG_RESET_TEMPLATE(ezTuneSettings_t, ezTune, @@ -70,6 +72,9 @@ static float getYawPidScale(float input) { void ezTuneUpdate(void) { if (ezTune()->enabled) { + //Enforce RC auto smoothing + rxConfigMutable()->autoSmooth = 1; + // Setup filtering //Set Dterm LPF pidProfileMutable()->dterm_lpf_hz = MAX(ezTune()->filterHz - 5, 50);