Skip to content

Commit

Permalink
go back to discarding zero stepHz values for walking models #34
Browse files Browse the repository at this point in the history
  • Loading branch information
sobri909 committed Aug 22, 2018
1 parent 83838be commit 2d4e1b7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions LocoKit/Base/ActivityTypes/MutableActivityType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@ open class MutableActivityType: ActivityType {
if sample.movingState == .moving {
totalMoving += 1
}

if let stepHz = sample.stepHz {

// ignore zero stepHz for walking, because it's a far too common gap in the raw data
if let stepHz = sample.stepHz, (self.name != .walking || stepHz > 0) {
allStepHz.append(stepHz)
}

Expand Down

0 comments on commit 2d4e1b7

Please sign in to comment.