altosdroid: update to support new state code
[fw/altos] / altosdroid / src / org / altusmetrum / AltosDroid / AltosDroid.java
index 6f3787775cb0868b57661399baadbb6af0087e70..92287476b7dbf56fc654c408e5ddeb8c5ba41fd4 100644 (file)
@@ -147,7 +147,7 @@ public class AltosDroid extends FragmentActivity {
                        case MSG_CRC_ERROR:
                        case MSG_UPDATE_AGE:
                                if (ad.saved_state != null) {
-                                       ad.mAgeView.setText(String.format("%d", (System.currentTimeMillis() - ad.saved_state.report_time + 500) / 1000));
+                                       ad.mAgeView.setText(String.format("%d", (System.currentTimeMillis() - ad.saved_state.received_time + 500) / 1000));
                                }
                                break;
                        }
@@ -243,11 +243,11 @@ public class AltosDroid extends FragmentActivity {
                }
 
                if (state != null) {
-                       mCallsignView.setText(state.data.callsign);
-                       mSerialView.setText(String.format("%d", state.data.serial));
-                       mFlightView.setText(String.format("%d", state.data.flight));
-                       mStateView.setText(state.data.state());
-                       mRSSIView.setText(String.format("%d", state.data.rssi));
+                       mCallsignView.setText(state.callsign);
+                       mSerialView.setText(String.format("%d", state.serial));
+                       mFlightView.setText(String.format("%d", state.flight));
+                       mStateView.setText(state.state_name());
+                       mRSSIView.setText(String.format("%d", state.rssi));
                }
 
                for (AltosDroidTab mTab : mTabs)