1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-30 08:24:11 +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:
Corvus Corax 2012-04-17 11:06:08 +02:00
parent fed9d98824
commit 2d3645cb0a

View File

@ -63,7 +63,7 @@
#define ARMED_TIME_MS 1000
#define ARMED_THRESHOLD 0.50f
//safe band to allow a bit of calibration error or trim offset (in microseconds)
#define CONNECTION_OFFSET 150
#define CONNECTION_OFFSET 250
// Private types
typedef enum
@ -314,7 +314,7 @@ static void manualControlTask(void *parameters)
AlarmsSet(SYSTEMALARMS_ALARM_MANUALCONTROL, SYSTEMALARMS_ALARM_WARNING);
}
} else {
} else if (valid_input_detected) {
AlarmsClear(SYSTEMALARMS_ALARM_MANUALCONTROL);
// Scale channels to -1 -> +1 range