X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=telegps%2FTeleGPSDisplayThread.java;h=11bca5d09a53f404fa3cc1353cbbfe1f4b7cabe7;hb=8cf466d7a767a20387a8d9d6ec81ee00af3fe4a7;hp=18b8d9fcd7fe29d0bd086756da27b8277286b07c;hpb=bd440afc2a6e37b74fffcf1b977e149485095316;p=fw%2Faltos diff --git a/telegps/TeleGPSDisplayThread.java b/telegps/TeleGPSDisplayThread.java index 18b8d9fc..11bca5d0 100644 --- a/telegps/TeleGPSDisplayThread.java +++ b/telegps/TeleGPSDisplayThread.java @@ -21,8 +21,8 @@ import java.awt.*; import javax.swing.*; import java.io.*; import java.text.*; -import org.altusmetrum.altoslib_5.*; -import org.altusmetrum.altosuilib_3.*; +import org.altusmetrum.altoslib_8.*; +import org.altusmetrum.altosuilib_8.*; public class TeleGPSDisplayThread extends Thread { @@ -129,7 +129,7 @@ public class TeleGPSDisplayThread extends Thread { } public synchronized void notice(boolean spoken) { - if (old_state != null && old_state.state != state.state) { + if (old_state != null && old_state.state() != state.state()) { report_time = now(); this.notify(); } else if (spoken) @@ -168,8 +168,10 @@ public class TeleGPSDisplayThread extends Thread { for (;;) { try { state = reader.read(); - if (state == null) + if (state == null) { + listener_state.running = false; break; + } reader.update(state); show_safely(); told = tell();