Skip to content

Commit

Permalink
updated default values
Browse files Browse the repository at this point in the history
  • Loading branch information
DennisMoschina committed Dec 12, 2023
1 parent bc5308a commit 121990b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class BadPostureReminder {
rollAngleThreshold: 20,
pitchAngleThreshold: 20,
timeThreshold: 10,
resetTimeThreshold: 2
resetTimeThreshold: 1
);
final OpenEarable _openEarable;
final AttitudeTracker _attitudeTracker;
Expand Down Expand Up @@ -100,7 +100,9 @@ class BadPostureReminder {
// Calculate the duration in seconds
int duration = now.difference(_timestamps.lastGoodPosture!).inSeconds;
// If the duration exceeds the minimum required, reset the last bad state time
if (duration > _settings.resetTimeThreshold) {
if (duration >= _settings.resetTimeThreshold) {
print("duration: $duration, reset time threshold: ${_settings.resetTimeThreshold}");
print("resetting last bad posture time");
_timestamps.lastBadPosture = null;
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'dart:async';

import 'package:open_earable/apps/posture_tracker/model/attitude.dart';
import 'package:open_earable/apps/posture_tracker/model/attitude_tracker.dart';
import 'package:open_earable/apps/posture_tracker/model/ewma.dart';
import 'package:open_earable_flutter/src/open_earable_flutter.dart';
Expand Down

0 comments on commit 121990b

Please sign in to comment.