projects
/
fw
/
altos
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
1b91ba9
)
altoslib: Check for empty gps height series
author
Keith Packard
<keithp@keithp.com>
Sun, 28 May 2017 21:42:30 +0000
(14:42 -0700)
committer
Keith Packard
<keithp@keithp.com>
Sun, 28 May 2017 21:42:30 +0000
(14:42 -0700)
When the gps height series is present but empty, there won't be a max value.
Signed-off-by: Keith Packard <keithp@keithp.com>
altoslib/AltosFlightStats.java
patch
|
blob
|
history
diff --git
a/altoslib/AltosFlightStats.java
b/altoslib/AltosFlightStats.java
index 1d020a9d132a0ca911e7c9f6487e5d72903de9dd..8a50f4b5512662585e28dd2cf5739f4b151508ab 100644
(file)
--- a/
altoslib/AltosFlightStats.java
+++ b/
altoslib/AltosFlightStats.java
@@
-254,8
+254,10
@@
public class AltosFlightStats {
max_acceleration = tv.value;
}
max_gps_height = AltosLib.MISSING;
- if (series.gps_height != null)
- max_gps_height = series.gps_height.max().value;
-
+ if (series.gps_height != null) {
+ AltosTimeValue tv = series.gps_height.max();
+ if (tv != null)
+ max_gps_height = tv.value;
+ }
}
}