Skip to content

Commit

Permalink
HR graph: Do not present 0 values
Browse files Browse the repository at this point in the history
  • Loading branch information
gerhardol committed Aug 30, 2020
1 parent d0ec746 commit c38ec43
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/src/main/org/runnerup/util/GraphWrapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -229,12 +229,16 @@ void emit(double tot_distance) {
if (first) {
if(tot_distance > 0) {
velocityList.add(new DataPoint(0, velocity));
hrList.add(new DataPoint(0, Math.round(avg_hr)));
if (avg_hr > 0) {
hrList.add(new DataPoint(0, Math.round(avg_hr)));
}
}
first = false;
}
velocityList.add(new DataPoint(tot_distance, velocity));
hrList.add(new DataPoint(tot_distance, Math.round(avg_hr)));
if (avg_hr > 0) {
hrList.add(new DataPoint(tot_distance, Math.round(avg_hr)));
}
acc_time = 0;

tot_avg_hr += avg_hr;
Expand Down

0 comments on commit c38ec43

Please sign in to comment.