--- /dev/null
+/*
+ * Copyright © 2011 Keith Packard <keithp@keithp.com>
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+ */
+
+package org.altusmetrum.AltosLib;
+
+public interface AltosFontListener {
+ void font_size_changed(int font_size);
+}
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-package altosui;
+package org.altusmetrum.AltosLib;
public class AltosCRCException extends Exception {
public int rssi;
/*
* Sensor data conversion functions
*/
-package altosui;
+package org.altusmetrum.AltosLib;
public class AltosConvert {
/*
+++ /dev/null
-/*
- * Copyright © 2011 Keith Packard <keithp@keithp.com>
- *
- * 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.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
- */
-
-package altosui;
-
-public interface AltosFontListener {
- void font_size_changed(int font_size);
-}
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-package altosui;
+package org.altusmetrum.AltosLib;
import java.awt.*;
import java.awt.event.*;
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-package altosui;
+package org.altusmetrum.AltosLib;
import java.lang.*;
import java.text.*;
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-package altosui;
+package org.altusmetrum.AltosLib;
public class AltosGPSSat {
int svid;
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-package altosui;
+package org.altusmetrum.AltosLib;
public class AltosLine {
public String line;
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-package altosui;
+package org.altusmetrum.AltosLib;
import java.text.*;
import java.lang.*;
static int parse_int(String v) throws ParseException {
try {
- return Altos.fromdec(v);
+ return AltosLib.fromdec(v);
} catch (NumberFormatException e) {
throw new ParseException("error parsing int " + v, 0);
}
static int parse_hex(String v) throws ParseException {
try {
- return Altos.fromhex(v);
+ return AltosLib.fromhex(v);
} catch (NumberFormatException e) {
throw new ParseException("error parsing hex " + v, 0);
}
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-package altosui;
+package org.altusmetrum.AltosLib;
import java.lang.*;
import java.text.*;
}
public String state() {
- return Altos.state_name(state);
+ return AltosLib.state_name(state);
}
public static String gets(FileInputStream s) throws IOException {
flight = 0;
rssi = 0;
status = 0;
- state = Altos.ao_flight_startup;
+ state = AltosLib.ao_flight_startup;
tick = 0;
accel = MISSING;
pres = MISSING;
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-package altosui;
+package org.altusmetrum.AltosLib;
public class AltosRecordCompanion {
final static int board_id_telescience = 0x0a;
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-package altosui;
+package org.altusmetrum.AltosLib;
import java.awt.*;
import java.awt.event.*;
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-package altosui;
+package org.altusmetrum.AltosLib;
import java.lang.*;
import java.text.*;
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-package altosui;
+package org.altusmetrum.AltosLib;
import java.io.*;
import java.util.*;
current_tick = tick;
record.tick = current_tick;
}
- if (!saw_boost && record.state >= Altos.ao_flight_boost)
+ if (!saw_boost && record.state >= AltosLib.ao_flight_boost)
{
saw_boost = true;
boost_tick = record.tick;
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-package altosui;
+package org.altusmetrum.AltosLib;
import java.lang.*;
import java.text.*;
import java.util.HashMap;
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-package altosui;
+package org.altusmetrum.AltosLib;
import java.lang.*;
import java.text.*;
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-package altosui;
-import java.lang.*;
-import java.text.*;
+package org.altusmetrum.AltosLib;
public abstract class AltosTelemetryRecord {
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-package altosui;
+package org.altusmetrum.AltosLib;
public class AltosTelemetryRecordCompanion extends AltosTelemetryRecordRaw {
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-package altosui;
+package org.altusmetrum.AltosLib;
public class AltosTelemetryRecordConfiguration extends AltosTelemetryRecordRaw {
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-package altosui;
+package org.altusmetrum.AltosLib;
import java.lang.*;
import java.text.*;
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-package altosui;
+package org.altusmetrum.AltosLib;
import java.lang.*;
import java.text.*;
int adjust;
private int int8(int i) {
- return Altos.int8(bytes, i + 1 + adjust);
+ return AltosLib.int8(bytes, i + 1 + adjust);
}
private int uint8(int i) {
- return Altos.uint8(bytes, i + 1 + adjust);
+ return AltosLib.uint8(bytes, i + 1 + adjust);
}
private int int16(int i) {
- return Altos.int16(bytes, i + 1 + adjust);
+ return AltosLib.int16(bytes, i + 1 + adjust);
}
private int uint16(int i) {
- return Altos.uint16(bytes, i + 1 + adjust);
+ return AltosLib.uint16(bytes, i + 1 + adjust);
}
private int uint32(int i) {
- return Altos.uint32(bytes, i + 1 + adjust);
+ return AltosLib.uint32(bytes, i + 1 + adjust);
}
private String string(int i, int l) {
- return Altos.string(bytes, i + 1 + adjust, l);
+ return AltosLib.string(bytes, i + 1 + adjust, l);
}
static final int AO_GPS_NUM_SAT_MASK = (0xf << 0);
record.version = 4;
adjust = 0;
- if (bytes.length == Altos.ao_telemetry_0_8_len + 4) {
+ if (bytes.length == AltosLib.ao_telemetry_0_8_len + 4) {
record.serial = uint8(0);
adjust = -1;
} else
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-package altosui;
+package org.altusmetrum.AltosLib;
public class AltosTelemetryRecordLocation extends AltosTelemetryRecordRaw {
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-package altosui;
+package org.altusmetrum.AltosLib;
import java.lang.*;
import java.text.*;
long received_time;
public int int8(int off) {
- return Altos.int8(bytes, off + 1);
+ return AltosLib.int8(bytes, off + 1);
}
public int uint8(int off) {
- return Altos.uint8(bytes, off + 1);
+ return AltosLib.uint8(bytes, off + 1);
}
public int int16(int off) {
- return Altos.int16(bytes, off + 1);
+ return AltosLib.int16(bytes, off + 1);
}
public int uint16(int off) {
- return Altos.uint16(bytes, off + 1);
+ return AltosLib.uint16(bytes, off + 1);
}
public int uint32(int off) {
- return Altos.uint32(bytes, off + 1);
+ return AltosLib.uint32(bytes, off + 1);
}
public String string(int off, int l) {
- return Altos.string(bytes, off + 1, l);
+ return AltosLib.string(bytes, off + 1, l);
}
public AltosTelemetryRecordRaw(int[] in_bytes) {
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-package altosui;
+package org.altusmetrum.AltosLib;
public class AltosTelemetryRecordSatellite extends AltosTelemetryRecordRaw {
int channels;
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-package altosui;
+package org.altusmetrum.AltosLib;
public class AltosTelemetryRecordSensor extends AltosTelemetryRecordRaw {