summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
dec8de9)
Nice to be able to verify that maps are working by using this mode,
instead of needing to use flight monitoring.
Signed-off-by: Keith Packard <keithp@keithp.com>
AltosFlightStatus flightStatus;
AltosIgnitor ignitor;
AltosIdleMonitor thread;
AltosFlightStatus flightStatus;
AltosIgnitor ignitor;
AltosIdleMonitor thread;
int serial;
boolean remote;
boolean has_ignitor;
int serial;
boolean remote;
boolean has_ignitor;
void stop_display() {
if (thread != null) {
void stop_display() {
if (thread != null) {
+ if (state.gps != null && state.gps.connected) {
+ if (!has_map) {
+ pane.add("Site Map", sitemap);
+ has_map = true;
+ }
+ } else {
+ if (has_map) {
+ pane.remove(sitemap);
+ has_map = false;
+ }
+ }
+
// try {
pad.show(state, listener_state);
flightStatus.show(state, listener_state);
flightInfo.show(state, listener_state);
// try {
pad.show(state, listener_state);
flightStatus.show(state, listener_state);
flightInfo.show(state, listener_state);
- ignitor.show(state, listener_state);
+ if (has_ignitor)
+ ignitor.show(state, listener_state);
+ if (has_map)
+ sitemap.show(state, listener_state);
// } catch (Exception e) {
// System.out.print("Show exception " + e);
// }
// } catch (Exception e) {
// System.out.print("Show exception " + e);
// }
ignitor = new AltosIgnitor();
ignitor = new AltosIgnitor();
+ sitemap = new AltosUIMap();
+
/* Make the tabbed pane use the rest of the window space */
bag.add(pane, constraints(0, 3, GridBagConstraints.BOTH));
/* Make the tabbed pane use the rest of the window space */
bag.add(pane, constraints(0, 3, GridBagConstraints.BOTH));