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 04f00d3ec3bd211545e948896994ebff3777736b..9e8f995e5d16df794f864723dedca4558c746cc6 100644 (file)
@@ -483,6 +483,10 @@ typedef struct ao_log_mega ao_log_type;
 typedef struct ao_log_metrum ao_log_type;
 #endif
 
 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
 #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 3dd52a1651d8580de39ded647f35d6501b8a7d6a..e1bf1601bc83ede0f776dfb8eb6b7355557dd94d 100644 (file)
@@ -57,14 +57,6 @@ ao_log_firetwo(struct ao_log_firetwo *log)
        return wrote;
 }
 
        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;
 
 #if HAS_ADC
 static uint8_t ao_log_data_pos;
 
@@ -131,15 +123,3 @@ ao_log(void)
        } while (ao_log_running);
 }
 
        } 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;
-}