Fixed pinlist and temperature sensor map
This commit is contained in:
@@ -11,11 +11,11 @@ enum RO // relay output channels
|
||||
GND_FLOOR = 6,
|
||||
PUMP_HT = 7,
|
||||
PUMP_IRR = 8,
|
||||
ZONE1 = 9,
|
||||
ZONE2 = 10,
|
||||
ZONE3 = 11,
|
||||
DRIP = 12,
|
||||
RETURN = 13,
|
||||
RETURN = 9,
|
||||
ZONE1 = 10,
|
||||
ZONE2 = 11,
|
||||
ZONE3 = 12,
|
||||
DRIP = 13,
|
||||
RO_14 = 14,
|
||||
RO_15 = 15,
|
||||
RO_MAX = 16 // unused to detect invalid values
|
||||
|
||||
@@ -23,8 +23,8 @@ build_type = release
|
||||
board_build.filesystem = ffat
|
||||
board_build.partitions = fatfs_partition.csv ; se stai usando uno custom
|
||||
|
||||
upload_protocol = espota
|
||||
upload_port = 10.0.2.139
|
||||
#upload_protocol = espota
|
||||
#upload_port = 10.0.2.139
|
||||
|
||||
|
||||
[env:esp32-s3-waveshare8-debug]
|
||||
|
||||
@@ -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