Skip to content

Commit 0f11cbe

Browse files
committed
MitsubishiAC: Fix code lint issue.
* Fix a code linter warning. * Improve documentation. * Improve a unit test. Ref #1572
1 parent e507b60 commit 0f11cbe

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

src/ir_Mitsubishi.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,7 @@ void IRMitsubishiAC::setMode(const uint8_t mode) {
455455
}
456456

457457
/// Set the requested vane (Vertical Swing) operation mode of the a/c unit.
458+
/// @note On some models, this represents the Right vertical vane.
458459
/// @param[in] position The position/mode to set the vane to.
459460
void IRMitsubishiAC::setVane(const uint8_t position) {
460461
uint8_t pos = std::min(position, kMitsubishiAcVaneAutoMove); // bounds check
@@ -469,6 +470,7 @@ void IRMitsubishiAC::setWideVane(const uint8_t position) {
469470
}
470471

471472
/// Get the Vane (Vertical Swing) mode of the A/C.
473+
/// @note On some models, this represents the Right vertical vane.
472474
/// @return The native position/mode setting.
473475
uint8_t IRMitsubishiAC::getVane(void) const {
474476
return _.Vane;

src/ir_Mitsubishi.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ union Mitsubishi144Protocol{
9191
uint8_t :8;
9292
// Byte 16
9393
uint8_t :3;
94-
uint8_t VaneLeft :3; // SwingV(Left)
94+
uint8_t VaneLeft :3; // SwingV(Left)
9595
uint8_t :2;
9696
// Byte 17
9797
uint8_t Sum :8;

test/ir_Mitsubishi_test.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,7 @@ TEST(TestMitsubishiACClass, MessageConstuction) {
725725
EXPECT_EQ(kMitsubishiAcCool, ac.getMode());
726726
EXPECT_EQ(27, ac.getTemp());
727727
EXPECT_EQ(3, ac.getVane());
728+
EXPECT_EQ(2, ac.getVaneLeft());
728729
EXPECT_TRUE(ac.getPower());
729730

730731
irsend.reset();

0 commit comments

Comments
 (0)