This lets TeleGPS use the logging infrastructure without wasting a
task to log sensor data
Signed-off-by: Keith Packard <keithp@keithp.com>
return ao_log_current_pos == ao_log_end_pos;
}
return ao_log_current_pos == ao_log_end_pos;
}
+#ifndef LOG_ADC
+#define LOG_ADC HAS_ADC
+#endif
+
+#if LOG_ADC
static __xdata struct ao_task ao_log_task;
#endif
static __xdata struct ao_task ao_log_task;
#endif
#ifndef HAS_ADC
#error Define HAS_ADC for ao_log.c
#endif
#ifndef HAS_ADC
#error Define HAS_ADC for ao_log.c
#endif
/* Create a task to log events to eeprom */
ao_add_task(&ao_log_task, ao_log, "log");
#endif
/* Create a task to log events to eeprom */
ao_add_task(&ao_log_task, ao_log, "log");
#endif
static __data uint8_t ao_log_data_pos;
/* a hack to make sure that ao_log_megas fill the eeprom block in even units */
static __data uint8_t ao_log_data_pos;
/* a hack to make sure that ao_log_megas fill the eeprom block in even units */
log.u.flight.ground_accel_along = ao_ground_accel_along;
log.u.flight.ground_accel_across = ao_ground_accel_across;
log.u.flight.ground_accel_through = ao_ground_accel_through;
log.u.flight.ground_accel_along = ao_ground_accel_along;
log.u.flight.ground_accel_across = ao_ground_accel_across;
log.u.flight.ground_accel_through = ao_ground_accel_through;
+ log.u.flight.ground_roll = ao_ground_roll;
log.u.flight.ground_pitch = ao_ground_pitch;
log.u.flight.ground_yaw = ao_ground_yaw;
log.u.flight.ground_pitch = ao_ground_pitch;
log.u.flight.ground_yaw = ao_ground_yaw;
- log.u.flight.ground_roll = ao_ground_roll;
#endif
log.u.flight.ground_pres = ao_ground_pres;
log.u.flight.flight = ao_flight_number;
#endif
log.u.flight.ground_pres = ao_ground_pres;
log.u.flight.flight = ao_flight_number;
ao_sleep(&ao_log_running);
}
}
ao_sleep(&ao_log_running);
}
}
uint16_t
ao_log_flight(uint8_t slot)
uint16_t
ao_log_flight(uint8_t slot)