fw-autotune: detect and limit amplitude of ID maneuver

Increases signal ampltiude on a 1Hz sin input until a target rate (R/P/Y = 0.8/0.5/0.5 rad/s) is reached. Identification signal is then scaled with this ampltitude instead of the user-defined parameter.
This commit is contained in:
mahima-yoga
2025-09-24 15:41:39 +02:00
committed by Mahima Yoga
parent 97a97991c1
commit 614e15d5f4
5 changed files with 248 additions and 67 deletions

View File

@@ -19,17 +19,20 @@ float32 y_filt
uint8 STATE_IDLE = 0
uint8 STATE_INIT = 1
uint8 STATE_ROLL = 2
uint8 STATE_ROLL_PAUSE = 3
uint8 STATE_PITCH = 4
uint8 STATE_PITCH_PAUSE = 5
uint8 STATE_YAW = 6
uint8 STATE_YAW_PAUSE = 7
uint8 STATE_VERIFICATION = 8
uint8 STATE_APPLY = 9
uint8 STATE_TEST = 10
uint8 STATE_COMPLETE = 11
uint8 STATE_FAIL = 12
uint8 STATE_WAIT_FOR_DISARM = 13
uint8 STATE_ROLL_AMPLITUDE_DETECTION = 2
uint8 STATE_ROLL = 3
uint8 STATE_ROLL_PAUSE = 4
uint8 STATE_PITCH_AMPLITUDE_DETECTION = 5
uint8 STATE_PITCH = 6
uint8 STATE_PITCH_PAUSE = 7
uint8 STATE_YAW_AMPLITUDE_DETECTION = 8
uint8 STATE_YAW = 9
uint8 STATE_YAW_PAUSE = 10
uint8 STATE_VERIFICATION = 11
uint8 STATE_APPLY = 12
uint8 STATE_TEST = 13
uint8 STATE_COMPLETE = 14
uint8 STATE_FAIL = 15
uint8 STATE_WAIT_FOR_DISARM = 16
uint8 state