telegps-v1.0: Provide one log and append to it
[fw/altos] / src / kernel / ao_log.h
index 080cfb02177af09053382e7074d14d7035673b92..c5fa7faba6d867bee81ab990fcdf35eafa0d69c1 100644 (file)
@@ -51,11 +51,16 @@ extern __pdata enum ao_flight_state ao_log_state;
 #define AO_LOG_FORMAT_NONE             127     /* No log at all */
 
 extern __code uint8_t ao_log_format;
 #define AO_LOG_FORMAT_NONE             127     /* No log at all */
 
 extern __code uint8_t ao_log_format;
+extern __code uint8_t ao_log_size;
 
 /* Return the flight number from the given log slot, 0 if none */
 uint16_t
 ao_log_flight(uint8_t slot);
 
 
 /* Return the flight number from the given log slot, 0 if none */
 uint16_t
 ao_log_flight(uint8_t slot);
 
+/* Check if there is valid log data at the specified location */
+uint8_t
+ao_log_check(uint32_t pos);
+
 /* Flush the log */
 void
 ao_log_flush(void);
 /* Flush the log */
 void
 ao_log_flush(void);
@@ -324,7 +329,7 @@ struct ao_log_metrum {
                        uint8_t         year;           /* 8 */
                        uint8_t         month;          /* 9 */
                        uint8_t         day;            /* 10 */
                        uint8_t         year;           /* 8 */
                        uint8_t         month;          /* 9 */
                        uint8_t         day;            /* 10 */
-                       uint8_t         pad;            /* 11 */
+                       uint8_t         pdop;           /* 11 */
                } gps_time;     /* 12 */
                /* AO_LOG_GPS_SAT (up to three packets) */
                struct {
                } gps_time;     /* 12 */
                /* AO_LOG_GPS_SAT (up to three packets) */
                struct {