altosui: Don't try to report bearing/elevation without GPS
[fw/altos] / altosui / AltosDisplayThread.java
index c894c2d0e4eaea07f3c800a824a1bc53c9b5c48a..4b4cc3b9ac2aee901b5e633228eb2142b15ad4e9 100644 (file)
@@ -21,7 +21,7 @@ import java.awt.*;
 import javax.swing.*;
 import java.io.*;
 import java.text.*;
-import org.altusmetrum.altoslib_1.*;
+import org.altusmetrum.altoslib_2.*;
 
 public class AltosDisplayThread extends Thread {
 
@@ -89,6 +89,7 @@ public class AltosDisplayThread extends Thread {
                        /* If the rocket isn't on the pad, then report height */
                        if (Altos.ao_flight_drogue <= state.state &&
                            state.state < Altos.ao_flight_landed &&
+                           state.from_pad != null &&
                            state.range >= 0)
                        {
                                voice.speak("Height %s, bearing %s %d, elevation %d, range %s.\n",