adjust ac value, fix weather in standby, add mutex safeguard

This commit is contained in:
reaw 2024-02-17 01:19:16 +07:00
parent 68dac6a4d0
commit 9016c70fac
3 changed files with 9 additions and 5 deletions

Binary file not shown.

View file

@ -945,11 +945,15 @@ void ISEDisplay::updateACState()
this->displayAdapter->print("ac_sw.pic2="); this->displayAdapter->print("ac_sw.pic2=");
this->displayAdapter->print(mode != 0 ? COMPONENT_AC_TOGGLE_PIC_ON_PRESSED : COMPONENT_AC_TOGGLE_PIC_OFF_PRESSED); this->displayAdapter->print(mode != 0 ? COMPONENT_AC_TOGGLE_PIC_ON_PRESSED : COMPONENT_AC_TOGGLE_PIC_OFF_PRESSED);
this->sendStopBytes(); this->sendStopBytes();
this->giveSerialMutex();
updateuserACmode(); updateuserACmode();
updateACfanSpeed(); updateACfanSpeed();
if (!this->takeSerialMutex())
return;
this->displayAdapter->print("ac_temp.val="); this->displayAdapter->print("ac_temp.val=");
this->displayAdapter->print(temperature); this->displayAdapter->print(temperature);
// this->displayAdapter->print("\""); // this->displayAdapter->print("\"");

View file

@ -7,7 +7,7 @@ RemoteVariable weather = RemoteVariable();
RemoteVariable pm_switch = RemoteVariable(); RemoteVariable pm_switch = RemoteVariable();
RemoteVariable pm_fan_speed = RemoteVariable(); RemoteVariable pm_fan_speed = RemoteVariable();
const char *mode_names[] = {"off", "cool", "fan_only"}; const char *mode_names[] = {"off", "cool", "fan_only", "dry"};
const char *fan_speed_names[] = {"auto", "high", "medium", "low"}; const char *fan_speed_names[] = {"auto", "high", "medium", "low"};
uint8_t row = 4; uint8_t row = 4;
uint8_t column = 2; uint8_t column = 2;
@ -19,9 +19,9 @@ const uint8_t light_array[4][2] = {
AirConditioner ac = { AirConditioner ac = {
.max_temperature = 30, .max_temperature = 32,
.min_temperature = 15, .min_temperature = 16,
.modes = 3, .modes = 4,
.mode_names = mode_names, .mode_names = mode_names,
.fan_speeds = 4, .fan_speeds = 4,
.fan_speed_names = fan_speed_names, .fan_speed_names = fan_speed_names,