Graph cleanup

This commit is contained in:
Martin Bauer
2020-06-30 18:06:37 +02:00
parent a870a0af85
commit 23eb634c30
7 changed files with 84 additions and 53 deletions

View File

@@ -126,10 +126,8 @@ export const deviceStateReducer = (state = INITIAL_DEVICE_STATE, action) => {
case DEVICE_DISCONNECT:
return { ...INITIAL_DEVICE_STATE, connState: ConnState.DISCONNECTED };
case SESSION_STARTED:
console.log("session started");
return { ...INITIAL_DEVICE_STATE, connState: ConnState.CONNECTED_RUNNING, sessionId: action.sessionId };
case SESSION_STOPPED:
console.log("session stopped");
return { ...INITIAL_DEVICE_STATE, connState: ConnState.CONNECTED_STOPPED };
case START_SESSION:
if(state.connState === ConnState.SESSION_STARTED)

View File

@@ -34,10 +34,10 @@ const INITIAL_SETTINGS = {
windowSizeInSecs: 5,
numMeasurementsPerSec: 10,
kgFactor: 1.0 / 1100.0,
kgFactor: 1.0 / 700.0,
peakDetector: 'SIMPLE', // either 'SIMPLE' or 'ZSCORE'
peakDetectorSimpleThreshold: 2500,
peakDetectorSimpleThreshold: 2000,
peakDetectorZScoreLag: 8, // peak detector z-score values
peakDetectorZScoreThreshold: 2,