update naming.
This commit is contained in:
parent
d9233806d3
commit
c21653fd1e
@ -58,7 +58,7 @@ bool TrumaiNetBoxAppAirconManual::action_set_temp(u_int8_t temperature) {
|
|||||||
|
|
||||||
auto update_data = this->update_prepare();
|
auto update_data = this->update_prepare();
|
||||||
|
|
||||||
update_data->target_temp_aircon = decimal_to_aircon_temp(temperature);
|
update_data->target_temp_aircon = decimal_to_aircon_manual_temp(temperature);
|
||||||
|
|
||||||
this->update_submit();
|
this->update_submit();
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@ -59,7 +59,7 @@ TargetTemp decimal_to_room_temp(float val) {
|
|||||||
return decimal_to_temp(val);
|
return decimal_to_temp(val);
|
||||||
}
|
}
|
||||||
|
|
||||||
TargetTemp decimal_to_aircon_temp(u_int8_t val) {
|
TargetTemp decimal_to_aircon_manual_temp(u_int8_t val) {
|
||||||
if (val == 0) {
|
if (val == 0) {
|
||||||
return TargetTemp::TARGET_TEMP_OFF;
|
return TargetTemp::TARGET_TEMP_OFF;
|
||||||
}
|
}
|
||||||
@ -72,7 +72,33 @@ TargetTemp decimal_to_aircon_temp(u_int8_t val) {
|
|||||||
return decimal_to_temp(val);
|
return decimal_to_temp(val);
|
||||||
}
|
}
|
||||||
|
|
||||||
TargetTemp decimal_to_aircon_temp(float val) {
|
TargetTemp decimal_to_aircon_manual_temp(float val) {
|
||||||
|
if (std::isnan(val)) {
|
||||||
|
return TargetTemp::TARGET_TEMP_OFF;
|
||||||
|
}
|
||||||
|
if (val < 16) {
|
||||||
|
return TargetTemp::TARGET_TEMP_OFF;
|
||||||
|
}
|
||||||
|
if (val >= 31) {
|
||||||
|
return TargetTemp::TARGET_TEMP_AIRCON_MAX;
|
||||||
|
}
|
||||||
|
return decimal_to_temp(val);
|
||||||
|
}
|
||||||
|
|
||||||
|
TargetTemp decimal_to_aircon_auto_temp(u_int8_t val) {
|
||||||
|
if (val == 0) {
|
||||||
|
return TargetTemp::TARGET_TEMP_OFF;
|
||||||
|
}
|
||||||
|
if (val < 16) {
|
||||||
|
return TargetTemp::TARGET_TEMP_OFF;
|
||||||
|
}
|
||||||
|
if (val >= 31) {
|
||||||
|
return TargetTemp::TARGET_TEMP_AIRCON_MAX;
|
||||||
|
}
|
||||||
|
return decimal_to_temp(val);
|
||||||
|
}
|
||||||
|
|
||||||
|
TargetTemp decimal_to_aircon_auto_temp(float val) {
|
||||||
if (std::isnan(val)) {
|
if (std::isnan(val)) {
|
||||||
return TargetTemp::TARGET_TEMP_OFF;
|
return TargetTemp::TARGET_TEMP_OFF;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,8 +17,10 @@ TargetTemp decimal_to_temp(u_int8_t val);
|
|||||||
TargetTemp decimal_to_temp(float val);
|
TargetTemp decimal_to_temp(float val);
|
||||||
TargetTemp decimal_to_room_temp(u_int8_t val);
|
TargetTemp decimal_to_room_temp(u_int8_t val);
|
||||||
TargetTemp decimal_to_room_temp(float val);
|
TargetTemp decimal_to_room_temp(float val);
|
||||||
TargetTemp decimal_to_aircon_temp(u_int8_t val);
|
TargetTemp decimal_to_aircon_manual_temp(u_int8_t val);
|
||||||
TargetTemp decimal_to_aircon_temp(float val);
|
TargetTemp decimal_to_aircon_manual_temp(float val);
|
||||||
|
TargetTemp decimal_to_aircon_auto_temp(u_int8_t val);
|
||||||
|
TargetTemp decimal_to_aircon_auto_temp(float val);
|
||||||
TargetTemp decimal_to_water_temp(u_int8_t val);
|
TargetTemp decimal_to_water_temp(u_int8_t val);
|
||||||
TargetTemp decimal_to_water_temp(float val);
|
TargetTemp decimal_to_water_temp(float val);
|
||||||
const std::string operating_status_to_str(OperatingStatus val);
|
const std::string operating_status_to_str(OperatingStatus val);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user