mirror of https://github.com/arendst/Tasmota.git
Merge pull request #86 from arendst/development
Fix compile error when ADC enabled and No rules
This commit is contained in:
commit
221513afc1
|
@ -1,5 +1,6 @@
|
|||
/* 5.13.1a
|
||||
* Change user_config.h otaurl to http://sonoff.maddox.co.uk/tasmota/sonoff.bin (#2588, #2602)
|
||||
* Fix compile error when ADC is enabled and Rules are disabled (#2608)
|
||||
*
|
||||
* 5.13.1 20180501
|
||||
* Fix JSON buffers size too small for execution in some situations (#2580)
|
||||
|
|
|
@ -1400,6 +1400,7 @@ uint16_t AdcRead()
|
|||
return analog;
|
||||
}
|
||||
|
||||
#ifdef USE_RULES
|
||||
void AdcEvery50ms()
|
||||
{
|
||||
adc_counter++;
|
||||
|
@ -1413,6 +1414,7 @@ void AdcEvery50ms()
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif // USE_RULES
|
||||
|
||||
void AdcShow(boolean json)
|
||||
{
|
||||
|
@ -1439,9 +1441,11 @@ boolean Xsns02(byte function)
|
|||
|
||||
if (pin[GPIO_ADC0] < 99) {
|
||||
switch (function) {
|
||||
#ifdef USE_RULES
|
||||
case FUNC_EVERY_50_MSECOND:
|
||||
AdcEvery50ms();
|
||||
break;
|
||||
#endif // USE_RULES
|
||||
case FUNC_JSON_APPEND:
|
||||
AdcShow(1);
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue