summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-10-28 00:36:13 -0700
committerKeith Packard <keithp@keithp.com>2013-10-28 00:36:13 -0700
commit29b48b63305881471d9b97ef3fb236af03cb79f5 (patch)
treee10316d81edfe4b25e80a6f8b8fcdfda527952dc /src
parentd3628bd2dd3612065792aef6c7ae5bc967b4f081 (diff)
altos: Don't hold GPS mutex while waiting for GPS data in report code
Oops. This kinda breaks anyone else waiting for GPS data Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src')
-rw-r--r--src/core/ao_gps_report_mega.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/ao_gps_report_mega.c b/src/core/ao_gps_report_mega.c
index e2adbfbc..a66068ab 100644
--- a/src/core/ao_gps_report_mega.c
+++ b/src/core/ao_gps_report_mega.c
@@ -29,9 +29,9 @@ ao_gps_report_mega(void)
uint8_t c, n, i;
for (;;) {
- ao_mutex_get(&ao_gps_mutex);
while (!(new = ao_gps_new))
ao_sleep(&ao_gps_new);
+ ao_mutex_get(&ao_gps_mutex);
if (new & AO_GPS_NEW_DATA)
ao_xmemcpy(&gps_data, &ao_gps_data, sizeof (ao_gps_data));
if (new & AO_GPS_NEW_TRACKING)