Improve code reability.

This commit is contained in:
Your Name
2023-03-22 20:04:39 +01:00
parent 85d1afe874
commit 0956a94c38
28 changed files with 716 additions and 647 deletions

View File

@@ -26,13 +26,13 @@ void TrumaHeaterNumber::setup() {
void TrumaHeaterNumber::control(float value) {
switch (this->type_) {
case TRUMA_NUMBER_TYPE::TARGET_ROOM_TEMPERATURE:
this->parent_->action_heater_room(static_cast<u_int8_t>(value));
this->parent_->get_heater()->action_heater_room(static_cast<u_int8_t>(value));
break;
case TRUMA_NUMBER_TYPE::TARGET_WATER_TEMPERATURE:
this->parent_->action_heater_water(static_cast<u_int8_t>(value));
this->parent_->get_heater()->action_heater_water(static_cast<u_int8_t>(value));
break;
case TRUMA_NUMBER_TYPE::ELECTRIC_POWER_LEVEL:
this->parent_->action_heater_electric_power_level(static_cast<u_int16_t>(value));
this->parent_->get_heater()->action_heater_electric_power_level(static_cast<u_int16_t>(value));
break;
}
}