-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMappings.h
More file actions
49 lines (40 loc) · 2.07 KB
/
Mappings.h
File metadata and controls
49 lines (40 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// Mappings.h – Panel and Device Definitions for CockpitOS
#pragma once
// ==============================================================================================================
// PCA9555 panels are auto-detected from InputMapping.h and LEDMapping.h at startup.
// No manual registration is needed — just add PCA_0xNN entries to your label set's mappings.
// Most logic for button handling (cover gates, latched/momentary behavior) is automated and managed in Mappings.cpp.
//
// All other button/cover logic is handled automatically unless you require custom overrides.
// ==============================================================================================================
#include "src/Generated/PanelKind.h"
const char* getPanelName(uint8_t addr); // Returns "PCA 0xNN" for discovered PCA devices
#define MAX_COVER_GATES 16 // Or whatever is your true max, bump as needed!
#define MAX_LATCHED_BUTTONS 16 // or however many you'll need
#include "src/Core/CoverGateDef.h"
// kCoverGates[] and kLatchedButtons[] are defined inline in LabelSetSelect.h
// (included via Pins.h into every translation unit)
void initMappings();
void initializePanels(bool force);
void panelLoop();
void initializeLEDs();
void initializeDisplays();
bool isLatchedButton(const char* label);
// Uncomment any X(AXIS_*) to invert, comment again with /* X(AXIS_*) */ to revert
#define INVERTED_AXIS_LIST(X) \
/* X(AXIS_X) */ \
/* X(AXIS_Y) */ \
/* X(AXIS_Z) */ \
/* X(AXIS_RX) */ \
/* X(AXIS_RY) */ \
/* X(AXIS_RZ) */ \
/* X(AXIS_DIAL) */ \
/* X(AXIS_SLIDER) */ \
/* X(AXIS_SLIDER1) */ \
/* X(AXIS_SLIDER2) */ \
/* X(AXIS_SLIDER3) */ \
/* X(AXIS_SLIDER4) */ \
/* X(AXIS_SLIDER5) */ \
/* X(AXIS_SLIDER6) */ \
/* X(AXIS_SLIDER7) */ \
/* X(AXIS_SLIDER8) */