When appending to a TeleGPS log, don't stick another flight value into
the log. That just confuses the ground station software.
Signed-off-by: Keith Packard <keithp@keithp.com>
ao_log_scan(void) __reentrant
{
uint8_t log_slot;
uint8_t log_slots;
ao_log_scan(void) __reentrant
{
uint8_t log_slot;
uint8_t log_slots;
+#if FLIGHT_LOG_APPEND
+ uint8_t ret;
+#else
empty = ao_log_current_pos;
}
}
empty = ao_log_current_pos;
}
}
} else {
ao_log_find_max_erase_flight();
} else {
ao_log_find_max_erase_flight();
+ ao_wakeup(&ao_flight_number);
+ return ret;
#else
if (ao_flight_number)
#else
if (ao_flight_number)
if (++log_slot >= log_slots)
log_slot = 0;
} while (log_slot != log_want);
if (++log_slot >= log_slots)
log_slot = 0;
} while (log_slot != log_want);
ao_wakeup(&ao_flight_number);
ao_wakeup(&ao_flight_number);
/* functions provided in ao_log.c */
/* Figure out the current flight number */
/* functions provided in ao_log.c */
/* Figure out the current flight number */
ao_log_scan(void) __reentrant;
/* Return the position of the start of the given log slot */
ao_log_scan(void) __reentrant;
/* Return the position of the start of the given log slot */
#if !HAS_USB_CONNECT
ao_tracker_force_telem = 1;
#endif
#if !HAS_USB_CONNECT
ao_tracker_force_telem = 1;
#endif
+ log_started = ao_log_scan();
ao_tracker_erase_end(void)
{
if (erasing_current) {
ao_tracker_erase_end(void)
{
if (erasing_current) {
- ao_log_scan();
- log_started = 0;
+ log_started = ao_log_scan();
ao_mutex_put(&tracker_mutex);
}
}
ao_mutex_put(&tracker_mutex);
}
}