From 449c6731b1977c7623dd006ec2db56f383f8d85a Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 6 Feb 2015 20:45:28 -0800 Subject: altoslib: Support TeleGPS for Monitor Idle TeleGPS has ADC and GPS values, so build the necessary ADC parser and then hook up GPS parsing. Signed-off-by: Keith Packard --- altoslib/AltosIdleFetch.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'altoslib/AltosIdleFetch.java') diff --git a/altoslib/AltosIdleFetch.java b/altoslib/AltosIdleFetch.java index 981035d4..8958d80c 100644 --- a/altoslib/AltosIdleFetch.java +++ b/altoslib/AltosIdleFetch.java @@ -38,6 +38,7 @@ class AltosIdler { static final int idle_sensor_mega = 12; static final int idle_sensor_emini = 13; static final int idle_sensor_tmini = 14; + static final int idle_sensor_tgps = 15; public void update_state(AltosState state, AltosLink link, AltosConfigData config_data) throws InterruptedException, TimeoutException { for (int idler : idlers) { @@ -72,6 +73,10 @@ class AltosIdler { break; case idle_sensor_tmini: AltosSensorTMini.update_state(state, link, config_data); + break; + case idle_sensor_tgps: + AltosSensorTGPS.update_state(state, link, config_data); + break; } if (idle != null) idle.update_state(state); @@ -122,6 +127,9 @@ public class AltosIdleFetch implements AltosStateUpdate { AltosIdler.idle_ms5607, AltosIdler.idle_mma655x, AltosIdler.idle_imu, AltosIdler.idle_mag, AltosIdler.idle_sensor_mega), + new AltosIdler("TeleGPS", + AltosIdler.idle_gps, + AltosIdler.idle_sensor_tgps), }; AltosLink link; -- cgit v1.2.3