mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-24 16:46:13 +01:00
Compare commits
1 Commits
236d39dc16
...
011f9396ec
Author | SHA1 | Date | |
---|---|---|---|
|
011f9396ec |
|
@ -145,7 +145,7 @@ int * ADCee::analogvals = NULL;
|
||||||
|
|
||||||
int16_t ADCee::ADCmax()
|
int16_t ADCee::ADCmax()
|
||||||
{
|
{
|
||||||
return 4095;
|
return 1023;
|
||||||
}
|
}
|
||||||
|
|
||||||
AdvancedADC adc;
|
AdvancedADC adc;
|
||||||
|
@ -155,8 +155,8 @@ int num_active_pins = 4;
|
||||||
const int samples_per_round = 512;
|
const int samples_per_round = 512;
|
||||||
int ADCee::init(uint8_t pin) {
|
int ADCee::init(uint8_t pin) {
|
||||||
adc.stop();
|
adc.stop();
|
||||||
if (pin >= A0 && pin <= A3) adc.begin(AN_RESOLUTION_12, 16000, 1, samples_per_round, num_active_pins, active_pins);
|
if (pin >= A0 && pin <= A3) adc.begin(AN_RESOLUTION_10, 16000, 1, samples_per_round, num_active_pins, active_pins);
|
||||||
else if (pin >= A4 && pin <= A7) adc.begin(AN_RESOLUTION_12, 16000, 1, samples_per_round, num_active_pins, active_pinsB);
|
else if (pin >= A4 && pin <= A7) adc.begin(AN_RESOLUTION_10, 16000, 1, samples_per_round, num_active_pins, active_pinsB);
|
||||||
return 123;
|
return 123;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user