Workaround for no barometric sensor: intervals shows dashes (-) for gain and loss. Fixes #791.

This commit is contained in:
Román Martínez
2021-06-25 21:20:59 +02:00
parent 1d7c71ec8d
commit 32891fbf94
2 changed files with 13 additions and 4 deletions
@@ -104,8 +104,8 @@ public class IntervalStatistics {
public static class Interval {
private Distance distance = Distance.of(0);
private Duration time = Duration.ofSeconds(0);
private float gain_m;
private float loss_m;
private Float gain_m;
private Float loss_m;
public Interval() {
}
@@ -143,10 +143,18 @@ public class IntervalStatistics {
return Speed.of(distance, time);
}
public boolean hasGain() {
return gain_m != null;
}
public float getGain_m() {
return gain_m;
}
public boolean hasLoss() {
return loss_m != null;
}
public float getLoss_m() {
return loss_m;
}