projects
/
fw
/
altos
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
d3628bd
)
altos: Don't hold GPS mutex while waiting for GPS data in report code
author
Keith Packard
<keithp@keithp.com>
Mon, 28 Oct 2013 07:36:13 +0000
(
00:36
-0700)
committer
Keith Packard
<keithp@keithp.com>
Mon, 28 Oct 2013 07:36:13 +0000
(
00:36
-0700)
Oops. This kinda breaks anyone else waiting for GPS data
Signed-off-by: Keith Packard <keithp@keithp.com>
src/core/ao_gps_report_mega.c
patch
|
blob
|
history
diff --git
a/src/core/ao_gps_report_mega.c
b/src/core/ao_gps_report_mega.c
index e2adbfbc90b38563ccfbf0f5dab57b911b077b69..a66068abfd3f6febc6a041212eddd2a4e4af162e 100644
(file)
--- 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)