Skip to content

Commit

Permalink
Clean some code smells
Browse files Browse the repository at this point in the history
  • Loading branch information
limkinZero committed Nov 13, 2023
1 parent 3bfd225 commit 0028dc1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ecodan-ha-local/ehal_hp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -388,10 +388,10 @@ namespace ehal::hp
bool set_power_mode(bool on)
{
Message cmd{MsgType::SET_CMD, SetType::BASIC_SETTINGS};
cmd[1] = SET_SETTINGS_FLAG_SYSTEM_MODE_POWER;
cmd[1] = SET_SETTINGS_FLAG_MODE_TOGGLE;
cmd[3] = on ? 1 : 0;
{
std::lock_guard<std::mutex>{cmdQueueMutex};
std::lock_guard<std::mutex> lock{cmdQueueMutex};
cmdQueue.emplace(std::move(cmd));
}

Expand Down
1 change: 0 additions & 1 deletion ecodan-ha-local/ehal_proto.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ namespace ehal::hp
#define SET_SETTINGS_FLAG_HP_MODE 0x08
#define SET_SETTINGS_FLAG_DHW_MODE 0x04
#define SET_SETTINGS_FLAG_MODE_TOGGLE 0x1
#define SET_SETTINGS_FLAG_SYSTEM_MODE_POWER 0x01

enum class SetZone
{
Expand Down

0 comments on commit 0028dc1

Please sign in to comment.