altos: add initial support for TeleFireOne v2.0
authorBdale Garbee <bdale@gag.com>
Sun, 17 Feb 2019 21:38:53 +0000 (14:38 -0700)
committerBdale Garbee <bdale@gag.com>
Sun, 17 Feb 2019 21:38:53 +0000 (14:38 -0700)
src/kernel/ao_log.h
src/kernel/ao_log_fireone.c

index 04f00d3..9e8f995 100644 (file)
@@ -483,6 +483,10 @@ typedef struct ao_log_mega ao_log_type;
 typedef struct ao_log_metrum ao_log_type;
 #endif
 
+#if AO_LOG_FORMAT == AO_LOG_FORMAT_TELEFIRETWO
+typedef struct ao_log_firetwo ao_log_type;
+#endif
+
 #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
 typedef struct ao_log_mini ao_log_type;
 #endif
index 3dd52a1..e1bf160 100644 (file)
@@ -57,14 +57,6 @@ ao_log_firetwo(struct ao_log_firetwo *log)
        return wrote;
 }
 
-static uint8_t
-ao_log_dump_check_data(void)
-{
-       if (ao_log_csum((uint8_t *) &log) != 0)
-               return 0;
-       return 1;
-}
-
 #if HAS_ADC
 static uint8_t ao_log_data_pos;
 
@@ -131,15 +123,3 @@ ao_log(void)
        } while (ao_log_running);
 }
 
-uint16_t
-ao_log_flight(uint8_t slot)
-{
-       if (!ao_storage_read(ao_log_pos(slot),
-                            &log,
-                            sizeof (struct ao_log_firetwo)))
-               return 0;
-
-       if (ao_log_dump_check_data() && log.type == AO_LOG_FLIGHT)
-               return log.u.flight.flight;
-       return 0;
-}