X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=altosdroid%2Fsrc%2Forg%2Faltusmetrum%2FAltosDroid%2FTelemetryState.java;h=77cee787b56219fc27b4fab518c057389fa411d6;hb=a61217f0a6d0ef48b6471f632c4600255867e831;hp=d3341739afb28bf53c75f0cc65afb3a589c5b2ff;hpb=8c212cd5bfa03f71a31d84bd0051314e77d88461;p=fw%2Faltos diff --git a/altosdroid/src/org/altusmetrum/AltosDroid/TelemetryState.java b/altosdroid/src/org/altusmetrum/AltosDroid/TelemetryState.java index d3341739..77cee787 100644 --- a/altosdroid/src/org/altusmetrum/AltosDroid/TelemetryState.java +++ b/altosdroid/src/org/altusmetrum/AltosDroid/TelemetryState.java @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of @@ -17,29 +18,36 @@ package org.altusmetrum.AltosDroid; -import org.altusmetrum.altoslib_5.*; +import java.util.*; +import org.altusmetrum.altoslib_12.*; import android.location.Location; public class TelemetryState { - public static final int CONNECT_NONE = 0; - public static final int CONNECT_READY = 1; - public static final int CONNECT_CONNECTING = 2; - public static final int CONNECT_CONNECTED = 3; + public static final int CONNECT_NONE = 0; + public static final int CONNECT_DISCONNECTED = 1; + public static final int CONNECT_CONNECTING = 2; + public static final int CONNECT_CONNECTED = 3; int connect; + DeviceAddress address; AltosConfigData config; - AltosState state; - Location location; int crc_errors; + double receiver_battery; double frequency; int telemetry_rate; + boolean quiet; + + HashMap states; + + int latest_serial; + public TelemetryState() { connect = CONNECT_NONE; config = null; - state = null; - location = null; + states = new HashMap(); crc_errors = 0; + receiver_battery = AltosLib.MISSING; frequency = AltosPreferences.frequency(0); telemetry_rate = AltosPreferences.telemetry_rate(0); }