mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
add comments
This commit is contained in:
@@ -252,7 +252,7 @@ std::shared_ptr<Thermostat::HeatingCircuit> Thermostat::heating_circuit(const in
|
|||||||
// if its a new one, the heating circuit object will be created and also the fetch flags set
|
// if its a new one, the heating circuit object will be created and also the fetch flags set
|
||||||
std::shared_ptr<Thermostat::HeatingCircuit> Thermostat::heating_circuit(std::shared_ptr<const Telegram> telegram) {
|
std::shared_ptr<Thermostat::HeatingCircuit> Thermostat::heating_circuit(std::shared_ptr<const Telegram> telegram) {
|
||||||
// look through the Monitor and Set arrays to see if there is a match
|
// look through the Monitor and Set arrays to see if there is a match
|
||||||
uint8_t hc_num = 0;
|
uint8_t hc_num = 0; // 0 means we haven't found it yet
|
||||||
bool toggle_ = false;
|
bool toggle_ = false;
|
||||||
|
|
||||||
// search device-id types for remote thermostats first, they have only a single typeid for all hcs
|
// search device-id types for remote thermostats first, they have only a single typeid for all hcs
|
||||||
@@ -269,8 +269,10 @@ std::shared_ptr<Thermostat::HeatingCircuit> Thermostat::heating_circuit(std::sha
|
|||||||
toggle_ = true;
|
toggle_ = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Serial.println();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// not found, search status message/set types
|
// not found, search status message/set types
|
||||||
if (hc_num == 0) {
|
if (hc_num == 0) {
|
||||||
for (uint8_t i = 0; i < set_typeids.size(); i++) {
|
for (uint8_t i = 0; i < set_typeids.size(); i++) {
|
||||||
|
|||||||
@@ -109,6 +109,7 @@ class Thermostat : public EMSdevice {
|
|||||||
return hc_num_;
|
return hc_num_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// returns heating circuit number 0..9
|
||||||
uint8_t hc() const {
|
uint8_t hc() const {
|
||||||
return hc_num_ - 1;
|
return hc_num_ - 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user