CAN trace on its own debug tab (/trace.html), off the CAN analyzer: records between Start and Stop only (polled every 0.5 s, the server keeps the last 5000 frames, lost ones counted, stops at 20000), the newest on top; sorted by any column, filtered by text (a, b = either), frame type, interface, node and only changes; Δ per ID; 1000 rows drawn, the filter and sort over all; export as candump .log (can-utils, SavvyCAN, python-can) or the shown rows decoded as CSV; SDO objects named by esphome-canopen's EDS (public/can/esphome.eds, from can2mqtt) and its entity objects

This commit is contained in:
randy committed 2026-12-02 19:05:07 +01:00
1 parent b1a5d47859
commit 712c6bf7ad
9 files changed
+498 -125

No files matched your search

+3 -3
View File
@@ -137,7 +137,7 @@ module Maptool
# every frame id seen (count, rate, last data) and the decoded signals.
class Store
MAX_FRAME_IDS = 2048 # ponytail: stops counting new ids past this, enough for a bus
LOG_SIZE = 1000 # the last frames as they came, for /can.html's trace
LOG_SIZE = 5000 # the last frames as they came, for /trace.html (a few seconds of a busy bus)
# Signals starting with this aren't taken from the bus (the GNSS
# simulation's, put by #put, stand in for the node's meanwhile).
@@ -213,11 +213,11 @@ module Maptool
end
end
# log: the frames after seq `since` (none without it).
# log: the frames after seq `since` (none without it); log_seq: the last one's.
def snapshot(since: nil)
@mutex.synchronize do
snap = { interfaces: @interfaces.dup, nodes: @nodes.dup, signals: @signals.dup, frames: @frames.values.map(&:dup) }
since ? snap.merge(log: @log.select { |f| f[:seq] > since }) : snap
since ? snap.merge(log: @log.select { |f| f[:seq] > since }, log_seq: @seq) : snap
end
end
end