Skip to content

Commit cca05d5

Browse files
committed
CommandHandler: Fix ADC attenuation value.
1 parent 495425a commit cca05d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main/CommandHandler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1202,7 +1202,7 @@ int getAnalogRead(const uint8_t command[], uint8_t response[])
12021202
/* Set maximum analog bit-width = 12 bit. */
12031203
adc1_config_width(ADC_WIDTH_BIT_12);
12041204
/* Configure channel attenuation. */
1205-
adc1_config_channel_atten((adc1_channel_t)adc_channel, ADC_ATTEN_DB_0);
1205+
adc1_config_channel_atten((adc1_channel_t)adc_channel, ADC_ATTEN_DB_11);
12061206
/* Read the analog value from the pin. */
12071207
uint16_t const adc_raw = adc1_get_raw((adc1_channel_t)adc_channel);
12081208

0 commit comments

Comments
 (0)