mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-28 17:54:15 +01:00
ManualControl: Do not process input channels at all if theres invalid values to prevent flightmode changes due to glitch
This commit is contained in:
parent
fed9d98824
commit
2d3645cb0a
@ -63,7 +63,7 @@
|
|||||||
#define ARMED_TIME_MS 1000
|
#define ARMED_TIME_MS 1000
|
||||||
#define ARMED_THRESHOLD 0.50f
|
#define ARMED_THRESHOLD 0.50f
|
||||||
//safe band to allow a bit of calibration error or trim offset (in microseconds)
|
//safe band to allow a bit of calibration error or trim offset (in microseconds)
|
||||||
#define CONNECTION_OFFSET 150
|
#define CONNECTION_OFFSET 250
|
||||||
|
|
||||||
// Private types
|
// Private types
|
||||||
typedef enum
|
typedef enum
|
||||||
@ -314,7 +314,7 @@ static void manualControlTask(void *parameters)
|
|||||||
AlarmsSet(SYSTEMALARMS_ALARM_MANUALCONTROL, SYSTEMALARMS_ALARM_WARNING);
|
AlarmsSet(SYSTEMALARMS_ALARM_MANUALCONTROL, SYSTEMALARMS_ALARM_WARNING);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else if (valid_input_detected) {
|
||||||
AlarmsClear(SYSTEMALARMS_ALARM_MANUALCONTROL);
|
AlarmsClear(SYSTEMALARMS_ALARM_MANUALCONTROL);
|
||||||
|
|
||||||
// Scale channels to -1 -> +1 range
|
// Scale channels to -1 -> +1 range
|
||||||
|
Loading…
x
Reference in New Issue
Block a user