Fixed pinlist and temperature sensor map
This commit is contained in:
@@ -204,6 +204,8 @@ namespace commands
|
||||
}
|
||||
for (const auto [lvl, ro] : c_hpLimitsMap)
|
||||
{
|
||||
if (ro == RO::RO_MAX)
|
||||
continue; // avoid overshooting relay range
|
||||
if (level == lvl && level != "UNLIMITED")
|
||||
dev.io.digitalOutWrite(ro, true);
|
||||
else
|
||||
|
||||
11
src/main.cpp
11
src/main.cpp
@@ -94,13 +94,13 @@ void loop()
|
||||
|
||||
MQTTwrapper::MessageCallback onMessage = [&devices](const MQTTwrapper::Topic &topic, const MQTTwrapper::Message &message)
|
||||
{
|
||||
LOG_DEBUG("onMessage callback [", topic.c_str(), "]");
|
||||
LOG_DEBUG("onMessage callback [", topic.c_str(), "]\n", message.c_str());
|
||||
devices.led.setColor(devices.led.COLOR_MAGENTA);
|
||||
};
|
||||
|
||||
MQTTwrapper::MessageCallback onPublish = [&devices](const MQTTwrapper::Topic &topic, const MQTTwrapper::Message &message)
|
||||
{
|
||||
LOG_DEBUG("onPublish callback [", topic.c_str(), "]");
|
||||
LOG_DEBUG("onPublish callback [", topic.c_str(), "]\n", message.c_str());
|
||||
devices.led.setColor(devices.led.COLOR_SKYBLUE);
|
||||
};
|
||||
|
||||
@@ -154,7 +154,6 @@ void loop()
|
||||
{ // skip NTP update for drift testing
|
||||
buzzer.beep(250, NOTE_A);
|
||||
led.setColor(led.COLOR_ORANGE);
|
||||
// rtc.setDatetime(drivers::PCF85063::fromEpoch(ntpTime));
|
||||
const drivers::PCF85063::datetime_t dt(drivers::PCF85063::fromEpoch(ntpTime));
|
||||
LOG_INFO("NTP Time: ", drivers::PCF85063::datetime2str(dt).c_str());
|
||||
break;
|
||||
@@ -201,8 +200,8 @@ void loop()
|
||||
ArduinoJson::JsonDocument ti;
|
||||
auto tempinfo = tmp.getTempAll();
|
||||
ti["solar"] = tempinfo.at(0);
|
||||
ti["acs"] = tempinfo.at(0);
|
||||
ti["heating"] = tempinfo.at(0);
|
||||
ti["acs"] = tempinfo.at(1);
|
||||
ti["heating"] = tempinfo.at(2);
|
||||
mqtt.publish(conf.m_mqttPublish["temperatures"], ti);
|
||||
};
|
||||
|
||||
@@ -228,4 +227,4 @@ void loop()
|
||||
////////////////////////////////////////
|
||||
///////// MAIN LOOP INSIDE LOOP ////////
|
||||
////////////////////////////////////////
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user