This commit is contained in:
MichaelDvP
2020-06-03 17:55:43 +02:00
20 changed files with 79 additions and 78 deletions

View File

@@ -401,7 +401,7 @@ bool Thermostat::updated_values() {
static uint16_t current_value_ = 0;
for (const auto & hc : heating_circuits_) {
// don't publish if we haven't yet received some data
// if ((hc->setpoint_roomTemp == EMS_VALUE_SHORT_NOTSET) || (hc->curr_roomTemp == EMS_VALUE_SHORT_NOTSET)) {
// if ((hc->setpoint_roomTemp == EMS_VALUE_SHORT_NOTSET) || (hc->curr_roomTemp == EMS_VALUE_SHORT_NOTSET)) {
if (hc->setpoint_roomTemp == EMS_VALUE_SHORT_NOTSET) {
return false;
}
@@ -470,7 +470,7 @@ void Thermostat::publish_values() {
// go through all the heating circuits
for (const auto & hc : heating_circuits_) {
// if ((hc->setpoint_roomTemp == EMS_VALUE_SHORT_NOTSET) || (hc->curr_roomTemp == EMS_VALUE_SHORT_NOTSET)) {
// if ((hc->setpoint_roomTemp == EMS_VALUE_SHORT_NOTSET) || (hc->curr_roomTemp == EMS_VALUE_SHORT_NOTSET)) {
if (hc->setpoint_roomTemp == EMS_VALUE_SHORT_NOTSET) {
break; // skip this HC
}
@@ -535,7 +535,7 @@ void Thermostat::publish_values() {
if (hc->designtemp != EMS_VALUE_UINT_NOTSET) {
dataThermostat["designtemp"] = hc->designtemp;
}
if (hc->designtemp != EMS_VALUE_UINT_NOTSET) {
if (hc->summertemp != EMS_VALUE_UINT_NOTSET) {
dataThermostat["summertemp"] = hc->summertemp;
}
@@ -780,7 +780,7 @@ std::string Thermostat::mode_tostring(uint8_t mode) const {
void Thermostat::show_values(uuid::console::Shell & shell) {
EMSdevice::show_values(shell); // always call this to show header
char buffer[10]; // for formatting only
char buffer[10]; // for formatting only
uint8_t flags = (this->flags() & 0x0F); // specific thermostat characteristics, strip the option bits
if (datetime_.size()) {
@@ -832,7 +832,6 @@ void Thermostat::show_values(uuid::console::Shell & shell) {
}
}
if (flags == EMS_DEVICE_FLAG_RC35 || flags == EMS_DEVICE_FLAG_RC30_1) {
if (ibaCalIntTemperature != EMS_VALUE_INT_NOTSET) {
print_value(shell, 2, F("Offset int. temperature"), F_(degrees), Helpers::render_value(buffer, ibaCalIntTemperature, 2));
}
@@ -1056,7 +1055,7 @@ void Thermostat::process_RC35Monitor(std::shared_ptr<const Telegram> telegram) {
std::shared_ptr<Thermostat::HeatingCircuit> hc = heating_circuit(telegram);
telegram->read_value8(hc->setpoint_roomTemp, 2); // is * 2, force to single byte, is 0 in summermode
telegram->read_value(hc->curr_roomTemp, 3); // is * 10 - or 0x7D00 if thermostat is mounted on boiler
telegram->read_value(hc->curr_roomTemp, 3); // is * 10 - or 0x7D00 if thermostat is mounted on boiler
telegram->read_value(hc->mode_type, 1, 1);
telegram->read_value(hc->summer_mode, 1, 0);
telegram->read_value(hc->holiday_mode, 0, 5);
@@ -1341,13 +1340,13 @@ void Thermostat::set_temperature(const float temperature, const uint8_t mode, co
case HeatingCircuit::Mode::OFFSET: // change the offset temp
offset = EMS_OFFSET_RC35Set_temp_offset;
break;
case HeatingCircuit::Mode::DESIGN:
case HeatingCircuit::Mode::DESIGN:
offset = EMS_OFFSET_RC35Set_temp_design;
break;
case HeatingCircuit::Mode::SUMMER:
case HeatingCircuit::Mode::SUMMER:
offset = EMS_OFFSET_RC35Set_temp_summer;
break;
case HeatingCircuit::Mode::NOFROST:
case HeatingCircuit::Mode::NOFROST:
offset = EMS_OFFSET_RC35Set_temp_nofrost;
break;
default:
@@ -1460,7 +1459,6 @@ void Thermostat::console_commands(Shell & shell, unsigned int context) {
flash_string_vector{F_(degrees_mandatory), F_(hc_optional),F_(mode_optional)},
[=](Shell & shell __attribute__((unused)), const std::vector<std::string> & arguments) {
uint8_t hc = (arguments.size() >= 2) ? arguments[1].at(0) - '0' : DEFAULT_HEATING_CIRCUIT;
//uint8_t mode = (arguments.size() == 3) ? atoi(arguments.back().c_str()) : HeatingCircuit::Mode::AUTO;
if ((arguments.size() == 3)) {
set_temperature(atof(arguments.front().c_str()), arguments.back().c_str(), hc);
} else {