From 29b48b63305881471d9b97ef3fb236af03cb79f5 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 28 Oct 2013 00:36:13 -0700 Subject: [PATCH] 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 --- src/core/ao_gps_report_mega.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.30.2