mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-22 18:26:30 +00:00
Fix possible watchdog/exception
Fix possible watchdog/exception (#8828)
This commit is contained in:
parent
a6dcffab9b
commit
e5127d8e8e
@ -213,6 +213,8 @@ void update_rotary(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool RotaryButtonPressed(void) {
|
bool RotaryButtonPressed(void) {
|
||||||
|
if (!Rotary.present) { return false; }
|
||||||
|
|
||||||
bool powered_on = (power);
|
bool powered_on = (power);
|
||||||
#ifdef USE_LIGHT
|
#ifdef USE_LIGHT
|
||||||
if (!Settings.flag4.rotary_uses_rules) { // SetOption98 - Use rules instead of light control
|
if (!Settings.flag4.rotary_uses_rules) { // SetOption98 - Use rules instead of light control
|
||||||
@ -246,6 +248,8 @@ void RotaryInit(void) {
|
|||||||
\*********************************************************************************************/
|
\*********************************************************************************************/
|
||||||
|
|
||||||
void RotaryHandler(void) {
|
void RotaryHandler(void) {
|
||||||
|
if (!Rotary.present) { return; }
|
||||||
|
|
||||||
if (Rotary.timeout) {
|
if (Rotary.timeout) {
|
||||||
Rotary.timeout--;
|
Rotary.timeout--;
|
||||||
if (!Rotary.timeout) {
|
if (!Rotary.timeout) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user