projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altos: Make skytraq reflashing code try both 9600 and 4800 baud
[fw/altos]
/
altosui
/
AltosDescent.java
diff --git
a/altosui/AltosDescent.java
b/altosui/AltosDescent.java
index e9ff590b735e6d79dbec25187ad421426bd9f8f0..2ea7cbfa7058a219e0d8e8a5b4e7d999bc051e78 100644
(file)
--- a/
altosui/AltosDescent.java
+++ b/
altosui/AltosDescent.java
@@
-256,7
+256,7
@@
public class AltosDescent extends JComponent implements AltosFlightDisplay {
class Speed extends DescentValue {
void show (AltosState state, int crc_errors) {
class Speed extends DescentValue {
void show (AltosState state, int crc_errors) {
- double speed = state.speed;
+ double speed = state.
accel_
speed;
if (!state.ascent)
speed = state.baro_speed;
show(AltosConvert.speed, speed);
if (!state.ascent)
speed = state.baro_speed;
show(AltosConvert.speed, speed);
@@
-309,7
+309,10
@@
public class AltosDescent extends JComponent implements AltosFlightDisplay {
class Distance extends DescentValue {
void show(AltosState state, int crc_errors) {
class Distance extends DescentValue {
void show(AltosState state, int crc_errors) {
- show(AltosConvert.distance, state.from_pad.distance);
+ if (state.from_pad != null)
+ show(AltosConvert.distance, state.from_pad.distance);
+ else
+ show("???");
}
public Distance (GridBagLayout layout, int x, int y) {
}
public Distance (GridBagLayout layout, int x, int y) {