mirror of
https://github.com/esphome/esphome.git
synced 2025-09-13 16:52:18 +01:00
Run clang-tidy against ESP32 (#2147)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Co-authored-by: Otto winter <otto@otto-winter.com>
This commit is contained in:
@@ -10,7 +10,7 @@ static const uint32_t BIT_TIME_US = 889;
|
||||
static const uint8_t NBITS = 14;
|
||||
|
||||
void RC5Protocol::encode(RemoteTransmitData *dst, const RC5Data &data) {
|
||||
static bool TOGGLE = false;
|
||||
static bool toggle = false;
|
||||
dst->set_carrier_frequency(36000);
|
||||
|
||||
uint64_t out_data = 0;
|
||||
@@ -21,7 +21,7 @@ void RC5Protocol::encode(RemoteTransmitData *dst, const RC5Data &data) {
|
||||
} else {
|
||||
out_data |= 0b11 << 12;
|
||||
}
|
||||
out_data |= TOGGLE << 11;
|
||||
out_data |= toggle << 11;
|
||||
out_data |= data.address << 6;
|
||||
out_data |= command;
|
||||
|
||||
@@ -34,7 +34,7 @@ void RC5Protocol::encode(RemoteTransmitData *dst, const RC5Data &data) {
|
||||
dst->space(BIT_TIME_US);
|
||||
}
|
||||
}
|
||||
TOGGLE = !TOGGLE;
|
||||
toggle = !toggle;
|
||||
}
|
||||
optional<RC5Data> RC5Protocol::decode(RemoteReceiveData src) {
|
||||
RC5Data out{
|
||||
|
Reference in New Issue
Block a user