altos: Provide a define for the number of sat infos in a telem packet
authorKeith Packard <keithp@keithp.com>
Tue, 14 May 2013 05:32:25 +0000 (22:32 -0700)
committerKeith Packard <keithp@keithp.com>
Tue, 14 May 2013 05:32:25 +0000 (22:32 -0700)
12 fit, but it's best to use a symbolic constant

Signed-off-by: Keith Packard <keithp@keithp.com>
src/core/ao_telemetry.h

index 32a1668ce8628a7a3fdbeb977f9dff74d28bd7f5..f2d201ded4fc7614d048899313d3a8fc7ca32372 100644 (file)
@@ -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 */
 };