List all of the available extra ignitors as possible things to graph.
Signed-off-by: Keith Packard <keithp@keithp.com>
boolean has_imu;
boolean has_mag;
boolean has_orient;
boolean has_imu;
boolean has_mag;
boolean has_orient;
double landed_time(AltosStateIterable states) {
AltosState state = null;
double landed_time(AltosStateIterable states) {
AltosState state = null;
has_mag = true;
if (state.orient() != AltosLib.MISSING)
has_orient = true;
has_mag = true;
if (state.orient() != AltosLib.MISSING)
has_orient = true;
+ if (state.ignitor_voltage != null && state.ignitor_voltage.length > num_ignitor)
+ num_ignitor = state.ignitor_voltage.length;
}
for (int s = Altos.ao_flight_startup; s <= Altos.ao_flight_landed; s++) {
if (state_count[s] > 0) {
}
for (int s = Altos.ao_flight_startup; s <= Altos.ao_flight_landed; s++) {
if (state_count[s] > 0) {
orient_color,
false,
orient_axis);
orient_color,
false,
orient_axis);
+ if (stats.num_ignitor > 0) {
+ for (int i = 0; i < stats.num_ignitor; i++)
+ addSeries(AltosIgnitor.ignitor_name(i),
+ AltosGraphDataPoint.data_ignitor_0 + i,
+ voltage_units,
+ main_voltage_color,
+ false,
+ voltage_axis);
+ }
-}
\ No newline at end of file
public static final int data_mag_y = 23;
public static final int data_mag_z = 24;
public static final int data_orient = 25;
public static final int data_mag_y = 23;
public static final int data_mag_z = 24;
public static final int data_orient = 25;
+ public static final int data_ignitor_0 = 26;
+ public static final int data_ignitor_num = 32;
+ public static final int data_ignitor_max = data_ignitor_0 + data_ignitor_num - 1;
public double x() throws AltosUIDataMissing {
double time = state.time_since_boost();
public double x() throws AltosUIDataMissing {
double time = state.time_since_boost();
case data_orient:
y = state.orient();
break;
case data_orient:
y = state.orient();
break;
+ default:
+ if (data_ignitor_0 <= index && index <= data_ignitor_max) {
+ int ignitor = index - data_ignitor_0;
+ if (state.ignitor_voltage != null && ignitor < state.ignitor_voltage.length)
+ y = state.ignitor_voltage[ignitor];
+ }
+ break;
}
if (y == AltosLib.MISSING)
throw new AltosUIDataMissing(index);
}
if (y == AltosLib.MISSING)
throw new AltosUIDataMissing(index);
public AltosGraphDataPoint (AltosState state) {
this.state = state;
}
public AltosGraphDataPoint (AltosState state) {
this.state = state;
}
-}
\ No newline at end of file