summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
76f0fe1)
Change which axes are turned on when the graph is created.
Signed-off-by: Keith Packard <keithp@keithp.com>
AltosUIFlightSeries flight_series;
AltosUIFlightSeries flight_series;
+ boolean enable_axis(int product_id, String label) {
+ switch (product_id) {
+ case AltosLib.product_easymotor:
+ return(label.equals(AltosUIFlightSeries.motor_pressure_name) ||
+ label.equals(AltosUIFlightSeries.accel_name));
+ default:
+ return true;
+ }
+ }
+
AltosUITimeSeries[] setup(AltosFlightStats stats, AltosUIFlightSeries flight_series) {
AltosCalData cal_data = flight_series.cal_data();
AltosUITimeSeries[] setup(AltosFlightStats stats, AltosUIFlightSeries flight_series) {
AltosCalData cal_data = flight_series.cal_data();
+ int product_id = cal_data.device_type;
AltosUIAxis height_axis, speed_axis, accel_axis, voltage_axis, temperature_axis, nsat_axis, dbm_axis;
AltosUIAxis pressure_axis, thrust_axis;
AltosUIAxis height_axis, speed_axis, accel_axis, voltage_axis, temperature_axis, nsat_axis, dbm_axis;
AltosUIAxis pressure_axis, thrust_axis;
flight_series.register_marker(AltosUIFlightSeries.state_name,
state_color,
flight_series.register_marker(AltosUIFlightSeries.state_name,
state_color,
+ enable_axis(product_id, AltosUIFlightSeries.state_name),
flight_series.register_axis(AltosUIFlightSeries.accel_name,
accel_color,
flight_series.register_axis(AltosUIFlightSeries.accel_name,
accel_color,
+ enable_axis(product_id, AltosUIFlightSeries.accel_name),
accel_axis);
flight_series.register_axis(AltosUIFlightSeries.vert_accel_name,
vert_accel_color,
accel_axis);
flight_series.register_axis(AltosUIFlightSeries.vert_accel_name,
vert_accel_color,
+ enable_axis(product_id, AltosUIFlightSeries.vert_accel_name),
accel_axis);
flight_series.register_axis(AltosUIFlightSeries.kalman_accel_name,
accel_axis);
flight_series.register_axis(AltosUIFlightSeries.kalman_accel_name,
flight_series.register_axis(AltosUIFlightSeries.speed_name,
speed_color,
flight_series.register_axis(AltosUIFlightSeries.speed_name,
speed_color,
+ enable_axis(product_id, AltosUIFlightSeries.speed_name),
speed_axis);
flight_series.register_axis(AltosUIFlightSeries.kalman_speed_name,
kalman_speed_color,
speed_axis);
flight_series.register_axis(AltosUIFlightSeries.kalman_speed_name,
kalman_speed_color,
+ enable_axis(product_id, AltosUIFlightSeries.kalman_speed_name),
speed_axis);
flight_series.register_axis(AltosUIFlightSeries.pressure_name,
speed_axis);
flight_series.register_axis(AltosUIFlightSeries.pressure_name,
flight_series.register_axis(AltosUIFlightSeries.height_name,
height_color,
flight_series.register_axis(AltosUIFlightSeries.height_name,
height_color,
+ enable_axis(product_id, AltosUIFlightSeries.height_name),
height_axis);
flight_series.register_axis(AltosUIFlightSeries.altitude_name,
height_axis);
flight_series.register_axis(AltosUIFlightSeries.altitude_name,
flight_series.register_axis(AltosUIFlightSeries.thrust_name,
accel_color,
flight_series.register_axis(AltosUIFlightSeries.thrust_name,
accel_color,
+ enable_axis(product_id, AltosUIFlightSeries.thrust_name),
thrust_axis);
for (int channel = 0; channel < 8; channel++) {
thrust_axis);
for (int channel = 0; channel < 8; channel++) {
flight_series.register_axis(AltosUIFlightSeries.motor_pressure_name,
motor_pressure_color,
flight_series.register_axis(AltosUIFlightSeries.motor_pressure_name,
motor_pressure_color,
+ enable_axis(product_id, AltosUIFlightSeries.motor_pressure_name),
motor_pressure_axis);
flight_series.check_axes();
motor_pressure_axis);
flight_series.check_axes();