remove newline character

This commit is contained in:
Siwat Sirichai 2024-01-11 22:11:13 +07:00
parent b4db37a8d6
commit c404b8a3bf

View file

@ -203,7 +203,7 @@ void CUDDisplay::updateLightGroupState() {
bool state = calculateLightGroupState(); bool state = calculateLightGroupState();
// Send the state to the display // Send the state to the display
this->displayAdapter->print("lt_bt.pic="); this->displayAdapter->print("lt_bt.pic=");
this->displayAdapter->println(state ? COMPONENT_LIGHT_TOGGLE_PIC_ON : COMPONENT_LIGHT_TOGGLE_PIC_OFF); this->displayAdapter->print(state ? COMPONENT_LIGHT_TOGGLE_PIC_ON : COMPONENT_LIGHT_TOGGLE_PIC_OFF);
this->sendStopBytes(); this->sendStopBytes();
} }
void CUDDisplay::updateFanGroupState() { void CUDDisplay::updateFanGroupState() {
@ -211,7 +211,7 @@ void CUDDisplay::updateFanGroupState() {
bool state = calculateFanGroupState(); bool state = calculateFanGroupState();
// Send the state to the display // Send the state to the display
this->displayAdapter->print("fan_bt.pic="); this->displayAdapter->print("fan_bt.pic=");
this->displayAdapter->println(state ? COMPONENT_FAN_TOGGLE_PIC_ON : COMPONENT_FAN_TOGGLE_PIC_OFF); this->displayAdapter->print(state ? COMPONENT_FAN_TOGGLE_PIC_ON : COMPONENT_FAN_TOGGLE_PIC_OFF);
this->sendStopBytes(); this->sendStopBytes();
} }
void CUDDisplay::updateAirPurifierState() { void CUDDisplay::updateAirPurifierState() {
@ -219,7 +219,7 @@ void CUDDisplay::updateAirPurifierState() {
bool state = this->outputCard->getState(7); bool state = this->outputCard->getState(7);
// Send the state to the display // Send the state to the display
this->displayAdapter->print("puri_bt.pic="); this->displayAdapter->print("puri_bt.pic=");
this->displayAdapter->println(state ? COMPONENT_AIR_PURIFIER_TOGGLE_PIC_ON : COMPONENT_AIR_PURIFIER_TOGGLE_PIC_OFF); this->displayAdapter->print(state ? COMPONENT_AIR_PURIFIER_TOGGLE_PIC_ON : COMPONENT_AIR_PURIFIER_TOGGLE_PIC_OFF);
this->sendStopBytes(); this->sendStopBytes();
} }
void CUDDisplay::updateACState() { void CUDDisplay::updateACState() {
@ -229,28 +229,28 @@ void CUDDisplay::updateACState() {
uint8_t temperature = this->climateCard->getTemperature(); uint8_t temperature = this->climateCard->getTemperature();
// Send the state to the display // Send the state to the display
this->displayAdapter->print("mode_off_btn.pic="); this->displayAdapter->print("mode_off_btn.pic=");
this->displayAdapter->println(mode == 0 ? COMPONENT_AC_MODE_OFF_PIC_ACTIVE : COMPONENT_AC_MODE_OFF_PIC_INACTIVE); this->displayAdapter->print(mode == 0 ? COMPONENT_AC_MODE_OFF_PIC_ACTIVE : COMPONENT_AC_MODE_OFF_PIC_INACTIVE);
this->sendStopBytes(); this->sendStopBytes();
this->displayAdapter->print("mode_fan_btn.pic="); this->displayAdapter->print("mode_fan_btn.pic=");
this->displayAdapter->println(mode == 1 ? COMPONENT_AC_MODE_FAN_ONLY_PIC_ACTIVE : COMPONENT_AC_MODE_FAN_ONLY_PIC_INACTIVE); this->displayAdapter->print(mode == 1 ? COMPONENT_AC_MODE_FAN_ONLY_PIC_ACTIVE : COMPONENT_AC_MODE_FAN_ONLY_PIC_INACTIVE);
this->sendStopBytes(); this->sendStopBytes();
this->displayAdapter->print("mode_cool_btn.pic="); this->displayAdapter->print("mode_cool_btn.pic=");
this->displayAdapter->println(mode == 2 ? COMPONENT_AC_MODE_COOL_PIC_ACTIVE : COMPONENT_AC_MODE_COOL_PIC_INACTIVE); this->displayAdapter->print(mode == 2 ? COMPONENT_AC_MODE_COOL_PIC_ACTIVE : COMPONENT_AC_MODE_COOL_PIC_INACTIVE);
this->sendStopBytes(); this->sendStopBytes();
this->displayAdapter->print("fan_auto_btn.pic="); this->displayAdapter->print("fan_auto_btn.pic=");
this->displayAdapter->println(fan_speed == 0 ? COMPONENT_AC_FAN_MODE_AUTO_PIC_ACTIVE : COMPONENT_AC_FAN_MODE_AUTO_PIC_INACTIVE); this->displayAdapter->print(fan_speed == 0 ? COMPONENT_AC_FAN_MODE_AUTO_PIC_ACTIVE : COMPONENT_AC_FAN_MODE_AUTO_PIC_INACTIVE);
this->sendStopBytes(); this->sendStopBytes();
this->displayAdapter->print("fan_1_btn.pic="); this->displayAdapter->print("fan_1_btn.pic=");
this->displayAdapter->println(fan_speed == 1 ? COMPONENT_AC_FAN_MODE_HIGH_PIC_ACTIVE : COMPONENT_AC_FAN_MODE_HIGH_PIC_INACTIVE); this->displayAdapter->print(fan_speed == 1 ? COMPONENT_AC_FAN_MODE_HIGH_PIC_ACTIVE : COMPONENT_AC_FAN_MODE_HIGH_PIC_INACTIVE);
this->sendStopBytes(); this->sendStopBytes();
this->displayAdapter->print("fan_2_btn.pic="); this->displayAdapter->print("fan_2_btn.pic=");
this->displayAdapter->println(fan_speed == 2 ? COMPONENT_AC_FAN_MODE_MEDIUM_PIC_ACTIVE : COMPONENT_AC_FAN_MODE_MEDIUM_PIC_INACTIVE); this->displayAdapter->print(fan_speed == 2 ? COMPONENT_AC_FAN_MODE_MEDIUM_PIC_ACTIVE : COMPONENT_AC_FAN_MODE_MEDIUM_PIC_INACTIVE);
this->sendStopBytes(); this->sendStopBytes();
this->displayAdapter->print("fan_3_btn.pic="); this->displayAdapter->print("fan_3_btn.pic=");
this->displayAdapter->println(fan_speed == 3 ? COMPONENT_AC_FAN_MODE_LOW_PIC_ACTIVE : COMPONENT_AC_FAN_MODE_LOW_PIC_INACTIVE); this->displayAdapter->print(fan_speed == 3 ? COMPONENT_AC_FAN_MODE_LOW_PIC_ACTIVE : COMPONENT_AC_FAN_MODE_LOW_PIC_INACTIVE);
this->sendStopBytes(); this->sendStopBytes();
this->displayAdapter->print("temp_txt.txt="); this->displayAdapter->print("temp_txt.txt=");
this->displayAdapter->println(temperature); this->displayAdapter->print(temperature);
this->displayAdapter->print("C"); this->displayAdapter->print("C");
this->sendStopBytes(); this->sendStopBytes();
} }