projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altosui: Start idle thread after the rocket leaves the pad
[fw/altos]
/
ao-tools
/
altosui
/
AltosUI.java
diff --git
a/ao-tools/altosui/AltosUI.java
b/ao-tools/altosui/AltosUI.java
index 4915376645d71ca5543d4d87a5e3af8b331cfaf3..fbce5e14f749ccbf8de2485590344d9d71ffc801 100644
(file)
--- a/
ao-tools/altosui/AltosUI.java
+++ b/
ao-tools/altosui/AltosUI.java
@@
-277,6
+277,7
@@
public class AltosUI extends JFrame {
class IdleThread extends Thread {
class IdleThread extends Thread {
+ boolean started;
private AltosState state;
int reported_landing;
private AltosState state;
int reported_landing;
@@
-346,6
+347,10
@@
public class AltosUI extends JFrame {
public void notice(AltosState new_state) {
AltosState old_state = state;
state = new_state;
public void notice(AltosState new_state) {
AltosState old_state = state;
state = new_state;
+ if (!started && state.state > Altos.ao_flight_pad) {
+ started = true;
+ start();
+ }
if (old_state != null && old_state.state != state.state)
report(false);
}
if (old_state != null && old_state.state != state.state)
report(false);
}
@@
-398,7
+403,6
@@
public class AltosUI extends JFrame {
info_reset();
info_finish();
info_reset();
info_finish();
- idle_thread.start();
try {
for (;;) {
try {
try {
for (;;) {
try {