mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-27 16:54:15 +01:00
AHRS: Small bug in the conditions for using the mag
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2157 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
ebcb272da6
commit
e3d2645dea
@ -667,7 +667,7 @@ void process_mag_data()
|
|||||||
HomeLocationData home;
|
HomeLocationData home;
|
||||||
HomeLocationGet(&home);
|
HomeLocationGet(&home);
|
||||||
if (PIOS_HMC5843_NewDataAvailable() &&
|
if (PIOS_HMC5843_NewDataAvailable() &&
|
||||||
(home.Set = HOMELOCATION_SET_TRUE) &&
|
(home.Set == HOMELOCATION_SET_TRUE) &&
|
||||||
((home.Be[0] != 0) || (home.Be[1] != 0) || (home.Be[2] != 0)) &&
|
((home.Be[0] != 0) || (home.Be[1] != 0) || (home.Be[2] != 0)) &&
|
||||||
((float) timer_count() / timer_rate() > 5)) {
|
((float) timer_count() / timer_rate() > 5)) {
|
||||||
PIOS_HMC5843_ReadMag(mag_data.raw.axis);
|
PIOS_HMC5843_ReadMag(mag_data.raw.axis);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user