1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-24 22:22:22 +01:00

Clean-up reverse_bits helpers (#3011)

This commit is contained in:
Oxan van Leeuwen
2022-01-06 12:54:58 +01:00
committed by GitHub
parent 5e1e543b06
commit a4931f5d78
4 changed files with 20 additions and 22 deletions

View File

@@ -9,8 +9,8 @@ static const char *const TAG = "remote.midea";
uint8_t MideaData::calc_cs_() const {
uint8_t cs = 0;
for (const uint8_t *it = this->data(); it != this->data() + OFFSET_CS; ++it)
cs -= reverse_bits_8(*it);
return reverse_bits_8(cs);
cs -= reverse_bits(*it);
return reverse_bits(cs);
}
bool MideaData::check_compliment(const MideaData &rhs) const {