mirror of
https://github.com/randybb/esphome-configs.git
synced 2026-12-06 09:06:52 +01:00
ESPHome 2026.12: on_client_synced, CanPayload, cleanups
- LVGL panels (NSPanels, lvgl, lvgl-4848s040, m5core2, tft), m5paper: api on_client_synced instead of a 2 s delay and an api.connected check - car-can: on_frame x is canbus::CanPayload, frames_per_id keeps it without a heap vector - gateway: drop the commented ethernet (common/ethernet.yaml has it), LLDP (PR draft), manual_ip and use_address - clock-1, echo: drop the commented neopixelbus lights
This commit is contained in:
1 parent
01fe45ce8d
commit
0f6e2350cc
10 files changed
+23
-165
No files matched your search
+4
-5
@@ -48,7 +48,7 @@ logger:
|
||||
globals:
|
||||
# CAN ID -> frames seen and the last data
|
||||
- id: frames_per_id
|
||||
type: std::map<uint32_t, std::pair<uint32_t, std::vector<uint8_t>>>
|
||||
type: std::map<uint32_t, std::pair<uint32_t, canbus::CanPayload>>
|
||||
- id: ecm_last_seen
|
||||
type: uint32_t
|
||||
initial_value: '0'
|
||||
@@ -80,13 +80,12 @@ canbus:
|
||||
0x262, 0x263, 0x266, 0x2C1, 0x2C3, 0x3A0, 0x3D3, 0x4AC,
|
||||
0x440, 0x442, 0x443, 0x44D, 0x640};
|
||||
bool watch = std::find(std::begin(noisy), std::end(noisy), can_id) == std::end(noisy);
|
||||
bool changed = e.second != x;
|
||||
bool changed = !std::equal(x.begin(), x.end(), e.second.begin(), e.second.end());
|
||||
// 0x224 (brake): byte 5 counts, compare the rest
|
||||
if (can_id == 0x224 && x.size() > 5 && e.second.size() == x.size()) {
|
||||
watch = true;
|
||||
auto a = x, b = e.second;
|
||||
a[5] = b[5] = 0;
|
||||
changed = a != b;
|
||||
changed = !std::equal(x.begin(), x.begin() + 5, e.second.begin()) ||
|
||||
!std::equal(x.begin() + 6, x.end(), e.second.begin() + 6);
|
||||
}
|
||||
if (watch && e.first > 1 && changed) {
|
||||
char hex[format_hex_pretty_size(8)];
|
||||
|
||||
Reference in new issue
Block a user