X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fstm%2Fao_adc_stm.c;h=24912bb28b34849d7b2297ff8c11e6e6cd63a4fb;hb=3fb27f0ab7163c96945a60fd406e5423552206a2;hp=17ff344d3a228ee9310bbf009bfeefaa665692be;hpb=63683f91f5fe9588c1d905a572509cb674aaad68;p=fw%2Faltos diff --git a/src/stm/ao_adc_stm.c b/src/stm/ao_adc_stm.c index 17ff344d..24912bb2 100644 --- a/src/stm/ao_adc_stm.c +++ b/src/stm/ao_adc_stm.c @@ -3,7 +3,8 @@ * * 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 @@ -56,6 +57,9 @@ static void ao_adc_done(int index) #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); @@ -190,7 +194,7 @@ ao_adc_dump(void) __reentrant for (i = 0; i < AO_NUM_ADC; i++) { #ifdef AO_ADC_SQ1_NAME if (ao_adc_name[i]) - printf ("\t%s: %5d\n", ao_adc_name[i], d[i]); + printf (" %s: %5d", ao_adc_name[i], d[i]); else #endif printf (" %2d: %5d", i, d[i]); @@ -376,7 +380,7 @@ ao_adc_init(void) #if AO_NUM_ADC > 18 #error "need to finish stm_adc.sqr settings" #endif - + /* Turn ADC on */ stm_adc.cr2 = AO_ADC_CR2_VAL;