X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altoslib%2FAltosTelemetryConfiguration.java;h=6ded5461c93c80926e9494a32965c625d3abc609;hp=e5d444dd2099beadc728addd9fe0a4180d7b49c6;hb=51bdee662fdfad1937c576daadd2e5eacac17905;hpb=488a527267decece48e6682e0e0c7fc29cbed329 diff --git a/altoslib/AltosTelemetryConfiguration.java b/altoslib/AltosTelemetryConfiguration.java index e5d444dd..6ded5461 100644 --- a/altoslib/AltosTelemetryConfiguration.java +++ b/altoslib/AltosTelemetryConfiguration.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 @@ -15,7 +16,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_2; +package org.altusmetrum.altoslib_11; public class AltosTelemetryConfiguration extends AltosTelemetryStandard { @@ -25,6 +26,7 @@ public class AltosTelemetryConfiguration extends AltosTelemetryStandard { int config_minor; int apogee_delay; int main_deploy; + int v_batt; int flight_log_max; String callsign; String version; @@ -36,6 +38,7 @@ public class AltosTelemetryConfiguration extends AltosTelemetryStandard { flight = uint16(6); config_major = uint8(8); config_minor = uint8(9); + v_batt = uint16(10); apogee_delay = uint16(10); main_deploy = uint16(12); flight_log_max = uint16(14); @@ -47,7 +50,11 @@ public class AltosTelemetryConfiguration extends AltosTelemetryStandard { super.update_state(state); state.set_device_type(device_type); state.set_flight(flight); - state.set_config(config_major, config_minor, apogee_delay, main_deploy, flight_log_max); + state.set_config(config_major, config_minor, flight_log_max); + if (device_type == AltosLib.product_telegps) + state.set_battery_voltage(AltosConvert.tele_gps_voltage(v_batt)); + else + state.set_flight_params(apogee_delay, main_deploy); state.set_callsign(callsign); state.set_firmware_version(version);