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
This commit is contained in:
1 parent
bf90f4cf23
commit
38fb06853e
14 files changed
+785
-24
No files matched your search
+27
-11
@@ -21,16 +21,32 @@
|
||||
{ "area": "5 / 14 / 6 / 17", "widget": "field", "value": "toEnd" },
|
||||
{ "area": "6 / 14 / 9 / 17", "widget": "elevation", "km": 10 },
|
||||
{ "area": "9 / 14 / 10 / 17", "widget": "compass" },
|
||||
{ "area": "10 / 1 / 11 / 3", "widget": "key", "action": "trip", "key": "F1", "keypad": "K1" },
|
||||
{ "area": "10 / 3 / 11 / 5", "widget": "key", "action": "points", "key": "F2", "keypad": "K2" },
|
||||
{ "area": "10 / 5 / 11 / 7", "widget": "key", "action": "layers", "key": "F3", "keypad": "K3" },
|
||||
{ "area": "10 / 7 / 11 / 9", "widget": "key", "action": "search", "key": "/", "keypad": "K4" },
|
||||
{ "area": "10 / 9 / 11 / 11", "widget": "key", "action": "menu", "key": "F5", "keypad": "K5" },
|
||||
{ "area": "10 / 11 / 11 / 12", "widget": "key", "action": "zoomOut", "key": "-", "keypad": "E3 ⟲" },
|
||||
{ "area": "10 / 12 / 11 / 13", "widget": "key", "action": "zoomIn", "key": "+", "keypad": "E3 ⟳" },
|
||||
{ "area": "10 / 13 / 11 / 14", "widget": "key", "action": "pitch", "key": "3", "keypad": "K6" },
|
||||
{ "area": "10 / 14 / 11 / 15", "widget": "key", "action": "follow", "key": "f", "keypad": "E3 ⏎" },
|
||||
{ "area": "10 / 15 / 11 / 16", "widget": "key", "action": "terrain", "key": "t", "keypad": "K7" },
|
||||
{ "area": "10 / 16 / 11 / 17", "widget": "key", "action": "palette", "key": "n", "keypad": "K8" }
|
||||
{ "area": "10 / 1 / 11 / 3", "widget": "key", "action": "trip", "key": "F1" },
|
||||
{ "area": "10 / 3 / 11 / 5", "widget": "key", "action": "points", "key": "F2" },
|
||||
{ "area": "10 / 5 / 11 / 7", "widget": "key", "action": "layers", "key": "F3" },
|
||||
{ "area": "10 / 7 / 11 / 9", "widget": "key", "action": "search", "key": "/" },
|
||||
{ "area": "10 / 9 / 11 / 11", "widget": "key", "action": "menu", "key": "F5" },
|
||||
{ "area": "10 / 11 / 11 / 12", "widget": "key", "action": "zoomOut", "key": "-" },
|
||||
{ "area": "10 / 12 / 11 / 13", "widget": "key", "action": "zoomIn", "key": "+" },
|
||||
{ "area": "10 / 13 / 11 / 14", "widget": "key", "action": "pitch", "key": "3" },
|
||||
{ "area": "10 / 14 / 11 / 15", "widget": "key", "action": "follow", "key": "f" },
|
||||
{ "area": "10 / 15 / 11 / 16", "widget": "key", "action": "terrain", "key": "t" },
|
||||
{ "area": "10 / 16 / 11 / 17", "widget": "key", "action": "palette", "key": "n" }
|
||||
],
|
||||
"bindings": [
|
||||
{ "input": "pad.K1", "action": "trip", "led": "cyan" },
|
||||
{ "input": "pad.K2", "action": "points", "led": "cyan" },
|
||||
{ "input": "pad.K3", "action": "layers", "led": "cyan" },
|
||||
{ "input": "pad.K4", "action": "search", "led": "cyan" },
|
||||
{ "input": "pad.K5", "action": "menu", "menu": "close", "led": "cyan" },
|
||||
{ "input": "pad.K6", "action": "pitch", "led": "white" },
|
||||
{ "input": "pad.K7", "action": "terrain", "led": "yellow" },
|
||||
{ "input": "pad.K8", "action": "palette", "led": "yellow" },
|
||||
{ "input": "pad.E1", "action": "panX", "menu": "rows" },
|
||||
{ "input": "pad.E1 press", "menu": "enter" },
|
||||
{ "input": "pad.E2", "action": "panY" },
|
||||
{ "input": "pad.E2 press", "output": "relays.1" },
|
||||
{ "input": "pad.E3", "action": "zoom" },
|
||||
{ "input": "pad.E3 press", "action": "follow" }
|
||||
]
|
||||
}
|
||||
Reference in new issue
Block a user