From: Keith Packard Date: Tue, 14 May 2013 05:32:25 +0000 (-0700) Subject: altos: Provide a define for the number of sat infos in a telem packet X-Git-Tag: 1.2.1~13 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=d2f0dcc73df612d10ed12d364fe661ccd831f037 altos: Provide a define for the number of sat infos in a telem packet 12 fit, but it's best to use a symbolic constant Signed-off-by: Keith Packard --- diff --git a/src/core/ao_telemetry.h b/src/core/ao_telemetry.h index 32a1668c..f2d201de 100644 --- a/src/core/ao_telemetry.h +++ b/src/core/ao_telemetry.h @@ -126,13 +126,15 @@ struct ao_telemetry_satellite_info { uint8_t c_n_1; }; +#define AO_TELEMETRY_SATELLITE_MAX_SAT 12 + struct ao_telemetry_satellite { uint16_t serial; /* 0 */ uint16_t tick; /* 2 */ uint8_t type; /* 4 */ uint8_t channels; /* 5 number of reported sats */ - struct ao_telemetry_satellite_info sats[12]; /* 6 */ + struct ao_telemetry_satellite_info sats[AO_TELEMETRY_SATELLITE_MAX_SAT]; /* 6 */ uint8_t unused[2]; /* 30 */ /* 32 */ };