diff options
author | Keith Packard <keithp@keithp.com> | 2013-12-18 13:22:45 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2013-12-18 13:22:45 -0800 |
commit | dbcf3264f950c4e1d450828c9f161b4c418bee97 (patch) | |
tree | 71f211fcd777ea6c4f32cb29482e5a6d8cb7e1d9 /altosui/AltosPad.java | |
parent | b19a648b667c298d2d9d5ed4ee9db661be058d1a (diff) |
altoslib: Define 3.8 as a good battery and 3.5 as a good igniter
Use defined values everywhere instead of copying. Adjust battery up to
3.8 to ensure there's enough voltage to not trip the comparators
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosui/AltosPad.java')
-rw-r--r-- | altosui/AltosPad.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/altosui/AltosPad.java b/altosui/AltosPad.java index b35bd23a..06a0f1ef 100644 --- a/altosui/AltosPad.java +++ b/altosui/AltosPad.java @@ -180,7 +180,7 @@ public class AltosPad extends JComponent implements AltosFlightDisplay { hide(); else { show("%4.2f V", state.battery_voltage); - lights.set(state.battery_voltage > 3.7); + lights.set(state.battery_voltage >= AltosLib.ao_battery_good); } } public Battery (GridBagLayout layout, int y) { @@ -196,7 +196,7 @@ public class AltosPad extends JComponent implements AltosFlightDisplay { hide(); else { show("%4.2f V", state.apogee_voltage); - lights.set(state.apogee_voltage > 3.7); + lights.set(state.apogee_voltage >= AltosLib.ao_igniter_good); } } public Apogee (GridBagLayout layout, int y) { @@ -212,7 +212,7 @@ public class AltosPad extends JComponent implements AltosFlightDisplay { hide(); else { show("%4.2f V", state.main_voltage); - lights.set(state.main_voltage > 3.7); + lights.set(state.main_voltage >= AltosLib.ao_igniter_good); } } public Main (GridBagLayout layout, int y) { @@ -287,7 +287,7 @@ public class AltosPad extends JComponent implements AltosFlightDisplay { hide(); else { show("%4.2f V", listener_state.battery); - lights.set(listener_state.battery > 3.7); + lights.set(listener_state.battery > AltosLib.ao_battery_good); } } public ReceiverBattery (GridBagLayout layout, int y) { |