Attempt to add jerk correction
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user