Skip to content

Commit

Permalink
Re-format code
Browse files Browse the repository at this point in the history
  • Loading branch information
dzungpv committed Feb 20, 2024
1 parent 4fde783 commit d0ba747
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions src/HeatPump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,18 +235,15 @@ heatpumpSettings HeatPump::getSettings() {
return currentSettings;
}

heatpumpSettings HeatPump::getWantedSettings()
{
heatpumpSettings HeatPump::getWantedSettings() {
return wantedSettings;
}

unsigned long HeatPump::getLastWanted()
{
unsigned long HeatPump::getLastWanted() {
return lastWanted;
}

void HeatPump::setFastSync(bool setting)
{
void HeatPump::setFastSync(bool setting) {
fastSync = setting;
}

Expand Down Expand Up @@ -558,12 +555,10 @@ void HeatPump::createInfoPacket(byte *packet, byte packetType) {
} else {
// request current infoMode, and increment for the next request
packet[5] = INFOMODE[infoMode];
if (infoMode == (fastSync ? 2 : (INFOMODE_LEN - 1)))
{ // if enable fastSync we only request RQST_PKT_SETTINGS, RQST_PKT_ROOM_TEMP and RQST_PKT_STATUS, so the sync will be 2x faster
// if enable fastSync we only request RQST_PKT_SETTINGS, RQST_PKT_ROOM_TEMP and RQST_PKT_STATUS, so the sync will be 2x faster
if (infoMode == (fastSync ? 2 : (INFOMODE_LEN - 1))) {
infoMode = 0;
}
else
{
} else {
infoMode++;
}
}
Expand Down

0 comments on commit d0ba747

Please sign in to comment.