From de2b6ec1cdfd48c948bff7edbfe2540440429b1b Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 2 Oct 2017 16:55:18 -0700 Subject: altoslib,altosuilib,altosui: log_format/device_type TeleGPS selects stateless When the device being analyzed has no flight state, we want to use the 'stateless' state so that the UI can display reasonable information. This bit was lost in the recent AltosState shuffle and this patch brings it back. Signed-off-by: Keith Packard --- altoslib/AltosTelemetryReader.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'altoslib/AltosTelemetryReader.java') diff --git a/altoslib/AltosTelemetryReader.java b/altoslib/AltosTelemetryReader.java index 26fe4f26..8fb61a4f 100644 --- a/altoslib/AltosTelemetryReader.java +++ b/altoslib/AltosTelemetryReader.java @@ -41,19 +41,15 @@ public class AltosTelemetryReader extends AltosFlightReader { throw new IOException("IO error"); } while (!link.get_monitor()); AltosTelemetry telem = AltosTelemetry.parse(l.line); - if (state == null) { - System.out.printf("Make state\n"); + if (state == null) state = new AltosState(cal_data()); - } telem.provide_data(state); return state; } public AltosCalData cal_data() { - if (cal_data == null) { - System.out.printf("Make cal data\n"); + if (cal_data == null) cal_data = new AltosCalData(); - } return cal_data; } -- cgit v1.2.3