altosdroid: Add multi-tracker support
[fw/altos] / altosdroid / src / org / altusmetrum / AltosDroid / TabAscent.java
index 797dc7c3ceee8b991420a7b65730b25d1d826e4e..afce937f415f3d8d88122a219c935a0c9adcc3f7 100644 (file)
@@ -30,8 +30,6 @@ import android.widget.TextView;
 import android.location.Location;
 
 public class TabAscent extends AltosDroidTab {
-       AltosDroid mAltosDroid;
-
        private TextView mHeightView;
        private TextView mMaxHeightView;
        private TextView mSpeedView;
@@ -45,13 +43,6 @@ public class TabAscent extends AltosDroidTab {
        private TextView mMainVoltageView;
        private GoNoGoLights mMainLights;
 
-       @Override
-       public void onAttach(Activity activity) {
-               super.onAttach(activity);
-               mAltosDroid = (AltosDroid) activity;
-               mAltosDroid.registerTab(this);
-       }
-
        @Override
        public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
                View v = inflater.inflate(R.layout.tab_ascent, container, false);
@@ -78,18 +69,11 @@ public class TabAscent extends AltosDroidTab {
                return v;
        }
 
-       @Override
-       public void onDestroy() {
-               super.onDestroy();
-               mAltosDroid.unregisterTab(this);
-               mAltosDroid = null;
-       }
-
        public String tab_name() {
                return "ascent";
        }
 
-       public void show(AltosState state, AltosGreatCircle from_receiver, Location receiver) {
+       public void show(TelemetryState telem_state, AltosState state, AltosGreatCircle from_receiver, Location receiver) {
                if (state != null) {
                        set_value(mHeightView, AltosConvert.height, 6, state.height());
                        set_value(mHeightView, AltosConvert.height, 6, state.height());