mirror of
https://github.com/esphome/esphome.git
synced 2026-10-04 10:09:13 +00:00
[ld2420] Address review findings
Clear cmd_active_ when the blocking engine exhausts retries so loop() does not stay skipped forever, send config mode exit blind before abandoning a startup sequence so the module resumes streaming, and repeat the first frame in the delayed boot fixture so the initial state swallow cannot make the test flaky.
This commit is contained in:
@@ -45,10 +45,29 @@ uart_mock:
|
||||
0xF8, 0xF7, 0xF6, 0xF5,
|
||||
]
|
||||
|
||||
# Post-setup frame (t=3300ms): distance=50 proves streaming still works
|
||||
# after the setup handshake. Delay=1300ms keeps >1000ms publish throttle
|
||||
# gap from the first frame.
|
||||
- delay: 1300ms
|
||||
# Repeat frame (t=3100ms): distance=100 again. If the API client happens
|
||||
# to subscribe after the first frame, the first published state is
|
||||
# swallowed as the entity's initial state; repeating the value makes the
|
||||
# test's first collected state deterministic. Delay=1100ms keeps >1000ms
|
||||
# publish throttle gap from the first frame.
|
||||
- delay: 1100ms
|
||||
inject_rx:
|
||||
[
|
||||
0xF4, 0xF3, 0xF2, 0xF1,
|
||||
0x23, 0x00,
|
||||
0x01,
|
||||
0x64, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xF8, 0xF7, 0xF6, 0xF5,
|
||||
]
|
||||
|
||||
# Post-setup frame (t=4200ms): distance=50 proves streaming still works
|
||||
# after the setup handshake. Delay=1100ms keeps >1000ms publish throttle
|
||||
# gap from the repeat frame.
|
||||
- delay: 1100ms
|
||||
inject_rx:
|
||||
[
|
||||
0xF4, 0xF3, 0xF2, 0xF1,
|
||||
|
||||
Reference in New Issue
Block a user