diff options
author | Keith Packard <keithp@keithp.com> | 2014-01-24 09:21:46 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2014-01-24 09:21:46 -0800 |
commit | 94be1e3eb9f94a59522743374d02a1f229266931 (patch) | |
tree | ee86d32c67db79e8d9069e3c5450d3facc8d6e2e | |
parent | dd28429405498fca0788ce9c19093898c84b10e5 (diff) |
altos: Tmega Don't try to log info about more than 12 GPS sats
The mega log format has a single packet for GPS info which holds a
maximum of 12 satellites. Bdale managed to get 14 sats in view, which
ended up crashing the ground station software, and also overflowed the
gps_tracking_data structure.
Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r-- | src/core/ao_gps_report_mega.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/ao_gps_report_mega.c b/src/core/ao_gps_report_mega.c index 07a2bc5b..5e3c71bf 100644 --- a/src/core/ao_gps_report_mega.c +++ b/src/core/ao_gps_report_mega.c @@ -70,6 +70,8 @@ ao_gps_report_mega(void) { gps_log.u.gps_sat.sats[i].c_n = gps_tracking_data.sats[c].c_n_1; i++; + if (i >= 12) + break; } gps_log.u.gps_sat.channels = i; ao_log_mega(&gps_log); |