X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altosdroid%2Fapp%2Fsrc%2Fmain%2Fjava%2Forg%2Faltusmetrum%2FAltosDroid%2FTabPad.java;h=f526857f00ccedb3a67011dc9b606309dc2394f1;hp=f317ae912c77dc3b03614a5886769337d362dfed;hb=76b288f8d02e0a48f04de9455a2dd0b77e48bd63;hpb=8b53f860eb3171cd43e4bd0e440f2889bd810662 diff --git a/altosdroid/app/src/main/java/org/altusmetrum/AltosDroid/TabPad.java b/altosdroid/app/src/main/java/org/altusmetrum/AltosDroid/TabPad.java index f317ae91..f526857f 100644 --- a/altosdroid/app/src/main/java/org/altusmetrum/AltosDroid/TabPad.java +++ b/altosdroid/app/src/main/java/org/altusmetrum/AltosDroid/TabPad.java @@ -18,11 +18,9 @@ package org.altusmetrum.AltosDroid; -import org.altusmetrum.altoslib_13.*; +import org.altusmetrum.altoslib_14.*; -import android.app.Activity; import android.os.Bundle; -import android.support.v4.app.Fragment; import android.view.*; import android.widget.*; import android.location.Location; @@ -161,19 +159,19 @@ public class TabPad extends AltosDroidTab { public void show(TelemetryState telem_state, AltosState state, AltosGreatCircle from_receiver, Location receiver) { if (state != null) { - battery_voltage_view.setText(AltosDroid.number(" %4.2f V", state.battery_voltage)); + battery_voltage_view.setText(AltosDroid.number("%1.2f V", state.battery_voltage)); battery_lights.set(state.battery_voltage >= AltosLib.ao_battery_good, state.battery_voltage == AltosLib.MISSING); if (state.apogee_voltage == AltosLib.MISSING) { apogee_row.setVisibility(View.GONE); } else { - apogee_voltage_view.setText(AltosDroid.number(" %4.2f V", state.apogee_voltage)); + apogee_voltage_view.setText(AltosDroid.number("%1.2f V", state.apogee_voltage)); apogee_row.setVisibility(View.VISIBLE); } apogee_lights.set(state.apogee_voltage >= AltosLib.ao_igniter_good, state.apogee_voltage == AltosLib.MISSING); if (state.main_voltage == AltosLib.MISSING) { main_row.setVisibility(View.GONE); } else { - main_voltage_view.setText(AltosDroid.number(" %4.2f V", state.main_voltage)); + main_voltage_view.setText(AltosDroid.number("%1.2f V", state.main_voltage)); main_row.setVisibility(View.VISIBLE); } main_lights.set(state.main_voltage >= AltosLib.ao_igniter_good, state.main_voltage == AltosLib.MISSING); @@ -185,7 +183,7 @@ public class TabPad extends AltosDroidTab { if (voltage == AltosLib.MISSING) { ignite_row[i].setVisibility(View.GONE); } else { - ignite_voltage_view[i].setText(AltosDroid.number(" %4.2f V", voltage)); + ignite_voltage_view[i].setText(AltosDroid.number("%1.2f V", voltage)); ignite_row[i].setVisibility(View.VISIBLE); } ignite_lights[i].set(voltage >= AltosLib.ao_igniter_good, voltage == AltosLib.MISSING); @@ -221,7 +219,7 @@ public class TabPad extends AltosDroidTab { if (telem_state.receiver_battery == AltosLib.MISSING) { receiver_row.setVisibility(View.GONE); } else { - receiver_voltage_view.setText(AltosDroid.number(" %4.2f V", telem_state.receiver_battery)); + receiver_voltage_view.setText(AltosDroid.number("%1.2f V", telem_state.receiver_battery)); receiver_row.setVisibility(View.VISIBLE); } receiver_voltage_lights.set(telem_state.receiver_battery >= AltosLib.ao_battery_good, telem_state.receiver_battery == AltosLib.MISSING);