mirror of
https://github.com/esphome/esphome.git
synced 2024-12-20 16:18:49 +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))
|
if (!src.peek_space(this->sync_low_, 1))
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
if (!src.peek_space(this->sync_high_))
|
// We cant peek a space at the beginning because signals starts with a low to high transition.
|
||||||
return false;
|
// this long space at the beginning is the separation between the transmissions itself, so it is actually
|
||||||
if (!src.peek_mark(this->sync_low_, 1))
|
// 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;
|
return false;
|
||||||
|
src.advance(1);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
src.advance(2);
|
src.advance(2);
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user