mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-12-23 12:51:24 +01:00
SAMD21 fix analogresolution in ADCee::init
This commit is contained in:
parent
eb766aa27f
commit
65364212ca
@ -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));
|
||||||
|
Loading…
Reference in New Issue
Block a user