Skip to content

Commit

Permalink
[stm32] enable adcs again, but not working properly yet
Browse files Browse the repository at this point in the history
This reverts commit cc859f9.
  • Loading branch information
flixr committed May 16, 2012
1 parent 46f7182 commit f6cbc07
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions conf/firmwares/rotorcraft.makefile
Expand Up @@ -167,10 +167,9 @@ ap.srcs += subsystems/electrical.c
ap.CFLAGS += -DUSE_DAC
ap.srcs += $(SRC_ARCH)/mcu_periph/dac_arch.c
else ifeq ($(ARCH), stm32)
#ap.CFLAGS += -DUSE_ADC
#ap.CFLAGS += -DUSE_AD1 -DUSE_AD1_1 -DUSE_AD1_2 -DUSE_AD1_3 -DUSE_AD1_4
#ap.CFLAGS += -DUSE_ADC1_2_IRQ_HANDLER
#ap.srcs += $(SRC_ARCH)/mcu_periph/adc_arch.c
ap.CFLAGS += -DUSE_ADC
ap.CFLAGS += -DUSE_AD1 -DUSE_AD1_1 -DUSE_AD1_2 -DUSE_AD1_3 -DUSE_AD1_4
ap.srcs += $(SRC_ARCH)/mcu_periph/adc_arch.c
ap.srcs += subsystems/electrical.c
endif

Expand Down
2 changes: 1 addition & 1 deletion sw/airborne/subsystems/electrical.c
Expand Up @@ -40,7 +40,7 @@ void electrical_init(void) {
electrical.vsupply = 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
adc_buf_channel(ADC_CHANNEL_CURRENT, &electrical_priv.current_adc_buf, DEFAULT_AV_NB_SAMPLE);
#endif
Expand Down

0 comments on commit f6cbc07

Please sign in to comment.