Keypads as channels and bindings, the PDMs' way (lib/maptool/keypad.rb): can.json's keypads (a Blink Marine PKP by its protocol, or any signals as inputs) give channels pad.K1, pad.E3, pad.E3 press; the drive profile's bindings give each a screen action, a knob action (zoom, pan, rows), another in an open menu and its LED colour, sent back to the PKP. Outputs (lib/maptool/outputs.rb): relay modules (simulated, no current measured), a binding's output with toggle/on/off/hold/pulse, hold off when the keypad goes silent, the state re-sent every 100 ms; /sim.html switches them by hand. CANopen TIME from maptool while no other node sends it (lib/maptool/can_time.rb), shown in /can.html
CI / check (push) Successful in 23s
CI / deploy (push) Successful in 17s

This commit is contained in:
randy committed 2026-12-04 16:14:39 +01:00
1 parent bf90f4cf23
commit 38fb06853e
14 files changed
+785 -24

No files matched your search

+7 -3
View File
@@ -316,9 +316,13 @@ the menus' own buttons carry theirs (1 2 3, H). In an open menu ↑ ↓
move the row (the keypad's encoder sends the same arrows), Enter its
first button, Space its eye, + adds it, ⌫ up a folder, Esc closes.
Every bound button shows its key in the corner, from the first key
pressed on. Still to do: the keypad's keys from the bus, its heartbeat
switching the labels to the keypad by itself, and the switch (auto /
keyboard / keypad) and the mapping in our diagnostics.
pressed on. Keypads are channels (`pad.K1`, `pad.E3`) and the
profile's `"bindings"` say what each does (below, a binding), so any
keypad fits; a keypad's heartbeat switches the labels to its channels by
itself, a line under each screen key in its LED colour (menus cyan, the
map white, the view amber, green while on).
Still to do: the switch (auto / keyboard / keypad) and the mapping in our
diagnostics.
*Terrain* (artboard GridTerrain): the inclinometer only off-road — on
the road its cells show the elevation ahead. A 7 × 8 panel like a menu,