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