Make tap freezing configurable, add toggles to other functions, minor UI changes
This commit is contained in:
@@ -72,10 +72,11 @@ void pushConfigBlob() {
|
||||
b.chargeMode = (uint8_t)cfg.chargeMode;
|
||||
b.tapThreshold = cfg.tapThreshold;
|
||||
b.tapAction = (uint8_t)cfg.tapAction;
|
||||
b.tapKey = cfg.tapKey;
|
||||
b.tapMod = cfg.tapMod;
|
||||
b._pad = 0;
|
||||
b.jerkThreshold = cfg.jerkThreshold;
|
||||
b.tapKey = cfg.tapKey;
|
||||
b.tapMod = cfg.tapMod;
|
||||
b.tapFreezeEnabled = cfg.tapFreezeEnabled;
|
||||
b.jerkThreshold = cfg.jerkThreshold;
|
||||
b.featureFlags = cfg.featureFlags;
|
||||
cfgBlob.write((uint8_t*)&b, sizeof(b));
|
||||
}
|
||||
#endif
|
||||
@@ -118,7 +119,9 @@ void onConfigBlobWrite(uint16_t h, BLECharacteristic* c, uint8_t* d, uint16_t l)
|
||||
cfg.tapKey = b->tapKey;
|
||||
cfg.tapMod = b->tapMod;
|
||||
#endif
|
||||
cfg.tapFreezeEnabled = b->tapFreezeEnabled ? 1 : 0;
|
||||
if (b->jerkThreshold >= 100.0f && b->jerkThreshold <= 50000.0f) cfg.jerkThreshold = b->jerkThreshold;
|
||||
cfg.featureFlags = b->featureFlags & (FLAG_TAP_ENABLED | FLAG_TEMP_COMP_ENABLED | FLAG_AUTO_RECAL_ENABLED);
|
||||
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