X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altosui%2FAltosInfoTable.java;h=158b61f0bc8ab4f2e89f45075025258a9fc07e29;hp=d7871aa6b61bc3cc390bde0d9ad59926c8597d89;hb=eb3ffd06575ddd0be061aa2717c7075c823ed54e;hpb=5b976a6651f4eb05d30afc08b9e1f27c7e52ae00 diff --git a/altosui/AltosInfoTable.java b/altosui/AltosInfoTable.java index d7871aa6..158b61f0 100644 --- a/altosui/AltosInfoTable.java +++ b/altosui/AltosInfoTable.java @@ -20,7 +20,7 @@ package altosui; import java.awt.*; import javax.swing.*; import javax.swing.table.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; public class AltosInfoTable extends JTable { private AltosFlightInfoTableModel model; @@ -46,9 +46,9 @@ public class AltosInfoTable extends JTable { TableColumn column = getColumnModel().getColumn(i); if ((i & 1) == 0) - column.setPreferredWidth(text_width(" Satellites Visible ")); + column.setPreferredWidth(text_width(" Satellites Visible")); else - column.setPreferredWidth(text_width(" 179°59.99999' ")); + column.setPreferredWidth(text_width("W 179°59.99999' ")); } } @@ -107,6 +107,8 @@ public class AltosInfoTable extends JTable { public void show(AltosState state, AltosListenerState listener_state) { info_reset(); if (state != null) { + if (state.device_type != AltosLib.MISSING) + info_add_row(0, "Device", "%s", AltosLib.product_name(state.device_type)); if (state.altitude() != AltosLib.MISSING) info_add_row(0, "Altitude", "%6.0f m", state.altitude()); if (state.ground_altitude() != AltosLib.MISSING) @@ -123,6 +125,10 @@ public class AltosInfoTable extends JTable { info_add_row(0, "Speed", "%8.1f m/s", state.speed()); if (state.max_speed() != AltosLib.MISSING) info_add_row(0, "Max Speed", "%8.1f m/s", state.max_speed()); + if (state.orient() != AltosLib.MISSING) + info_add_row(0, "Tilt", "%4.0f °", state.orient()); + if (state.max_orient() != AltosLib.MISSING) + info_add_row(0, "Max Tilt", "%4.0f °", state.max_orient()); if (state.temperature != AltosLib.MISSING) info_add_row(0, "Temperature", "%9.2f °C", state.temperature); if (state.battery_voltage != AltosLib.MISSING) @@ -141,10 +147,6 @@ public class AltosInfoTable extends JTable { if (state != null) { if (state.gps == null || !state.gps.connected) { - if (state.gps == null) - System.out.printf ("null gps\n"); - else - System.out.printf ("not connected gps\n"); info_add_row(1, "GPS", "not available"); } else { if (state.gps_ready)