Skip to content

Commit

Permalink
ha setup ch0, ch1 = 0
Browse files Browse the repository at this point in the history
  • Loading branch information
dontsovcmc committed May 31, 2024
1 parent be1547c commit bca537b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ESP8266/src/ha/subscribe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ bool update_settings(String &topic, String &payload, Settings &sett, const Slave
} else if (param.equals(F("ch0")))
{
float ch0 = payload.toFloat(); // Преобразовали во флоат просто для проверки на условие в следующей строке
if (ch0 > 0)
if (ch0 >= 0)
{
updated = true;
LOG_INFO(F("MQTT: CALLBACK: Old Settings.channel0_start: ") << sett.channel0_start);
Expand All @@ -113,7 +113,7 @@ bool update_settings(String &topic, String &payload, Settings &sett, const Slave
} else if (param.equals(F("ch1")))
{
float ch1 = payload.toFloat();
if (ch1 > 0)
if (ch1 >= 0)
{
updated = true;
LOG_INFO(F("MQTT: CALLBACK: Old Settings.channel1_start: ") << sett.channel1_start);
Expand Down

0 comments on commit bca537b

Please sign in to comment.