New Midea IR component, improvements and fixes (#2847)

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
Sergey Dudanov
2022-01-10 02:47:19 +04:00
committed by GitHub
parent b406c6403c
commit 9a70bfa471
19 changed files with 664 additions and 230 deletions
+4 -4
View File
@@ -23,12 +23,12 @@ class IrFollowMeData : public IrData {
}
/* TEMPERATURE */
uint8_t temp() const { return this->data_[4] - 1; }
void set_temp(uint8_t val) { this->data_[4] = std::min(MAX_TEMP, val) + 1; }
uint8_t temp() const { return this->get_value_(4) - 1; }
void set_temp(uint8_t val) { this->set_value_(4, std::min(MAX_TEMP, val) + 1); }
/* BEEPER */
bool beeper() const { return this->data_[3] & 128; }
void set_beeper(bool val) { this->set_value_(3, 1, 7, val); }
bool beeper() const { return this->get_value_(3, 128); }
void set_beeper(bool val) { this->set_mask_(3, val, 128); }
protected:
static const uint8_t MAX_TEMP = 37;