projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
micropeak: Missing a couple of new exceptions when loading files
[fw/altos]
/
altosui
/
AltosLanded.java
diff --git
a/altosui/AltosLanded.java
b/altosui/AltosLanded.java
index 38f273cf3bda6a3ce0593b3eacc866a602e9e2fc..74177753c6dbfe31cd9275dd370b4e30b3170964 100644
(file)
--- a/
altosui/AltosLanded.java
+++ b/
altosui/AltosLanded.java
@@
-21,7
+21,7
@@
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.io.*;
import java.awt.event.*;
import javax.swing.*;
import java.io.*;
-import org.altusmetrum.altoslib_
1
.*;
+import org.altusmetrum.altoslib_
3
.*;
public class AltosLanded extends JComponent implements AltosFlightDisplay, ActionListener {
GridBagLayout layout;
public class AltosLanded extends JComponent implements AltosFlightDisplay, ActionListener {
GridBagLayout layout;
@@
-103,7
+103,8
@@
public class AltosLanded extends JComponent implements AltosFlightDisplay, Actio
class Lat extends LandedValue {
void show (AltosState state, AltosListenerState listener_state) {
class Lat extends LandedValue {
void show (AltosState state, AltosListenerState listener_state) {
- if (state.gps != null && state.gps.connected)
+ show();
+ if (state.gps != null && state.gps.connected && state.gps.lat != AltosLib.MISSING)
show(pos(state.gps.lat,"N", "S"));
else
show("???");
show(pos(state.gps.lat,"N", "S"));
else
show("???");
@@
-118,7
+119,7
@@
public class AltosLanded extends JComponent implements AltosFlightDisplay, Actio
class Lon extends LandedValue {
void show (AltosState state, AltosListenerState listener_state) {
show();
class Lon extends LandedValue {
void show (AltosState state, AltosListenerState listener_state) {
show();
- if (state.gps != null && state.gps.connected)
+ if (state.gps != null && state.gps.connected
&& state.gps.lon != AltosLib.MISSING
)
show(pos(state.gps.lon,"E", "W"));
else
show("???");
show(pos(state.gps.lon,"E", "W"));
else
show("???");
@@
-162,7
+163,7
@@
public class AltosLanded extends JComponent implements AltosFlightDisplay, Actio
class Height extends LandedValue {
void show (AltosState state, AltosListenerState listener_state) {
class Height extends LandedValue {
void show (AltosState state, AltosListenerState listener_state) {
- show(AltosConvert.height, state.max_height);
+ show(AltosConvert.height, state.max_height
()
);
}
public Height (GridBagLayout layout, int y) {
super (layout, y, "Maximum Height");
}
public Height (GridBagLayout layout, int y) {
super (layout, y, "Maximum Height");
@@
-184,7
+185,7
@@
public class AltosLanded extends JComponent implements AltosFlightDisplay, Actio
class Accel extends LandedValue {
void show (AltosState state, AltosListenerState listener_state) {
class Accel extends LandedValue {
void show (AltosState state, AltosListenerState listener_state) {
- show(AltosConvert.accel, state.max_acceleration);
+ show(AltosConvert.accel, state.max_acceleration
()
);
}
public Accel (GridBagLayout layout, int y) {
super (layout, y, "Maximum Acceleration");
}
public Accel (GridBagLayout layout, int y) {
super (layout, y, "Maximum Acceleration");
@@
-249,7
+250,7
@@
public class AltosLanded extends JComponent implements AltosFlightDisplay, Actio
states = new AltosEepromFile(in);
} else if (filename.endsWith("telem")) {
FileInputStream in = new FileInputStream(file);
states = new AltosEepromFile(in);
} else if (filename.endsWith("telem")) {
FileInputStream in = new FileInputStream(file);
- states = n
ull; // new AltosTelemetryIterab
le(in);
+ states = n
ew AltosTelemetryFi
le(in);
} else {
throw new FileNotFoundException(filename);
}
} else {
throw new FileNotFoundException(filename);
}