package org.altusmetrum.altoslib_5;
-public class AltosAccel extends AltosUnits {
+import java.io.*;
+
+public class AltosAccel extends AltosUnits implements Serializable {
public double value(double v, boolean imperial_units) {
if (imperial_units)
public int show_fraction(int width, boolean imperial_units) {
return width / 9;
}
-}
\ No newline at end of file
+}
package org.altusmetrum.altoslib_5;
-public class AltosCompanion {
+import java.io.*;
+
+public class AltosCompanion implements Serializable {
public final static int board_id_telescience = 0x0a;
public final static int MAX_CHANNELS = 12;
import java.text.*;
import java.util.concurrent.*;
+import java.io.*;
-public class AltosGPS implements Cloneable {
+public class AltosGPS implements Cloneable, Serializable {
public final static int MISSING = AltosLib.MISSING;
package org.altusmetrum.altoslib_5;
import java.lang.Math;
+import java.io.*;
-public class AltosGreatCircle implements Cloneable {
+public class AltosGreatCircle implements Cloneable, Serializable {
public double distance;
public double bearing;
public double range;
package org.altusmetrum.altoslib_5;
import java.util.concurrent.*;
+import java.io.*;
-public class AltosIMU implements Cloneable {
+public class AltosIMU implements Cloneable, Serializable {
public int accel_along;
public int accel_across;
public int accel_through;
package org.altusmetrum.altoslib_5;
-public class AltosListenerState {
+import java.io.*;
+
+public class AltosListenerState implements Serializable {
public int crc_errors;
public double battery;
package org.altusmetrum.altoslib_5;
import java.util.concurrent.*;
+import java.io.*;
-public class AltosMag implements Cloneable {
+public class AltosMag implements Cloneable, Serializable {
public int along;
public int across;
public int through;
package org.altusmetrum.altoslib_5;
import java.util.concurrent.*;
+import java.io.*;
-public class AltosMs5607 {
+public class AltosMs5607 implements Serializable {
public int reserved;
public int sens;
public int off;
--- /dev/null
+/*
+ * Copyright © 2014 Keith Packard <keithp@keithp.com>
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+ */
+
+package org.altusmetrum.altoslib_5;
+
+import java.io.*;
+
+public class AltosSavedState implements Serializable {
+ public AltosState state;
+ public AltosListenerState listener_state;
+
+ public AltosSavedState(AltosState state, AltosListenerState listener_state) {
+ this.state = state;
+ this.listener_state = listener_state;
+ }
+}
package org.altusmetrum.altoslib_5;
-public class AltosState implements Cloneable {
+import java.io.*;
+
+public class AltosState implements Cloneable, Serializable {
public static final int set_position = 1;
public static final int set_gps = 2;
private int prev_tick;
public int boost_tick;
- class AltosValue {
+ class AltosValue implements Serializable{
double value;
double prev_value;
private double max_value;
}
}
- class AltosCValue {
+ class AltosCValue implements Serializable {
- class AltosIValue extends AltosValue {
+ class AltosIValue extends AltosValue implements Serializable {
boolean can_max() {
return c_can_max();
}
ground_altitude.set_measured(a, time);
}
- class AltosGpsGroundAltitude extends AltosValue {
+ class AltosGpsGroundAltitude extends AltosValue implements Serializable {
void set(double a, double t) {
super.set(a, t);
pad_alt = value();
gps_ground_altitude.set(a, time);
}
- class AltosGroundPressure extends AltosCValue {
+ class AltosGroundPressure extends AltosCValue implements Serializable {
void set_filtered(double p, double time) {
computed.set_filtered(p, time);
if (!is_measured())
ground_pressure.set_measured(pressure, time);
}
- class AltosAltitude extends AltosCValue {
+ class AltosAltitude extends AltosCValue implements Serializable {
private void set_speed(AltosValue v) {
if (!acceleration.is_measured() || !ascent)
private AltosAltitude altitude;
- class AltosGpsAltitude extends AltosValue {
+ class AltosGpsAltitude extends AltosValue implements Serializable {
private void set_gps_height() {
double a = value();
return gps_speed.max();
}
- class AltosPressure extends AltosValue {
+ class AltosPressure extends AltosValue implements Serializable {
void set(double p, double time) {
super.set(p, time);
if (state == AltosLib.ao_flight_pad)
return AltosLib.MISSING;
}
- class AltosSpeed extends AltosCValue {
+ class AltosSpeed extends AltosCValue implements Serializable {
boolean can_max() {
return state < AltosLib.ao_flight_fast || state == AltosLib.ao_flight_stateless;
return AltosLib.MISSING;
}
- class AltosAccel extends AltosCValue {
+ class AltosAccel extends AltosCValue implements Serializable {
boolean can_max() {
return state < AltosLib.ao_flight_fast || state == AltosLib.ao_flight_stateless;
AltosProgrammer.java \
AltosReplayReader.java \
AltosRomconfig.java \
+ AltosSavedState.java \
AltosSelfFlash.java \
AltosSensorMM.java \
AltosSensorEMini.java \