mirror of
https://github.com/esphome/esphome.git
synced 2024-12-18 15:57:58 +01:00
fix rc switch protocol 6 (#2672)
This commit is contained in:
parent
97eaf3d4a1
commit
6e5cfac927
@ -101,10 +101,13 @@ bool RCSwitchBase::expect_sync(RemoteReceiveData &src) const {
|
||||
if (!src.peek_space(this->sync_low_, 1))
|
||||
return false;
|
||||
} else {
|
||||
if (!src.peek_space(this->sync_high_))
|
||||
return false;
|
||||
if (!src.peek_mark(this->sync_low_, 1))
|
||||
// We cant peek a space at the beginning because signals starts with a low to high transition.
|
||||
// this long space at the beginning is the separation between the transmissions itself, so it is actually
|
||||
// added at the end kind of artificially (by the value given to "idle:" option by the user in the yaml)
|
||||
if (!src.peek_mark(this->sync_low_))
|
||||
return false;
|
||||
src.advance(1);
|
||||
return true;
|
||||
}
|
||||
src.advance(2);
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user