1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-12-23 21:01:25 +01:00

SAMD21 fix analogresolution in ADCee::init

This commit is contained in:
pmantoine 2022-10-12 17:30:20 +08:00
parent eb766aa27f
commit 65364212ca

View File

@ -164,7 +164,7 @@ int ADCee::init(uint8_t pin) {
if (id > NUM_ADC_INPUTS) if (id > NUM_ADC_INPUTS)
return -1023; return -1023;
// pinMode(pin, INPUT); analogReadResolution(12); // Consistent with settings in ADCee::begin below
int value = analogRead(pin); int value = analogRead(pin);
if (analogvals == NULL) if (analogvals == NULL)
analogvals = (int *)calloc(NUM_ADC_INPUTS+1, sizeof(int)); analogvals = (int *)calloc(NUM_ADC_INPUTS+1, sizeof(int));