X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altosdroid%2Fsrc%2Forg%2Faltusmetrum%2FAltosDroid%2FTabPad.java;h=6fdd39dc4e817a28ea53171e7b290a2666bb814e;hp=5ff9d12bbc17ebfa1fd1ec718dab98324257256c;hb=a61217f0a6d0ef48b6471f632c4600255867e831;hpb=c4af5cb233013b35d6763f5adf8d11b47f847111 diff --git a/altosdroid/src/org/altusmetrum/AltosDroid/TabPad.java b/altosdroid/src/org/altusmetrum/AltosDroid/TabPad.java index 5ff9d12b..6fdd39dc 100644 --- a/altosdroid/src/org/altusmetrum/AltosDroid/TabPad.java +++ b/altosdroid/src/org/altusmetrum/AltosDroid/TabPad.java @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of @@ -17,7 +18,7 @@ package org.altusmetrum.AltosDroid; -import org.altusmetrum.altoslib_7.*; +import org.altusmetrum.altoslib_12.*; import android.app.Activity; import android.os.Bundle; @@ -177,10 +178,10 @@ public class TabPad extends AltosDroidTab { } main_lights.set(state.main_voltage >= AltosLib.ao_igniter_good, state.main_voltage == AltosLib.MISSING); - int num_igniter = state.ignitor_voltage == null ? 0 : state.ignitor_voltage.length; + int num_igniter = state.igniter_voltage == null ? 0 : state.igniter_voltage.length; for (int i = 0; i < 4; i++) { - double voltage = i >= num_igniter ? AltosLib.MISSING : state.ignitor_voltage[i]; + double voltage = i >= num_igniter ? AltosLib.MISSING : state.igniter_voltage[i]; if (voltage == AltosLib.MISSING) { ignite_row[i].setVisibility(View.GONE); } else { @@ -190,17 +191,17 @@ public class TabPad extends AltosDroidTab { ignite_lights[i].set(voltage >= AltosLib.ao_igniter_good, voltage == AltosLib.MISSING); } - if (state.flight != 0) { - if (state.state <= AltosLib.ao_flight_pad) + if (state.cal_data.flight != 0) { + if (state.state() <= AltosLib.ao_flight_pad) data_logging_view.setText("Ready to record"); - else if (state.state < AltosLib.ao_flight_landed) + else if (state.state() < AltosLib.ao_flight_landed) data_logging_view.setText("Recording data"); else data_logging_view.setText("Recorded data"); } else { data_logging_view.setText("Storage full"); } - data_logging_lights.set(state.flight != 0, state.flight == AltosLib.MISSING); + data_logging_lights.set(state.cal_data.flight != 0, state.cal_data.flight == AltosLib.MISSING); if (state.gps != null) { int soln = state.gps.nsat;