mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
In the attitude loop need to check all the queues even if unused or the event
system will have warnings
This commit is contained in:
parent
3bb571a1a7
commit
02bec750bd
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
[submodule "overo"]
|
||||
path = overo
|
||||
url = git@github.com:peabody124/op_overo.git
|
@ -234,6 +234,12 @@ static int32_t updateAttitudeComplimentary(bool first_run)
|
||||
AlarmsSet(SYSTEMALARMS_ALARM_ATTITUDE,SYSTEMALARMS_ALARM_WARNING);
|
||||
return -1;
|
||||
}
|
||||
if ( xQueueReceive(accelQueue, &ev, 0) != pdTRUE )
|
||||
{
|
||||
// When one of these is updated so should the other
|
||||
AlarmsSet(SYSTEMALARMS_ALARM_ATTITUDE,SYSTEMALARMS_ALARM_WARNING);
|
||||
return -1;
|
||||
}
|
||||
|
||||
// During initialization and
|
||||
FlightStatusData flightStatus;
|
||||
@ -290,7 +296,8 @@ static int32_t updateAttitudeComplimentary(bool first_run)
|
||||
accel_err[1] /= accel_mag;
|
||||
accel_err[2] /= accel_mag;
|
||||
|
||||
if (1) {
|
||||
if ( xQueueReceive(magQueue, &ev, 0) != pdTRUE )
|
||||
{
|
||||
// Rotate gravity to body frame and cross with accels
|
||||
float brot[3];
|
||||
float Rbe[3][3];
|
||||
@ -378,6 +385,14 @@ static int32_t updateAttitudeComplimentary(bool first_run)
|
||||
|
||||
AttitudeActualSet(&attitudeActual);
|
||||
|
||||
// Flush these queues for avoid errors
|
||||
if ( xQueueReceive(baroQueue, &ev, 0) != pdTRUE )
|
||||
{
|
||||
}
|
||||
if ( xQueueReceive(gpsQueue, &ev, 0) != pdTRUE )
|
||||
{
|
||||
}
|
||||
|
||||
AlarmsClear(SYSTEMALARMS_ALARM_ATTITUDE);
|
||||
|
||||
return 0;
|
||||
|
1
overo
Submodule
1
overo
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 76d03ac32f28cd26fa76be2a9b8af489e3b872fc
|
Loading…
x
Reference in New Issue
Block a user