*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
#include <ao_flight.h>
#include <ao_sample.h>
-__code uint8_t ao_log_format = AO_LOG_FORMAT_TELEMETRY;
+const 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;
-__xdata int16_t ao_max_height; /* max of ao_height */
-__pdata int16_t sense_d, sense_m;
-__pdata uint8_t ao_igniter_present;
+static uint8_t ao_log_monitor_pos;
+enum ao_flight_state ao_flight_state;
+int16_t ao_max_height; /* max of ao_height */
+int16_t sense_d, sense_m;
+uint8_t ao_igniter_present;
static void
ao_log_telem_track() {
ao_flight_state = ao_log_single_write_data.telemetry.sensor.state;
if (ao_flight_state == ao_flight_pad)
ao_max_height = 0;
- ao_wakeup(DATA_TO_XDATA(&ao_flight_state));
+ ao_wakeup(&ao_flight_state);
}
}
}
while (ao_log_running) {
/* Write samples to EEPROM */
while (ao_log_monitor_pos != ao_monitor_head) {
- ao_xmemcpy(&ao_log_single_write_data.telemetry,
+ memcpy(&ao_log_single_write_data.telemetry,
&ao_monitor_ring[ao_log_monitor_pos],
AO_LOG_SINGLE_SIZE);
ao_log_single_write();
ao_log_telem_track();
}
/* Wait for more telemetry data to arrive */
- ao_sleep(DATA_TO_XDATA(&ao_monitor_head));
+ ao_sleep(&ao_monitor_head);
}
}
}