[ld2420] Increase MAX_LINE_LENGTH to allow footer-based resync (#14137)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jonathan Swoboda
2026-02-19 22:36:12 -05:00
parent 49afe53a2c
commit 4c8e0575f9

View File

@@ -21,7 +21,9 @@
namespace esphome::ld2420 {
static constexpr uint8_t CALIBRATE_SAMPLES = 64;
static constexpr uint8_t MAX_LINE_LENGTH = 46; // Max characters for serial buffer
// Energy frame is 45 bytes; +1 for null terminator, +4 so that a frame footer always lands
// inside the buffer during footer-based resynchronization after losing sync.
static constexpr uint8_t MAX_LINE_LENGTH = 50;
static constexpr uint8_t TOTAL_GATES = 16;
enum OpMode : uint8_t {