Skip to content

Commit

Permalink
Use signed integers for outside and inside temperatures
Browse files Browse the repository at this point in the history
  • Loading branch information
DomiStyle committed Nov 12, 2021
1 parent 8bfd463 commit 8aae263
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions components/panasonic_ac/esppac.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ void PanasonicAC::read_data() {
}
}

void PanasonicAC::update_outside_temperature(uint8_t temperature) {
void PanasonicAC::update_outside_temperature(int8_t temperature) {
if (temperature > TEMPERATURE_THRESHOLD) {
ESP_LOGW(TAG, "Received out of range outside temperature: %d", temperature);
return;
Expand All @@ -70,7 +70,7 @@ void PanasonicAC::update_outside_temperature(uint8_t temperature) {
temperature); // Set current (outside) temperature; no temperature steps
}

void PanasonicAC::update_current_temperature(uint8_t temperature) {
void PanasonicAC::update_current_temperature(int8_t temperature) {
if (temperature > TEMPERATURE_THRESHOLD) {
ESP_LOGW(TAG, "Received out of range inside temperature: %d", temperature);
return;
Expand Down
4 changes: 2 additions & 2 deletions components/panasonic_ac/esppac.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ class PanasonicAC : public Component, public uart::UARTDevice, public climate::C

void read_data();

void update_outside_temperature(uint8_t temperature);
void update_current_temperature(uint8_t temperature);
void update_outside_temperature(int8_t temperature);
void update_current_temperature(int8_t temperature);
void update_target_temperature(uint8_t raw_value);
void update_swing_horizontal(const std::string &swing);
void update_swing_vertical(const std::string &swing);
Expand Down

0 comments on commit 8aae263

Please sign in to comment.