Attempt to add jerk correction
This commit is contained in:
+4
-2
@@ -53,7 +53,7 @@
|
||||
|
||||
// ─── Persistence ──────────────────────────────────────────────────────────────
|
||||
#define CONFIG_FILENAME "/imu_mouse_cfg.bin"
|
||||
#define CONFIG_MAGIC 0xDEAD1239UL
|
||||
#define CONFIG_MAGIC 0xDEAD123AUL
|
||||
|
||||
// ─── Enums ────────────────────────────────────────────────────────────────────
|
||||
enum CurveType : uint8_t { CURVE_LINEAR=0, CURVE_SQUARE=1, CURVE_SQRT=2 };
|
||||
@@ -83,6 +83,7 @@ struct Config {
|
||||
TapAction tapAction; // what a double-tap does
|
||||
uint8_t tapKey; // HID keycode (used when tapAction == TAP_ACTION_KEY)
|
||||
uint8_t tapMod; // HID modifier byte (used when tapAction == TAP_ACTION_KEY)
|
||||
float jerkThreshold; // jerk² threshold for tap-freeze detection
|
||||
};
|
||||
extern Config cfg;
|
||||
extern const Config CFG_DEFAULTS;
|
||||
@@ -100,8 +101,9 @@ struct __attribute__((packed)) ConfigBlob {
|
||||
uint8_t tapKey; // [17] HID keycode
|
||||
uint8_t tapMod; // [18] HID modifier
|
||||
uint8_t _pad; // [19]
|
||||
float jerkThreshold; // [20] jerk² tap-freeze threshold
|
||||
};
|
||||
static_assert(sizeof(ConfigBlob) == 20, "ConfigBlob must be 20 bytes");
|
||||
static_assert(sizeof(ConfigBlob) == 24, "ConfigBlob must be 24 bytes");
|
||||
|
||||
// ─── TelemetryPacket (24 bytes) ───────────────────────────────────────────────
|
||||
#ifdef FEATURE_TELEMETRY
|
||||
|
||||
Reference in New Issue
Block a user