Disabled adc for rotorcraft for now. It is not a showstopper subsystem.

This commit is contained in:
Piotr Esden-Tempski
2012-03-01 10:38:41 -08:00
parent d5531116c7
commit cc859f9ae7
2 changed files with 5 additions and 5 deletions
+4 -4
View File
@@ -164,10 +164,10 @@ ap.srcs += subsystems/electrical.c
ap.CFLAGS += -DUSE_DAC ap.CFLAGS += -DUSE_DAC
ap.srcs += $(SRC_ARCH)/mcu_periph/dac_arch.c ap.srcs += $(SRC_ARCH)/mcu_periph/dac_arch.c
else ifeq ($(ARCH), stm32) else ifeq ($(ARCH), stm32)
ap.CFLAGS += -DUSE_ADC #ap.CFLAGS += -DUSE_ADC
ap.CFLAGS += -DUSE_AD1 -DUSE_AD1_1 -DUSE_AD1_2 -DUSE_AD1_3 -DUSE_AD1_4 #ap.CFLAGS += -DUSE_AD1 -DUSE_AD1_1 -DUSE_AD1_2 -DUSE_AD1_3 -DUSE_AD1_4
ap.CFLAGS += -DUSE_ADC1_2_IRQ_HANDLER #ap.CFLAGS += -DUSE_ADC1_2_IRQ_HANDLER
ap.srcs += $(SRC_ARCH)/mcu_periph/adc_arch.c #ap.srcs += $(SRC_ARCH)/mcu_periph/adc_arch.c
ap.srcs += subsystems/electrical.c ap.srcs += subsystems/electrical.c
endif endif
+1 -1
View File
@@ -40,7 +40,7 @@ void electrical_init(void) {
electrical.vsupply = 0; electrical.vsupply = 0;
electrical.current = 0; electrical.current = 0;
adc_buf_channel(ADC_CHANNEL_VSUPPLY, &electrical_priv.vsupply_adc_buf, DEFAULT_AV_NB_SAMPLE); //adc_buf_channel(ADC_CHANNEL_VSUPPLY, &electrical_priv.vsupply_adc_buf, DEFAULT_AV_NB_SAMPLE);
#ifdef ADC_CHANNEL_CURRENT #ifdef ADC_CHANNEL_CURRENT
adc_buf_channel(ADC_CHANNEL_CURRENT, &electrical_priv.current_adc_buf, DEFAULT_AV_NB_SAMPLE); adc_buf_channel(ADC_CHANNEL_CURRENT, &electrical_priv.current_adc_buf, DEFAULT_AV_NB_SAMPLE);
#endif #endif