summaryrefslogtreecommitdiff
path: root/altosui/AltosGraphDataPoint.java
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-08-29 19:24:51 -0500
committerKeith Packard <keithp@keithp.com>2013-08-29 19:24:51 -0500
commitde8d9c5630ae46378c50faf97f7d2e97fe139e30 (patch)
treee8e41e4186c5d27e1a5184d915bdb9f08926fa7a /altosui/AltosGraphDataPoint.java
parentce1378385ef273010498e81c205f42d8e32c7dc1 (diff)
altoslib, altosui: Restructured state management now does TM eeprom files
Removed uses of AltosRecord from AltosState, now just need to rewrite the other AltosState changing code to match Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosui/AltosGraphDataPoint.java')
-rw-r--r--altosui/AltosGraphDataPoint.java17
1 files changed, 9 insertions, 8 deletions
diff --git a/altosui/AltosGraphDataPoint.java b/altosui/AltosGraphDataPoint.java
index 7454f447..537efc44 100644
--- a/altosui/AltosGraphDataPoint.java
+++ b/altosui/AltosGraphDataPoint.java
@@ -42,9 +42,10 @@ public class AltosGraphDataPoint implements AltosUIDataPoint {
public static final int data_pressure = 15;
public double x() throws AltosUIDataMissing {
- if (state.data.time < -2)
+ double time = state.time_since_boost();
+ if (time < -2)
throw new AltosUIDataMissing(-1);
- return state.data.time;
+ return time;
}
public double y(int index) throws AltosUIDataMissing {
@@ -63,16 +64,16 @@ public class AltosGraphDataPoint implements AltosUIDataPoint {
y = state.temperature;
break;
case data_battery_voltage:
- y = state.battery;
+ y = state.battery_voltage;
break;
case data_drogue_voltage:
- y = state.drogue_sense;
+ y = state.apogee_voltage;
break;
case data_main_voltage:
- y = state.main_sense;
+ y = state.main_voltage;
break;
case data_rssi:
- y = state.data.rssi;
+ y = state.rssi;
break;
case data_gps_height:
y = state.gps_height;
@@ -106,7 +107,7 @@ public class AltosGraphDataPoint implements AltosUIDataPoint {
public int id(int index) {
if (index == data_state) {
- int s = state.data.state;
+ int s = state.state;
if (s < Altos.ao_flight_boost || s > Altos.ao_flight_landed)
return -1;
return s;
@@ -116,7 +117,7 @@ public class AltosGraphDataPoint implements AltosUIDataPoint {
public String id_name(int index) {
if (index == data_state)
- return state.data.state();
+ return state.state_name();
return "";
}