*
* 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
#endif
#if HAS_MPU6000
ao_data_ring[ao_data_head].mpu6000 = ao_mpu6000_current;
+#endif
+#if HAS_MPU9250
+ ao_data_ring[ao_data_head].mpu9250 = ao_mpu9250_current;
#endif
ao_data_ring[ao_data_head].tick = ao_tick_count;
ao_data_head = ao_data_ring_next(ao_data_head);
* Fetch a copy of the most recent ADC data
*/
void
-ao_adc_get(__xdata struct ao_adc *packet)
+ao_adc_get(struct ao_adc *packet)
{
#if HAS_FLIGHT
uint8_t i = ao_data_ring_prev(ao_sample_data);
#endif
static void
-ao_adc_dump(void) __reentrant
+ao_adc_dump(void)
{
struct ao_data packet;
#ifndef AO_ADC_DUMP
#endif
}
-__code struct ao_cmds ao_adc_cmds[] = {
+const struct ao_cmds ao_adc_cmds[] = {
{ ao_adc_dump, "a\0Display current ADC values" },
{ 0, NULL },
};
#if AO_NUM_ADC > 18
#error "need to finish stm_adc.sqr settings"
#endif
-
+
/* Turn ADC on */
stm_adc.cr2 = AO_ADC_CR2_VAL;