projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix copyright year
[fw/altos]
/
altosui
/
AltosInfoTable.java
diff --git
a/altosui/AltosInfoTable.java
b/altosui/AltosInfoTable.java
index cf4642bca2ac25eab0a94feabf5e0efa9cb448bc..3242d65273a58b1bf5f4270ce4c9b0bd934d0003 100644
(file)
--- 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 java.awt.*;
import javax.swing.*;
import javax.swing.table.*;
-import org.altusmetrum.altoslib_
1
.*;
+import org.altusmetrum.altoslib_
3
.*;
public class AltosInfoTable extends JTable {
private AltosFlightInfoTableModel model;
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)
TableColumn column = getColumnModel().getColumn(i);
if ((i & 1) == 0)
- column.setPreferredWidth(text_width(" Satellites Visible
"));
+ column.setPreferredWidth(text_width(" Satellites Visible"));
else
else
- column.setPreferredWidth(text_width(" 179°59.99999' "));
+ column.setPreferredWidth(text_width("
W
179°59.99999' "));
}
}
}
}
@@
-107,35
+107,41
@@
public class AltosInfoTable extends JTable {
public void show(AltosState state, AltosListenerState listener_state) {
info_reset();
if (state != null) {
public void show(AltosState state, AltosListenerState listener_state) {
info_reset();
if (state != null) {
- if (state.altitude() != AltosRecord.MISSING)
+ 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());
info_add_row(0, "Altitude", "%6.0f m", state.altitude());
- if (state.ground_altitude() != Altos
Record
.MISSING)
+ if (state.ground_altitude() != Altos
Lib
.MISSING)
info_add_row(0, "Pad altitude", "%6.0f m", state.ground_altitude());
info_add_row(0, "Pad altitude", "%6.0f m", state.ground_altitude());
- if (state.height() != Altos
Record
.MISSING)
+ if (state.height() != Altos
Lib
.MISSING)
info_add_row(0, "Height", "%6.0f m", state.height());
info_add_row(0, "Height", "%6.0f m", state.height());
- if (state.max_height() != Altos
Record
.MISSING)
+ if (state.max_height() != Altos
Lib
.MISSING)
info_add_row(0, "Max height", "%6.0f m", state.max_height());
info_add_row(0, "Max height", "%6.0f m", state.max_height());
- if (state.acceleration() != Altos
Record
.MISSING)
+ if (state.acceleration() != Altos
Lib
.MISSING)
info_add_row(0, "Acceleration", "%8.1f m/s²", state.acceleration());
info_add_row(0, "Acceleration", "%8.1f m/s²", state.acceleration());
- if (state.max_acceleration() != Altos
Record
.MISSING)
+ if (state.max_acceleration() != Altos
Lib
.MISSING)
info_add_row(0, "Max acceleration", "%8.1f m/s²", state.max_acceleration());
info_add_row(0, "Max acceleration", "%8.1f m/s²", state.max_acceleration());
- if (state.speed() != Altos
Record
.MISSING)
+ if (state.speed() != Altos
Lib
.MISSING)
info_add_row(0, "Speed", "%8.1f m/s", state.speed());
info_add_row(0, "Speed", "%8.1f m/s", state.speed());
- if (state.max_speed() != Altos
Record
.MISSING)
+ if (state.max_speed() != Altos
Lib
.MISSING)
info_add_row(0, "Max Speed", "%8.1f m/s", state.max_speed());
info_add_row(0, "Max Speed", "%8.1f m/s", state.max_speed());
- if (state.temperature != AltosRecord.MISSING)
+ 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);
info_add_row(0, "Temperature", "%9.2f °C", state.temperature);
- if (state.battery_voltage != Altos
Record
.MISSING)
+ if (state.battery_voltage != Altos
Lib
.MISSING)
info_add_row(0, "Battery", "%9.2f V", state.battery_voltage);
info_add_row(0, "Battery", "%9.2f V", state.battery_voltage);
- if (state.apogee_voltage != Altos
Record
.MISSING)
+ if (state.apogee_voltage != Altos
Lib
.MISSING)
info_add_row(0, "Drogue", "%9.2f V", state.apogee_voltage);
info_add_row(0, "Drogue", "%9.2f V", state.apogee_voltage);
- if (state.main_voltage != Altos
Record
.MISSING)
+ if (state.main_voltage != Altos
Lib
.MISSING)
info_add_row(0, "Main", "%9.2f V", state.main_voltage);
}
if (listener_state != null) {
info_add_row(0, "CRC Errors", "%6d", listener_state.crc_errors);
info_add_row(0, "Main", "%9.2f V", state.main_voltage);
}
if (listener_state != null) {
info_add_row(0, "CRC Errors", "%6d", listener_state.crc_errors);
- if (listener_state.battery != Altos
Record
.MISSING)
+ if (listener_state.battery != Altos
Lib
.MISSING)
info_add_row(0, "Receiver Battery", "%9.2f", listener_state.battery);
}
info_add_row(0, "Receiver Battery", "%9.2f", listener_state.battery);
}
@@
-155,13
+161,13
@@
public class AltosInfoTable extends JTable {
else
info_add_row(1, "GPS", " missing");
info_add_row(1, "Satellites", "%6d", state.gps.nsat);
else
info_add_row(1, "GPS", " missing");
info_add_row(1, "Satellites", "%6d", state.gps.nsat);
- if (state.gps.lat != Altos
Record
.MISSING)
+ if (state.gps.lat != Altos
Lib
.MISSING)
info_add_deg(1, "Latitude", state.gps.lat, 'N', 'S');
info_add_deg(1, "Latitude", state.gps.lat, 'N', 'S');
- if (state.gps.lon != Altos
Record
.MISSING)
+ if (state.gps.lon != Altos
Lib
.MISSING)
info_add_deg(1, "Longitude", state.gps.lon, 'E', 'W');
info_add_deg(1, "Longitude", state.gps.lon, 'E', 'W');
- if (state.gps.alt != Altos
Record
.MISSING)
+ if (state.gps.alt != Altos
Lib
.MISSING)
info_add_row(1, "GPS altitude", "%8.1f", state.gps.alt);
info_add_row(1, "GPS altitude", "%8.1f", state.gps.alt);
- if (state.gps_height != Altos
Record
.MISSING)
+ if (state.gps_height != Altos
Lib
.MISSING)
info_add_row(1, "GPS height", "%8.1f", state.gps_height);
/* The SkyTraq GPS doesn't report these values */
info_add_row(1, "GPS height", "%8.1f", state.gps_height);
/* The SkyTraq GPS doesn't report these values */
@@
-199,12
+205,12
@@
public class AltosInfoTable extends JTable {
info_add_deg(1, "Pad longitude", state.pad_lon, 'E', 'W');
info_add_row(1, "Pad GPS alt", "%6.0f m", state.pad_alt);
}
info_add_deg(1, "Pad longitude", state.pad_lon, 'E', 'W');
info_add_row(1, "Pad GPS alt", "%6.0f m", state.pad_alt);
}
- if (state.gps.year != Altos
Record.MISSING)
+ if (state.gps.year != Altos
Lib.MISSING)
info_add_row(1, "GPS date", "%04d-%02d-%02d",
state.gps.year,
state.gps.month,
state.gps.day);
info_add_row(1, "GPS date", "%04d-%02d-%02d",
state.gps.year,
state.gps.month,
state.gps.day);
- if (state.gps.hour != Altos
Record
.MISSING)
+ if (state.gps.hour != Altos
Lib
.MISSING)
info_add_row(1, "GPS time", " %02d:%02d:%02d",
state.gps.hour,
state.gps.minute,
info_add_row(1, "GPS time", " %02d:%02d:%02d",
state.gps.hour,
state.gps.minute,