Make failsafe configurable using parameters

SF_RC_LOSS_TIME - time without rc to activate failsafe.
SD_DESCEND_TIME - total time to decrease the throttle to zero.
Make controlTime nan on the start to simplify the logic.
This commit is contained in:
Oleg Kalachev
2026-01-22 23:57:52 +03:00
parent 0abb18c616
commit 6d01cd2e79
3 changed files with 10 additions and 7 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ float channelMax[16]; // calibration max values
float controlRoll, controlPitch, controlYaw, controlThrottle; // pilot's inputs, range [-1, 1]
float controlMode = NAN;
float controlTime; // time of the last controls update (0 when no RC)
float controlTime = NAN; // time of the last controls update
// Channels mapping (nan means not assigned):
float rollChannel = NAN, pitchChannel = NAN, throttleChannel = NAN, yawChannel = NAN, modeChannel = NAN;