projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altosui: Add ascent, descent and landed tabs
[fw/altos]
/
ao-tools
/
altosui
/
AltosDisplayThread.java
diff --git
a/ao-tools/altosui/AltosDisplayThread.java
b/ao-tools/altosui/AltosDisplayThread.java
index 957ac0d69581f00693b59104739a1d23c335943d..b5b2777e7885bbc79071faae7fd4238e0563a446 100644
(file)
--- a/
ao-tools/altosui/AltosDisplayThread.java
+++ b/
ao-tools/altosui/AltosDisplayThread.java
@@
-38,6
+38,11
@@
public class AltosDisplayThread extends Thread {
int crc_errors;
AltosFlightDisplay display;
int crc_errors;
AltosFlightDisplay display;
+ synchronized void show(AltosState state, int crc_errors) {
+ if (state != null)
+ display.show(state, crc_errors);
+ }
+
class IdleThread extends Thread {
boolean started;
class IdleThread extends Thread {
boolean started;
@@
-93,6
+98,10
@@
public class AltosDisplayThread extends Thread {
(int) (state.from_pad.bearing + 0.5),
(int) (state.from_pad.distance + 0.5));
++reported_landing;
(int) (state.from_pad.bearing + 0.5),
(int) (state.from_pad.distance + 0.5));
++reported_landing;
+ if (state.state != Altos.ao_flight_landed) {
+ state.state = Altos.ao_flight_landed;
+ show(state, 0);
+ }
}
}
}
}
@@
-180,11
+189,6
@@
public class AltosDisplayThread extends Thread {
return ret;
}
return ret;
}
- void show(AltosState state, int crc_errors) {
- if (state != null)
- display.show(state, crc_errors);
- }
-
public void run() {
boolean interrupted = false;
String line;
public void run() {
boolean interrupted = false;
String line;