public void set_stats(AltosFlightStats stats) {
int y = 0;
- if (stats.serial != AltosLib.MISSING)
- new FlightStat(layout, y++, "Serial", String.format("%d", stats.serial));
+ if (stats.serial != AltosLib.MISSING) {
+ if (stats.product != null && stats.firmware_version != null)
+ new FlightStat(layout, y++, "Device",
+ stats.product,
+ String.format("version %s", stats.firmware_version),
+ String.format("serial %d", stats.serial));
+ else
+ new FlightStat(layout, y++, "Serial", String.format("%d", stats.serial));
+ }
if (stats.flight != AltosLib.MISSING)
new FlightStat(layout, y++, "Flight", String.format("%d", stats.flight));
if (stats.year != AltosLib.MISSING && stats.hour != AltosLib.MISSING)
if (stats.state_start[AltosLib.ao_flight_boost] < stats.state_start[AltosLib.ao_flight_landed])
new FlightStat(layout, y++, "Flight time",
String.format("%6.1f s", stats.landed_time - stats.boost_time));
- if (stats.has_gps) {
+ if (stats.pad_lat != AltosLib.MISSING) {
new FlightStat(layout, y++, "Pad location",
pos(stats.pad_lat,"N","S"),
pos(stats.pad_lon,"E","W"));
+ }
+ if (stats.lat != AltosLib.MISSING) {
new FlightStat(layout, y++, "Last reported location",
pos(stats.lat,"N","S"),
pos(stats.lon,"E","W"));