mirror of https://github.com/arendst/Tasmota.git
Fix compilation when USE_ADC is not defined (#20498)
This commit is contained in:
parent
8d83472c01
commit
ee4bf86e6a
|
@ -220,6 +220,7 @@ void GVMonitorTask(void) {
|
|||
}
|
||||
#endif // ESP8266
|
||||
|
||||
#ifdef USE_ADC
|
||||
else if (AdcPin(pin)) {
|
||||
// Read Analog (ADC) GPIO
|
||||
pintype = GV_AnalogPin;
|
||||
|
@ -235,6 +236,8 @@ void GVMonitorTask(void) {
|
|||
originalValue = AdcRead1(pin);
|
||||
currentState = changeUIntScale(originalValue, 0, AdcRange(), 0, 255); // Bring back to 0..255
|
||||
}
|
||||
#endif // USE_ADC
|
||||
|
||||
else {
|
||||
// Read digital GPIO
|
||||
pintype = GV_DigitalPin;
|
||||
|
@ -403,6 +406,9 @@ bool Xdrv121(uint32_t function) {
|
|||
GVMonitorTask();
|
||||
}
|
||||
break;
|
||||
case FUNC_SAVE_BEFORE_RESTART:
|
||||
GVCloseEvent(); // Stop current updates
|
||||
break;
|
||||
case FUNC_ACTIVE:
|
||||
result = true;
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue