Improve phase trail and correlation controls
This commit is contained in:
+9
-1
@@ -1,5 +1,13 @@
|
||||
// core/config.js — zentrale CONFIG + Presets + Persistenz
|
||||
|
||||
export function normalizeCorrelationResponseSeconds(value) {
|
||||
const seconds = Number(value);
|
||||
if (!Number.isFinite(seconds) || seconds <= 0) return 1.0;
|
||||
if (seconds < 0.75) return 0.5;
|
||||
if (seconds < 1.75) return 1.0;
|
||||
return 2.5;
|
||||
}
|
||||
|
||||
function isLoopbackHost(host) {
|
||||
const h = String(host || '').trim().toLowerCase();
|
||||
return h === 'localhost' || h === '127.0.0.1' || h === '::1' || h === '[::1]';
|
||||
@@ -971,7 +979,7 @@ function loadConfig(opts = {}) {
|
||||
const fallback = Number.isFinite(CONFIG.GONIO_DISPLAY_GAIN_DB) ? CONFIG.GONIO_DISPLAY_GAIN_DB : 0;
|
||||
CONFIG.GONIO_MANUAL_GAIN_DB = Math.max(-35, Math.min(35, Math.round(fallback / 5) * 5));
|
||||
}
|
||||
CONFIG.CORR_RESPONSE_S = Number(CONFIG.CORR_RESPONSE_S) >= 1.75 ? 2.5 : 1.0;
|
||||
CONFIG.CORR_RESPONSE_S = normalizeCorrelationResponseSeconds(CONFIG.CORR_RESPONSE_S);
|
||||
const corrNegativeMarkerMode = String(CONFIG.CORR_NEGATIVE_MARKER_MODE || 'memory').toLowerCase();
|
||||
CONFIG.CORR_NEGATIVE_MARKER_MODE = ['memory', 'hold', 'off'].includes(corrNegativeMarkerMode)
|
||||
? corrNegativeMarkerMode
|
||||
|
||||
Reference in New Issue
Block a user