Skip to content

Commit

Permalink
Reduced app to 35k removing HRV and stress options not supported in G…
Browse files Browse the repository at this point in the history
…armin 235
  • Loading branch information
dliedke committed Jul 12, 2022
1 parent 7064a9f commit b8b17ba
Show file tree
Hide file tree
Showing 25 changed files with 16 additions and 969 deletions.
29 changes: 5 additions & 24 deletions HrvAlgorithms/sources/activity/HrvAndStressActivity.mc
Original file line number Diff line number Diff line change
Expand Up @@ -17,37 +17,21 @@ module HrvAlgorithms {
}

protected function onBeforeStart(fitSession) {
if (me.isHrvOn()) {
me.mHeartbeatIntervalsSensor.setOneSecBeatToBeatIntervalsSensorListener(method(:onOneSecBeatToBeatIntervals));
me.mStressMonitor = new StressMonitor(fitSession, me.mHrvTracking);
if (me.mHrvTracking == HrvTracking.OnDetailed) {
me.mHrvMonitor = new HrvMonitorDetailed(fitSession, true);
}
else {
me.mHrvMonitor = new HrvMonitorDefault(fitSession);
}
}

}

function onOneSecBeatToBeatIntervals(heartBeatIntervals) {
if (me.isHrvOn()) {
me.mHrvMonitor.addOneSecBeatToBeatIntervals(heartBeatIntervals);
me.mStressMonitor.addOneSecBeatToBeatIntervals(heartBeatIntervals);
}

}

protected function onBeforeStop() {
if (me.isHrvOn()) {
me.mHeartbeatIntervalsSensor.setOneSecBeatToBeatIntervalsSensorListener(null);
}

}

private var mHrvSuccessive;

protected function onRefreshHrActivityStats(activityInfo, minHr) {
if (me.isHrvOn()) {
me.mHrvSuccessive = me.mHrvMonitor.calculateHrvSuccessive();
}

me.onRefreshHrvActivityStats(activityInfo, minHr, me.mHrvSuccessive);
}

Expand All @@ -58,10 +42,7 @@ module HrvAlgorithms {
var hrSummary = HrActivity.calculateSummaryFields();
var activitySummary = new ActivitySummary();
activitySummary.hrSummary = hrSummary;
if (me.isHrvOn()) {
activitySummary.hrvSummary = me.mHrvMonitor.calculateHrvSummary();
activitySummary.stress = me.mStressMonitor.calculateStress(hrSummary.minHr);
}

return activitySummary;
}
}
Expand Down
43 changes: 0 additions & 43 deletions HrvAlgorithms/sources/activity/ShortDetailedHrvActivity.mc

This file was deleted.

75 changes: 0 additions & 75 deletions HrvAlgorithms/sources/activity/hrv/HrvMonitorDefault.mc

This file was deleted.

168 changes: 0 additions & 168 deletions HrvAlgorithms/sources/activity/hrv/HrvMonitorDetailed.mc

This file was deleted.

37 changes: 0 additions & 37 deletions HrvAlgorithms/sources/activity/hrv/HrvPnnx.mc

This file was deleted.

Loading

0 comments on commit b8b17ba

Please sign in to comment.