mirror of
https://github.com/crankyoldgit/IRremoteESP8266.git
synced 2026-01-12 00:05:10 +08:00
MitsubishiAC: Fix code lint issue. (#1576)
* Fix a code linter warning. * Improve documentation. * Improve a unit test. Ref #1572
This commit is contained in:
@@ -455,6 +455,7 @@ void IRMitsubishiAC::setMode(const uint8_t mode) {
|
||||
}
|
||||
|
||||
/// Set the requested vane (Vertical Swing) operation mode of the a/c unit.
|
||||
/// @note On some models, this represents the Right vertical vane.
|
||||
/// @param[in] position The position/mode to set the vane to.
|
||||
void IRMitsubishiAC::setVane(const uint8_t position) {
|
||||
uint8_t pos = std::min(position, kMitsubishiAcVaneAutoMove); // bounds check
|
||||
@@ -469,6 +470,7 @@ void IRMitsubishiAC::setWideVane(const uint8_t position) {
|
||||
}
|
||||
|
||||
/// Get the Vane (Vertical Swing) mode of the A/C.
|
||||
/// @note On some models, this represents the Right vertical vane.
|
||||
/// @return The native position/mode setting.
|
||||
uint8_t IRMitsubishiAC::getVane(void) const {
|
||||
return _.Vane;
|
||||
|
||||
@@ -91,7 +91,7 @@ union Mitsubishi144Protocol{
|
||||
uint8_t :8;
|
||||
// Byte 16
|
||||
uint8_t :3;
|
||||
uint8_t VaneLeft :3; // SwingV(Left)
|
||||
uint8_t VaneLeft :3; // SwingV(Left)
|
||||
uint8_t :2;
|
||||
// Byte 17
|
||||
uint8_t Sum :8;
|
||||
|
||||
@@ -725,6 +725,7 @@ TEST(TestMitsubishiACClass, MessageConstuction) {
|
||||
EXPECT_EQ(kMitsubishiAcCool, ac.getMode());
|
||||
EXPECT_EQ(27, ac.getTemp());
|
||||
EXPECT_EQ(3, ac.getVane());
|
||||
EXPECT_EQ(2, ac.getVaneLeft());
|
||||
EXPECT_TRUE(ac.getPower());
|
||||
|
||||
irsend.reset();
|
||||
|
||||
Reference in New Issue
Block a user