From: Keith Packard Date: Mon, 28 Oct 2013 07:36:13 +0000 (-0700) Subject: altos: Don't hold GPS mutex while waiting for GPS data in report code X-Git-Tag: 1.2.9.4~19 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=29b48b63305881471d9b97ef3fb236af03cb79f5 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 --- 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)