From 148fe4aec0e47d33df660f0a4654d8932ecf6e4d Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Mon, 7 Jan 2019 16:58:44 +0100 Subject: [PATCH] Only restart if module supports it --- sonoff/sonoff.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sonoff/sonoff.ino b/sonoff/sonoff.ino index 6076fd796..33ea9b025 100755 --- a/sonoff/sonoff.ino +++ b/sonoff/sonoff.ino @@ -771,8 +771,8 @@ void MqttDataHandler(char* topic, byte* data, unsigned int data_len) if (10 == pindex) { // SetOption60 enable or disable traditional sleep WiFiSetSleepMode(); // Update WiFi sleep mode accordingly } - if (12 == pindex) { // SetOption62 change input pull-up - restart_flag = 2; + if ((12 == pindex) && (my_module_flag.pullup)) { // SetOption62 change input pull-up + restart_flag = 2; // Only restart if module supports it } } }