altoslib: Missed a couple of easy mini voltage API changes
[fw/altos] / src / core / ao_log_telem.c
index 9e1b06d31fc658e6fc7a0c6a4a9c375be38c4e4b..095aca371d0227b0851a143b8e567ef4a6e6a261 100644 (file)
  * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
  */
 
-#include "ao.h"
+#include <ao.h>
+#include <ao_flight.h>
+#include <ao_sample.h>
 
 __code uint8_t ao_log_format = AO_LOG_FORMAT_TELEMETRY;
 
 static __data uint8_t                  ao_log_monitor_pos;
 __pdata enum ao_flight_state           ao_flight_state;
-__pdata int16_t                                ao_max_height;  /* max of ao_height */
+__xdata int16_t                                ao_max_height;  /* max of ao_height */
 __pdata int16_t                                sense_d, sense_m;
 __pdata uint8_t                                ao_igniter_present;
 
@@ -100,9 +102,9 @@ ao_log_single(void)
                while (ao_log_running) {
                        /* Write samples to EEPROM */
                        while (ao_log_monitor_pos != ao_monitor_head) {
-                               memcpy(&ao_log_single_write_data.telemetry,
-                                      &ao_monitor_ring[ao_log_monitor_pos],
-                                      AO_LOG_SINGLE_SIZE);
+                               ao_xmemcpy(&ao_log_single_write_data.telemetry,
+                                          &ao_monitor_ring[ao_log_monitor_pos],
+                                          AO_LOG_SINGLE_SIZE);
                                ao_log_single_write();
                                ao_log_monitor_pos = ao_monitor_ring_next(ao_log_monitor_pos);
                                ao_log_telem_track();