X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altoslib%2FAltosIdleFetch.java;h=4b9a52542241c1cd3a6f1908bb842c80fd97fbe6;hp=058df0a1a246db3455e4f4877b05df0f8ff241fa;hb=0072e9741719367a1f6748d242cd6195a1a7c6a5;hpb=c8dbcaf69cd538a31ab6e2b568237ae7c8656a9a diff --git a/altoslib/AltosIdleFetch.java b/altoslib/AltosIdleFetch.java index 058df0a1..4b9a5254 100644 --- a/altoslib/AltosIdleFetch.java +++ b/altoslib/AltosIdleFetch.java @@ -16,7 +16,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_12; +package org.altusmetrum.altoslib_13; import java.io.*; import java.util.*; @@ -29,10 +29,11 @@ class AltosIdler { static final int idle_gps = 0; static final int idle_imu = 1; - static final int idle_mag = 2; + static final int idle_imu_em_v2 = 2; + static final int idle_mag = 3; static final int idle_mma655x = 4; static final int idle_ms5607 = 5; - + static final int idle_adxl375 = 6; static final int idle_sensor_tm = 10; static final int idle_sensor_metrum = 11; @@ -40,8 +41,9 @@ class AltosIdler { static final int idle_sensor_emini1 = 13; static final int idle_sensor_emini2 = 14; static final int idle_sensor_tmini2 = 15; - static final int idle_sensor_tgps = 16; - static final int idle_sensor_tmini3 = 17; + static final int idle_sensor_tgps1 = 16; + static final int idle_sensor_tgps2 = 17; + static final int idle_sensor_tmini3 = 18; public void provide_data(AltosDataListener listener, AltosLink link) throws InterruptedException, TimeoutException, AltosUnknownProduct { for (int idler : idlers) { @@ -50,7 +52,10 @@ class AltosIdler { AltosGPS.provide_data(listener, link); break; case idle_imu: - AltosIMU.provide_data(listener, link); + AltosIMU.provide_data(listener, link, AltosIMU.orient_telemega); + break; + case idle_imu_em_v2: + AltosIMU.provide_data(listener, link, AltosIMU.orient_easymega_v2); break; case idle_mag: AltosMag.provide_data(listener, link); @@ -58,6 +63,9 @@ class AltosIdler { case idle_mma655x: AltosMma655x.provide_data(listener, link); break; + case idle_adxl375: + AltosAdxl375.provide_data(listener, link); + break; case idle_ms5607: AltosMs5607.provide_data(listener, link); break; @@ -79,8 +87,11 @@ class AltosIdler { case idle_sensor_tmini2: AltosSensorTMini2.provide_data(listener, link); break; - case idle_sensor_tgps: - AltosSensorTGPS.provide_data(listener, link); + case idle_sensor_tgps1: + AltosSensorTGPS1.provide_data(listener, link); + break; + case idle_sensor_tgps2: + AltosSensorTGPS2.provide_data(listener, link); break; case idle_sensor_tmini3: AltosSensorTMini3.provide_data(listener, link); @@ -133,20 +144,52 @@ public class AltosIdleFetch implements AltosDataProvider { AltosIdler.idle_ms5607, AltosIdler.idle_sensor_metrum), - new AltosIdler("TeleMega", + new AltosIdler("TeleMetrum-v3", + AltosIdler.idle_gps, + AltosIdler.idle_adxl375, + AltosIdler.idle_ms5607, + AltosIdler.idle_sensor_metrum), + + new AltosIdler("TeleMega-v0", AltosIdler.idle_gps, AltosIdler.idle_mma655x, AltosIdler.idle_ms5607, AltosIdler.idle_imu, AltosIdler.idle_mag, AltosIdler.idle_sensor_mega), - new AltosIdler("EasyMega", + new AltosIdler("TeleMega-v1", + AltosIdler.idle_gps, AltosIdler.idle_mma655x, AltosIdler.idle_ms5607, AltosIdler.idle_imu, AltosIdler.idle_mag, AltosIdler.idle_sensor_mega), - new AltosIdler("TeleGPS", + new AltosIdler("TeleMega-v2", + AltosIdler.idle_gps, + AltosIdler.idle_mma655x, + AltosIdler.idle_ms5607, + AltosIdler.idle_imu, AltosIdler.idle_mag, + AltosIdler.idle_sensor_mega), + new AltosIdler("TeleMega-v3", + AltosIdler.idle_gps, + AltosIdler.idle_mma655x, + AltosIdler.idle_ms5607, + AltosIdler.idle_imu, + AltosIdler.idle_sensor_mega), + new AltosIdler("EasyMega-v1", + AltosIdler.idle_mma655x, + AltosIdler.idle_ms5607, + AltosIdler.idle_imu, AltosIdler.idle_mag, + AltosIdler.idle_sensor_mega), + new AltosIdler("EasyMega-v2", + AltosIdler.idle_adxl375, + AltosIdler.idle_ms5607, + AltosIdler.idle_imu_em_v2, + AltosIdler.idle_sensor_mega), + new AltosIdler("TeleGPS-v1", + AltosIdler.idle_gps, + AltosIdler.idle_sensor_tgps1), + new AltosIdler("TeleGPS-v2", AltosIdler.idle_gps, - AltosIdler.idle_sensor_tgps), + AltosIdler.idle_sensor_tgps2), }; AltosLink link;