Fix possible watchdog/exception

Fix possible watchdog/exception (#8828)
This commit is contained in:
Theo Arends 2020-07-03 17:17:57 +02:00
parent a6dcffab9b
commit e5127d8e8e

View File

@ -213,6 +213,8 @@ void update_rotary(void) {
}
bool RotaryButtonPressed(void) {
if (!Rotary.present) { return false; }
bool powered_on = (power);
#ifdef USE_LIGHT
if (!Settings.flag4.rotary_uses_rules) { // SetOption98 - Use rules instead of light control
@ -246,6 +248,8 @@ void RotaryInit(void) {
\*********************************************************************************************/
void RotaryHandler(void) {
if (!Rotary.present) { return; }
if (Rotary.timeout) {
Rotary.timeout--;
if (!Rotary.timeout) {