mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-01-30 02:29:12 +03:00
AUTO_HEATING_CIRCUIT cleanup
This commit is contained in:
@@ -467,7 +467,7 @@ void Thermostat::publish_values() {
|
|||||||
// of nullptr if it doesn't exist yet
|
// of nullptr if it doesn't exist yet
|
||||||
std::shared_ptr<Thermostat::HeatingCircuit> Thermostat::heating_circuit(const uint8_t hc_num) {
|
std::shared_ptr<Thermostat::HeatingCircuit> Thermostat::heating_circuit(const uint8_t hc_num) {
|
||||||
// if hc_num is 0 then return the first existing hc in the list
|
// if hc_num is 0 then return the first existing hc in the list
|
||||||
if (hc_num == 0) {
|
if (hc_num == AUTO_HEATING_CIRCUIT) {
|
||||||
for (const auto & heating_circuit : heating_circuits_) {
|
for (const auto & heating_circuit : heating_circuits_) {
|
||||||
return heating_circuit;
|
return heating_circuit;
|
||||||
}
|
}
|
||||||
@@ -1488,7 +1488,7 @@ void Thermostat::set_mode_n(const uint8_t mode, const uint8_t hc_num) {
|
|||||||
// get hc based on number
|
// get hc based on number
|
||||||
std::shared_ptr<Thermostat::HeatingCircuit> hc = heating_circuit(hc_num);
|
std::shared_ptr<Thermostat::HeatingCircuit> hc = heating_circuit(hc_num);
|
||||||
if (hc == nullptr) {
|
if (hc == nullptr) {
|
||||||
LOG_WARNING(F("set mode: Heating Circuit %d not found or activated"), hc_num);
|
LOG_WARNING(F("Set mode: Heating Circuit %d not found or activated"), hc_num);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -208,8 +208,7 @@ class Thermostat : public EMSdevice {
|
|||||||
static constexpr uint8_t EMS_OFFSET_JunkersSetMessage2_eco_temp = 6;
|
static constexpr uint8_t EMS_OFFSET_JunkersSetMessage2_eco_temp = 6;
|
||||||
static constexpr uint8_t EMS_OFFSET_JunkersSetMessage2_heat_temp = 7;
|
static constexpr uint8_t EMS_OFFSET_JunkersSetMessage2_heat_temp = 7;
|
||||||
|
|
||||||
#define AUTO_HEATING_CIRCUIT 0
|
static constexpr uint8_t AUTO_HEATING_CIRCUIT = 0;
|
||||||
#define DEFAULT_HEATING_CIRCUIT 1
|
|
||||||
|
|
||||||
// Installation settings
|
// Installation settings
|
||||||
static constexpr uint8_t EMS_TYPE_IBASettings = 0xA5; // installation settings
|
static constexpr uint8_t EMS_TYPE_IBASettings = 0xA5; // installation settings
|
||||||
|
|||||||
Reference in New Issue
Block a user