Merge pull request #86 from arendst/development

Fix compile error when ADC enabled and No rules
This commit is contained in:
Adrian Scillato 2018-05-03 17:40:45 -03:00 committed by GitHub
commit 221513afc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -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)

View File

@ -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;