5c150abcefac88a4fb2dc4444d01d4b8a9c0e190
[fw/altos] / src / kernel / ao_log.h
1 /*
2  * Copyright © 2012 Keith Packard <keithp@keithp.com>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful, but
10  * WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
17  */
18
19 #ifndef _AO_LOG_H_
20 #define _AO_LOG_H_
21
22 #include <ao_flight.h>
23
24 /*
25  * ao_log.c
26  */
27
28 /* We record flight numbers in the first record of
29  * the log. Tasks may wait for this to be initialized
30  * by sleeping on this variable.
31  */
32 extern int16_t ao_flight_number;
33 extern uint8_t  ao_log_mutex;
34 extern uint32_t ao_log_current_pos;
35 extern uint32_t ao_log_end_pos;
36 extern uint32_t ao_log_start_pos;
37 extern uint8_t  ao_log_running;
38 extern enum ao_flight_state ao_log_state;
39
40 /* required functions from the underlying log system */
41
42 #define AO_LOG_FORMAT_UNKNOWN           0       /* unknown; altosui will have to guess */
43 #define AO_LOG_FORMAT_FULL              1       /* 8 byte typed log records */
44 #define AO_LOG_FORMAT_TINY              2       /* two byte state/baro records */
45 #define AO_LOG_FORMAT_TELEMETRY         3       /* 32 byte ao_telemetry records */
46 #define AO_LOG_FORMAT_TELESCIENCE       4       /* 32 byte typed telescience records */
47 #define AO_LOG_FORMAT_TELEMEGA_OLD      5       /* 32 byte typed telemega records */
48 #define AO_LOG_FORMAT_EASYMINI1         6       /* 16-byte MS5607 baro only, 3.0V supply */
49 #define AO_LOG_FORMAT_TELEMETRUM        7       /* 16-byte typed telemetrum records */
50 #define AO_LOG_FORMAT_TELEMINI2         8       /* 16-byte MS5607 baro only, 3.3V supply, cc1111 SoC */
51 #define AO_LOG_FORMAT_TELEGPS           9       /* 32 byte telegps records */
52 #define AO_LOG_FORMAT_TELEMEGA          10      /* 32 byte typed telemega records with 32 bit gyro cal */
53 #define AO_LOG_FORMAT_DETHERM           11      /* 16-byte MS5607 baro only, no ADC */
54 #define AO_LOG_FORMAT_TELEMINI3         12      /* 16-byte MS5607 baro only, 3.3V supply, stm32f042 SoC */
55 #define AO_LOG_FORMAT_TELEFIRETWO       13      /* 32-byte test stand data */
56 #define AO_LOG_FORMAT_EASYMINI2         14      /* 16-byte MS5607 baro only, 3.3V supply, stm32f042 SoC */
57 #define AO_LOG_FORMAT_TELEMEGA_3        15      /* 32 byte typed telemega records with 32 bit gyro cal and mpu9250 */
58 #define AO_LOG_FORMAT_EASYMEGA_2        16      /* 32 byte typed telemega records with 32 bit gyro cal, mpu9250 rotated 90° and adxl375 */
59 #define AO_LOG_FORMAT_TELESTATIC        17      /* 32 byte typed telestatic records */
60 #define AO_LOG_FORMAT_MICROPEAK2        18      /* 2-byte baro values with header */
61 #define AO_LOG_FORMAT_TELEMEGA_4        19      /* 32 byte typed telemega records with 32 bit gyro cal and Bmx160 */
62 #define AO_LOG_FORMAT_EASYMOTOR         20      /* ? byte typed easymotor records with pressure sensor and adxl375 */
63 #define AO_LOG_FORMAT_NONE              127     /* No log at all */
64
65 /* Return the flight number from the given log slot, 0 if none, -slot on failure */
66
67 int16_t
68 ao_log_flight(uint8_t slot);
69
70 /* Checksum the loaded log record */
71 uint8_t
72 ao_log_check_data(void);
73
74 /* Check to see if the loaded log record is empty */
75 uint8_t
76 ao_log_check_clear(void);
77
78 /* Check if there is valid log data at the specified location */
79 #define AO_LOG_VALID    1
80 #define AO_LOG_EMPTY    0
81 #define AO_LOG_INVALID  -1
82
83 int8_t
84 ao_log_check(uint32_t pos);
85
86 /* Flush the log */
87 void
88 ao_log_flush(void);
89
90 /* Logging thread main routine */
91 void
92 ao_log(void);
93
94 /* functions provided in ao_log.c */
95
96 /* Figure out the current flight number */
97 uint8_t
98 ao_log_scan(void);
99
100 /* Start logging to eeprom */
101 void
102 ao_log_start(void);
103
104 /* Stop logging */
105 void
106 ao_log_stop(void);
107
108 /* Initialize the logging system */
109 void
110 ao_log_init(void);
111
112 /* Write out the current flight number to the erase log */
113 void
114 ao_log_write_erase(uint8_t pos);
115
116 /* Returns true if there are any logs stored in eeprom */
117 uint8_t
118 ao_log_present(void);
119
120 /* Returns true if there is no more storage space available */
121 uint8_t
122 ao_log_full(void);
123
124 /*
125  * ao_log_big.c
126  */
127
128 /*
129  * The data log is recorded in the eeprom as a sequence
130  * of data packets.
131  *
132  * Each packet starts with a 4-byte header that has the
133  * packet type, the packet checksum and the tick count. Then
134  * they all contain 2 16 bit values which hold packet-specific
135  * data.
136  *
137  * For each flight, the first packet
138  * is FLIGHT packet, indicating the serial number of the
139  * device and a unique number marking the number of flights
140  * recorded by this device.
141  *
142  * During flight, data from the accelerometer and barometer
143  * are recorded in SENSOR packets, using the raw 16-bit values
144  * read from the A/D converter.
145  *
146  * Also during flight, but at a lower rate, the deployment
147  * sensors are recorded in DEPLOY packets. The goal here is to
148  * detect failure in the deployment circuits.
149  *
150  * STATE packets hold state transitions as the flight computer
151  * transitions through different stages of the flight.
152  */
153 #define AO_LOG_FLIGHT           'F'
154 #define AO_LOG_SENSOR           'A'
155 #define AO_LOG_TEMP_VOLT        'T'
156 #define AO_LOG_DEPLOY           'D'
157 #define AO_LOG_STATE            'S'
158 #define AO_LOG_GPS_TIME         'G'
159 #define AO_LOG_GPS_LAT          'N'
160 #define AO_LOG_GPS_LON          'W'
161 #define AO_LOG_GPS_ALT          'H'
162 #define AO_LOG_GPS_SAT          'V'
163 #define AO_LOG_GPS_DATE         'Y'
164 #define AO_LOG_GPS_POS          'P'
165
166 #define AO_LOG_POS_NONE         (~0UL)
167
168 struct ao_log_record {
169         char                    type;                           /* 0 */
170         uint8_t                 csum;                           /* 1 */
171         uint16_t                tick;                           /* 2 */
172         union {
173                 struct {
174                         int16_t         ground_accel;           /* 4 */
175                         uint16_t        flight;                 /* 6 */
176                 } flight;
177                 struct {
178                         int16_t         accel;                  /* 4 */
179                         int16_t         pres;                   /* 6 */
180                 } sensor;
181                 struct {
182                         int16_t         temp;
183                         int16_t         v_batt;
184                 } temp_volt;
185                 struct {
186                         int16_t         drogue;
187                         int16_t         main;
188                 } deploy;
189                 struct {
190                         uint16_t        state;
191                         uint16_t        reason;
192                 } state;
193                 struct {
194                         uint8_t         hour;
195                         uint8_t         minute;
196                         uint8_t         second;
197                         uint8_t         flags;
198                 } gps_time;
199                 int32_t         gps_latitude;
200                 int32_t         gps_longitude;
201                 struct {
202                         uint16_t        altitude_low;
203                         int16_t         altitude_high;
204                 } gps_altitude;
205                 struct {
206                         uint16_t        svid;
207                         uint8_t         unused;
208                         uint8_t         c_n;
209                 } gps_sat;
210                 struct {
211                         uint8_t         year;
212                         uint8_t         month;
213                         uint8_t         day;
214                         uint8_t         extra;
215                 } gps_date;
216                 struct {
217                         uint16_t        d0;
218                         uint16_t        d1;
219                 } anon;
220         } u;
221 };
222
223 struct ao_log_mega {
224         char                    type;                   /* 0 */
225         uint8_t                 csum;                   /* 1 */
226         uint16_t                tick;                   /* 2 */
227         union {                                         /* 4 */
228                 /* AO_LOG_FLIGHT */
229                 struct {
230                         uint16_t        flight;                 /* 4 */
231                         int16_t         ground_accel;           /* 6 */
232                         uint32_t        ground_pres;            /* 8 */
233                         int16_t         ground_accel_along;     /* 12 */
234                         int16_t         ground_accel_across;    /* 14 */
235                         int16_t         ground_accel_through;   /* 16 */
236                         int16_t         pad_18;                 /* 18 */
237                         int32_t         ground_roll;            /* 20 */
238                         int32_t         ground_pitch;           /* 24 */
239                         int32_t         ground_yaw;             /* 28 */
240                 } flight;                                       /* 32 */
241                 struct {
242                         uint16_t        flight;                 /* 4 */
243                         int16_t         ground_accel;           /* 6 */
244                         uint32_t        ground_pres;            /* 8 */
245                         int16_t         ground_accel_along;     /* 12 */
246                         int16_t         ground_accel_across;    /* 14 */
247                         int16_t         ground_accel_through;   /* 16 */
248                         int16_t         ground_roll;            /* 18 */
249                         int16_t         ground_pitch;           /* 20 */
250                         int16_t         ground_yaw;             /* 22 */
251                 } flight_old;                                   /* 24 */
252                 /* AO_LOG_STATE */
253                 struct {
254                         uint16_t        state;
255                         uint16_t        reason;
256                 } state;
257                 /* AO_LOG_SENSOR */
258                 struct {
259                         uint32_t        pres;           /* 4 */
260                         uint32_t        temp;           /* 8 */
261                         int16_t         accel_x;        /* 12 */
262                         int16_t         accel_y;        /* 14 */
263                         int16_t         accel_z;        /* 16 */
264                         int16_t         gyro_x;         /* 18 */
265                         int16_t         gyro_y;         /* 20 */
266                         int16_t         gyro_z;         /* 22 */
267                         int16_t         mag_x;          /* 24 */
268                         int16_t         mag_z;          /* 26 */
269                         int16_t         mag_y;          /* 28 */
270                         int16_t         accel;          /* 30 */
271                 } sensor;       /* 32 */
272                 /* AO_LOG_TEMP_VOLT */
273                 struct {
274                         int16_t         v_batt;         /* 4 */
275                         int16_t         v_pbatt;        /* 6 */
276                         int16_t         n_sense;        /* 8 */
277                         int16_t         sense[10];      /* 10 */
278                         uint16_t        pyro;           /* 30 */
279                 } volt;                                 /* 32 */
280                 /* AO_LOG_GPS_TIME */
281                 struct {
282                         int32_t         latitude;       /* 4 */
283                         int32_t         longitude;      /* 8 */
284                         uint16_t        altitude_low;   /* 12 */
285                         uint8_t         hour;           /* 14 */
286                         uint8_t         minute;         /* 15 */
287                         uint8_t         second;         /* 16 */
288                         uint8_t         flags;          /* 17 */
289                         uint8_t         year;           /* 18 */
290                         uint8_t         month;          /* 19 */
291                         uint8_t         day;            /* 20 */
292                         uint8_t         course;         /* 21 */
293                         uint16_t        ground_speed;   /* 22 */
294                         int16_t         climb_rate;     /* 24 */
295                         uint8_t         pdop;           /* 26 */
296                         uint8_t         hdop;           /* 27 */
297                         uint8_t         vdop;           /* 28 */
298                         uint8_t         mode;           /* 29 */
299                         int16_t         altitude_high;  /* 30 */
300                 } gps;  /* 32 */
301                 /* AO_LOG_GPS_SAT */
302                 struct {
303                         uint16_t        channels;       /* 4 */
304                         struct {
305                                 uint8_t svid;
306                                 uint8_t c_n;
307                         } sats[12];                     /* 6 */
308                 } gps_sat;                              /* 30 */
309         } u;
310 };
311
312 #define AO_LOG_MEGA_GPS_ALTITUDE(l)     ((int32_t) ((l)->u.gps.altitude_high << 16) | ((l)->u.gps.altitude_low))
313 #define AO_LOG_MEGA_SET_GPS_ALTITUDE(l,a)       (((l)->u.gps.mode |= AO_GPS_MODE_ALTITUDE_24), \
314                                                  ((l)->u.gps.altitude_high = (a) >> 16), \
315                                                  (l)->u.gps.altitude_low = (a))
316
317 struct ao_log_firetwo {
318         char                    type;                   /* 0 */
319         uint8_t                 csum;                   /* 1 */
320         uint16_t                tick;                   /* 2 */
321         union {                                         /* 4 */
322                 /* AO_LOG_FLIGHT */
323                 struct {
324                         uint16_t        flight;         /* 4 */
325                 } flight;       /* 6 */
326                 /* AO_LOG_STATE */
327                 struct {
328                         uint16_t        state;          /* 4 */
329                         uint16_t        reason;         /* 6 */
330                 } state;        /* 8 */
331                 /* AO_LOG_SENSOR */
332                 struct {
333                         uint16_t        pressure;       /* 4 */
334                         uint16_t        thrust;         /* 6 */
335                         uint16_t        thermistor[4];  /* 8 */
336                 } sensor;       /* 24 */
337                 uint8_t         align[28];              /* 4 */
338         } u;    /* 32 */
339 };
340
341 struct ao_log_telestatic {
342         char                    type;                   /* 0 */
343         uint8_t                 csum;                   /* 1 */
344         uint16_t                tick;                   /* 2 */
345         union {                                         /* 4 */
346                 /* AO_LOG_FLIGHT */
347                 struct {
348                         uint16_t        flight;         /* 4 */
349                 } flight;       /* 6 */
350                 /* AO_LOG_STATE */
351                 struct {
352                         uint16_t        state;          /* 4 */
353                         uint16_t        reason;         /* 6 */
354                 } state;        /* 8 */
355                 /* AO_LOG_SENSOR */
356                 struct {
357                         uint32_t        pressure;       /* 4 */
358                         uint32_t        pressure2;      /* 8 */
359                         uint32_t        thrust;         /* 12 */
360                         uint32_t        mass;           /* 16 */
361                         uint16_t        t_low;          /* 20 */
362                         uint16_t        t_high[4];      /* 22 */
363                 } sensor;       /* 30 */
364                 uint8_t         align[28];              /* 4 */
365         } u;    /* 32 */
366 };
367
368 struct ao_log_metrum {
369         char                    type;                   /* 0 */
370         uint8_t                 csum;                   /* 1 */
371         uint16_t                tick;                   /* 2 */
372         union {                                         /* 4 */
373                 /* AO_LOG_FLIGHT */
374                 struct {
375                         uint16_t        flight;         /* 4 */
376                         int16_t         ground_accel;   /* 6 */
377                         uint32_t        ground_pres;    /* 8 */
378                         uint32_t        ground_temp;    /* 12 */
379                 } flight;       /* 16 */
380                 /* AO_LOG_STATE */
381                 struct {
382                         uint16_t        state;          /* 4 */
383                         uint16_t        reason;         /* 6 */
384                 } state;        /* 8 */
385                 /* AO_LOG_SENSOR */
386                 struct {
387                         uint32_t        pres;           /* 4 */
388                         uint32_t        temp;           /* 8 */
389                         int16_t         accel;          /* 12 */
390                 } sensor;       /* 14 */
391                 /* AO_LOG_TEMP_VOLT */
392                 struct {
393                         int16_t         v_batt;         /* 4 */
394                         int16_t         sense_a;        /* 6 */
395                         int16_t         sense_m;        /* 8 */
396                 } volt;         /* 10 */
397                 /* AO_LOG_GPS_POS */
398                 struct {
399                         int32_t         latitude;       /* 4 */
400                         int32_t         longitude;      /* 8 */
401                         uint16_t        altitude_low;   /* 12 */
402                         int16_t         altitude_high;  /* 14 */
403                 } gps;          /* 16 */
404                 /* AO_LOG_GPS_TIME */
405                 struct {
406                         uint8_t         hour;           /* 4 */
407                         uint8_t         minute;         /* 5 */
408                         uint8_t         second;         /* 6 */
409                         uint8_t         flags;          /* 7 */
410                         uint8_t         year;           /* 8 */
411                         uint8_t         month;          /* 9 */
412                         uint8_t         day;            /* 10 */
413                         uint8_t         pdop;           /* 11 */
414                 } gps_time;     /* 12 */
415                 /* AO_LOG_GPS_SAT (up to three packets) */
416                 struct {
417                         uint8_t channels;               /* 4 */
418                         uint8_t more;                   /* 5 */
419                         struct {
420                                 uint8_t svid;
421                                 uint8_t c_n;
422                         } sats[4];                      /* 6 */
423                 } gps_sat;                              /* 14 */
424                 uint8_t         raw[12];                /* 4 */
425         } u;    /* 16 */
426 };
427
428 struct ao_log_mini {
429         char            type;                           /* 0 */
430         uint8_t         csum;                           /* 1 */
431         uint16_t        tick;                           /* 2 */
432         union {                                         /* 4 */
433                 /* AO_LOG_FLIGHT */
434                 struct {
435                         uint16_t        flight;         /* 4 */
436                         uint16_t        r6;
437                         uint32_t        ground_pres;    /* 8 */
438                 } flight;
439                 /* AO_LOG_STATE */
440                 struct {
441                         uint16_t        state;          /* 4 */
442                         uint16_t        reason;         /* 6 */
443                 } state;
444                 /* AO_LOG_SENSOR */
445                 struct {
446                         uint8_t         pres[3];        /* 4 */
447                         uint8_t         temp[3];        /* 7 */
448                         int16_t         sense_a;        /* 10 */
449                         int16_t         sense_m;        /* 12 */
450                         int16_t         v_batt;         /* 14 */
451                 } sensor;                               /* 16 */
452         } u;                                            /* 16 */
453 };                                                      /* 16 */
454
455 #define ao_log_pack24(dst,value) do {           \
456                 (dst)[0] = (value);             \
457                 (dst)[1] = (value) >> 8;        \
458                 (dst)[2] = (value) >> 16;       \
459         } while (0)
460
461 struct ao_log_gps {
462         char                    type;                   /* 0 */
463         uint8_t                 csum;                   /* 1 */
464         uint16_t                tick;                   /* 2 */
465         union {                                         /* 4 */
466                 /* AO_LOG_FLIGHT */
467                 struct {
468                         uint16_t        flight;                 /* 4 */
469                         int16_t         start_altitude;         /* 6 */
470                         int32_t         start_latitude;         /* 8 */
471                         int32_t         start_longitude;        /* 12 */
472                 } flight;                                       /* 16 */
473                 /* AO_LOG_GPS_TIME */
474                 struct {
475                         int32_t         latitude;       /* 4 */
476                         int32_t         longitude;      /* 8 */
477                         uint16_t        altitude_low;   /* 12 */
478                         uint8_t         hour;           /* 14 */
479                         uint8_t         minute;         /* 15 */
480                         uint8_t         second;         /* 16 */
481                         uint8_t         flags;          /* 17 */
482                         uint8_t         year;           /* 18 */
483                         uint8_t         month;          /* 19 */
484                         uint8_t         day;            /* 20 */
485                         uint8_t         course;         /* 21 */
486                         uint16_t        ground_speed;   /* 22 */
487                         int16_t         climb_rate;     /* 24 */
488                         uint8_t         pdop;           /* 26 */
489                         uint8_t         hdop;           /* 27 */
490                         uint8_t         vdop;           /* 28 */
491                         uint8_t         mode;           /* 29 */
492                         int16_t         altitude_high;  /* 30 */
493                 } gps;  /* 31 */
494                 /* AO_LOG_GPS_SAT */
495                 struct {
496                         uint16_t        channels;       /* 4 */
497                         struct {
498                                 uint8_t svid;
499                                 uint8_t c_n;
500                         } sats[12];                     /* 6 */
501                 } gps_sat;                              /* 30 */
502         } u;
503 };
504
505 struct ao_log_motor {
506         char                    type;                   /* 0 */
507         uint8_t                 csum;                   /* 1 */
508         uint16_t                tick;                   /* 2 */
509         union {                                         /* 4 */
510                 /* AO_LOG_FLIGHT */
511                 struct {
512                         uint16_t        flight;                 /* 4 */
513                         int16_t         ground_accel;           /* 6 */
514                         int16_t         ground_accel_along;     /* 8 */
515                         int16_t         ground_accel_across;    /* 10 */
516                         int16_t         ground_accel_through;   /* 12 */
517                         int16_t         ground_motor_pressure;  /* 14 */
518                 } flight;                                       /* 16 */
519                 /* AO_LOG_STATE */
520                 struct {
521                         uint16_t        state;                  /* 4 */
522                         uint16_t        reason;                 /* 6 */
523                 } state;
524                 /* AO_LOG_SENSOR */
525                 struct {
526                         uint16_t        pressure;               /* 4 */
527                         uint16_t        v_batt;                 /* 6 */
528                         int16_t         accel;                  /* 8 */
529                         int16_t         accel_across;           /* 10 */
530                         int16_t         accel_along;            /* 12 */
531                         int16_t         accel_through;          /* 14 */
532                 } sensor;                                       /* 16 */
533         } u;
534 };
535
536 #if AO_LOG_FORMAT == AO_LOG_FOMAT_TELEMEGA_OLD || AO_LOG_FORMAT == AO_LOG_FORMAT_TELEMEGA || AO_LOG_FORMAT == AO_LOG_FORMAT_TELEMEGA_3 || AO_LOG_FORMAT == AO_LOG_FORMAT_EASYMEGA_2 || AO_LOG_FORMAT == AO_LOG_FORMAT_TELEMEGA_4
537 typedef struct ao_log_mega ao_log_type;
538 #endif
539
540 #if AO_LOG_FORMAT == AO_LOG_FORMAT_TELEMETRUM
541 typedef struct ao_log_metrum ao_log_type;
542 #endif
543
544 #if AO_LOG_FORMAT == AO_LOG_FORMAT_TELEFIRETWO
545 typedef struct ao_log_firetwo ao_log_type;
546 #endif
547
548 #if AO_LOG_FORMAT == AO_LOG_FORMAT_EASYMINI1 || AO_LOG_FORMAT == AO_LOG_FORMAT_EASYMINI2 || AO_LOG_FORMAT == AO_LOG_FORMAT_TELEMINI2 || AO_LOG_FORMAT == AO_LOG_FORMAT_TELEMINI3
549 typedef struct ao_log_mini ao_log_type;
550 #endif
551
552 #if AO_LOG_FORMAT == AO_LOG_FORMAT_EASYMOTOR
553 typedef struct ao_log_motor ao_log_type;
554 #endif 
555
556 #if AO_LOG_FORMAT == AO_LOG_FORMAT_TELEGPS
557 typedef struct ao_log_gps ao_log_type;
558 #endif
559
560 #if AO_LOG_FORMAT == AO_LOG_FORMAT_FULL
561 typedef struct ao_log_record ao_log_type;
562 #endif
563
564 #if AO_LOG_FORMAT == AO_LOG_FORMAT_TINY
565 #define AO_LOG_UNCOMMON 1
566 #endif
567
568 #if AO_LOG_FORMAT == AO_LOG_FORMAT_TELEMETRY
569 #define AO_LOG_UNCOMMON 1
570 #endif
571
572 #if AO_LOG_FORMAT == AO_LOG_FORMAT_TELESCIENCE
573 #define AO_LOG_UNCOMMON 1
574 #endif
575
576 #if AO_LOG_FORMAT == AO_LOG_FORMAT_MICROPEAK2
577 #define AO_LOG_UNCOMMON 1
578 #endif
579
580 #ifndef AO_LOG_UNCOMMON
581 extern ao_log_type ao_log_data;
582
583 #define AO_LOG_SIZE sizeof(ao_log_type)
584
585 /* Write a record to the eeprom log */
586
587 uint8_t
588 ao_log_write(ao_log_type *log);
589 #endif
590
591 void
592 ao_log_flush(void);
593
594 void
595 ao_gps_report_metrum_init(void);
596
597 #endif /* _AO_LOG_H_ */