Attempt to add jerk correction

This commit is contained in:
2026-03-02 23:53:10 +01:00
parent 4768754bef
commit a666304013
6 changed files with 215 additions and 14 deletions

View File

@@ -75,6 +75,7 @@ void pushConfigBlob() {
b.tapKey = cfg.tapKey;
b.tapMod = cfg.tapMod;
b._pad = 0;
b.jerkThreshold = cfg.jerkThreshold;
cfgBlob.write((uint8_t*)&b, sizeof(b));
}
#endif
@@ -117,6 +118,7 @@ void onConfigBlobWrite(uint16_t h, BLECharacteristic* c, uint8_t* d, uint16_t l)
cfg.tapKey = b->tapKey;
cfg.tapMod = b->tapMod;
#endif
if (b->jerkThreshold >= 100.0f && b->jerkThreshold <= 50000.0f) cfg.jerkThreshold = b->jerkThreshold;
saveConfig();
Serial.print("[CFG] Written — sens="); Serial.print(cfg.sensitivity,0);
Serial.print(" dz="); Serial.print(cfg.deadZone,3);