Remove button mapping
This commit is contained in:
+7
-9
@@ -56,8 +56,12 @@
|
||||
#define CONFIG_FILENAME "/imu_mouse_cfg.bin"
|
||||
#define CONFIG_MAGIC 0xDEAD123EUL
|
||||
|
||||
// Physical button sentinel
|
||||
#define BTN_PIN_NONE 0xFF // Stored in btn*Pin when that button is disabled
|
||||
// Physical button pin assignments (hardcoded - set to 0xFF to disable a button)
|
||||
// Valid pin numbers: 0-10 (Arduino D0-D10 on XIAO nRF52840 Sense)
|
||||
#define BTN_PIN_NONE 0xFF
|
||||
#define BTN_LEFT_PIN BTN_PIN_NONE // e.g. 0 for D0
|
||||
#define BTN_RIGHT_PIN BTN_PIN_NONE // e.g. 1 for D1
|
||||
#define BTN_MIDDLE_PIN BTN_PIN_NONE // e.g. 2 for D2
|
||||
|
||||
// Runtime feature-override flags (cfg.featureFlags bitmask)
|
||||
// These mirror the compile-time FEATURE_* defines but can be toggled at runtime
|
||||
@@ -98,9 +102,6 @@ struct Config {
|
||||
float jerkThreshold; // jerk² threshold for tap-freeze detection
|
||||
uint8_t tapFreezeEnabled; // 1 = enable jerk-based cursor freeze during taps
|
||||
uint8_t featureFlags; // bitmask of FLAG_* - runtime feature overrides
|
||||
uint8_t btnLeftPin; // BTN_PIN_NONE or Arduino pin number (0-10 = D0-D10)
|
||||
uint8_t btnRightPin;
|
||||
uint8_t btnMiddlePin;
|
||||
};
|
||||
extern Config cfg;
|
||||
extern const Config CFG_DEFAULTS;
|
||||
@@ -120,11 +121,8 @@ struct __attribute__((packed)) ConfigBlob {
|
||||
uint8_t tapFreezeEnabled; // [19] 1 = enable jerk-based cursor freeze during taps
|
||||
float jerkThreshold; // [20] jerk² tap-freeze threshold
|
||||
uint8_t featureFlags; // [24] FLAG_* bitmask - runtime feature overrides
|
||||
uint8_t btnLeftPin; // [25] BTN_PIN_NONE or Arduino pin (0-10 = D0-D10)
|
||||
uint8_t btnRightPin; // [26]
|
||||
uint8_t btnMiddlePin; // [27]
|
||||
};
|
||||
static_assert(sizeof(ConfigBlob) == 28, "ConfigBlob must be 28 bytes");
|
||||
static_assert(sizeof(ConfigBlob) == 25, "ConfigBlob must be 25 bytes");
|
||||
|
||||
// TelemetryPacket (24 bytes)
|
||||
#ifdef FEATURE_TELEMETRY
|
||||
|
||||
Reference in New Issue
Block a user