diff options
| author | Keith Packard <keithp@keithp.com> | 2017-05-27 00:27:04 -0700 | 
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2017-05-27 00:27:04 -0700 | 
| commit | b6b5c64f93fa56bcb22ea1c4279e4f754e6e6f1c (patch) | |
| tree | 6ec6ecb767be291c8712030e0097fae051652637 /altoslib/AltosState.java | |
| parent | 8b4dcca73c65e87462d5f8d08dbc025aa8cf08a6 (diff) | |
altosdroid: Deal with AltosState changes
cal data split out from altos state.
altos state needed to have no-arguments constructor for JSON code.
Also messed with voice to make it stay quiet during app startup.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altoslib/AltosState.java')
| -rw-r--r-- | altoslib/AltosState.java | 38 | 
1 files changed, 4 insertions, 34 deletions
| diff --git a/altoslib/AltosState.java b/altoslib/AltosState.java index d3929b8f..e5a0541e 100644 --- a/altoslib/AltosState.java +++ b/altoslib/AltosState.java @@ -43,8 +43,6 @@ public class AltosState extends AltosDataListener {  	public int	rssi;  	public int	status; -	public double	time; -  	class AltosValue {  		double	value;  		double	prev_value; @@ -288,7 +286,6 @@ public class AltosState extends AltosDataListener {  		}  	} -	private int	state;  	public boolean	landed;  	public boolean	ascent;	/* going up? */  	public boolean	boost;	/* under power */ @@ -506,23 +503,7 @@ public class AltosState extends AltosDataListener {  		pressure.set(p, time);  	} -	class AltosForce extends AltosValue { -		void set(double p, double time) { -			super.set(p, time); -		} - -		AltosForce() { -			super(); -		} -	} -	private AltosForce	thrust; - -	public double thrust() { -		return thrust.value(); -	} -  	public void set_thrust(double N) { -		thrust.set(N, time);  	}  	public double baro_height() { @@ -720,15 +701,8 @@ public class AltosState extends AltosDataListener {  	public int	speak_tick;  	public double	speak_altitude; -	public String	callsign; -	public String	firmware_version; -  	public double	ground_accel; -	public int	log_format; -	public int	log_space; -	public String	product; -  	public AltosCompanion	companion;  	public int	pyro_fired; @@ -756,7 +730,6 @@ public class AltosState extends AltosDataListener {  		ground_pressure = new AltosGroundPressure();  		altitude = new AltosAltitude();  		pressure = new AltosPressure(); -		thrust = new AltosForce();  		speed = new AltosSpeed();  		acceleration = new AltosAccel();  		orient = new AltosCValue(); @@ -810,15 +783,8 @@ public class AltosState extends AltosDataListener {  		speak_tick = AltosLib.MISSING;  		speak_altitude = AltosLib.MISSING; -		callsign = null; -		firmware_version = null; -  		ground_accel = AltosLib.MISSING; -		log_format = AltosLib.MISSING; -		log_space = AltosLib.MISSING; -		product = null; -  		companion = null;  		pyro_fired = 0; @@ -1108,6 +1074,10 @@ public class AltosState extends AltosDataListener {  		this.pyro_fired = fired;  	} +	public AltosState() { +		init(); +	} +  	public AltosState (AltosCalData cal_data) {  		super(cal_data);  		init(); | 
