altosuilib/micropeak: Add state markers to micropeak graph
[fw/altos] / micropeak / MicroGraph.java
index 0071a160ef988a3cc44dfda02279c7aadef0b915..50508a61b42cbcb0f46bf9fc45b685caba6c6e30 100644 (file)
@@ -40,12 +40,14 @@ public class MicroGraph extends AltosUIGraph {
        static final private Color height_color = new Color(194,31,31);
        static final private Color speed_color = new Color(31,194,31);
        static final private Color accel_color = new Color(31,31,194);
+       static final private Color state_color = new Color(3,3,3);
 
        public MicroGraph(AltosUIEnable enable) {
                super(enable);
 
-               addSeries(0, "Height", MicroDataPoint.data_height, AltosConvert.height, height_color);
-               addSeries(1, "Speed", MicroDataPoint.data_speed, AltosConvert.speed, speed_color);
-               addSeries(2, "Acceleration", MicroDataPoint.data_accel, AltosConvert.accel, accel_color);
+               addSeries("Height", MicroDataPoint.data_height, AltosConvert.height, height_color);
+               addSeries("Speed", MicroDataPoint.data_speed, AltosConvert.speed, speed_color);
+               addSeries("Acceleration", MicroDataPoint.data_accel, AltosConvert.accel, accel_color);
+               addMarker("State", MicroDataPoint.data_state, state_color);
        }
 }
\ No newline at end of file