ESPHome 2026.11.0-dev
Loading...
Searching...
No Matches
hrxl_maxsonar_wr.h
Go to the documentation of this file.
1#pragma once
2
7
9
11 public:
12 // Nothing really public.
13
14 // ========== INTERNAL METHODS ==========
15 void loop() override;
16 void dump_config() override;
17
18 protected:
19 void handle_line_(const char *line, size_t len);
20
21 // "R1234" plus the NUL; the sensor ends each reading with CR and sometimes injects a rogue 0xFF byte
23};
24
25} // namespace esphome::hrxl_maxsonar_wr
Collects bytes into NUL terminated lines of up to N - 1 characters; IGNORE_CHAR bytes are skipped and...
Definition line_reader.h:15
void loop() override
HRXL sensors output the format "R1234\r" at 6Hz The 1234 means 1234mm XL sensors output the format "R...
void handle_line_(const char *line, size_t len)
LineReader< 6, '\r', static_cast< char >(0xFF)> line_reader_
Base-class for all sensors.
Definition sensor.h:47
const void size_t len
Definition hal.h:68