summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--altoslib/AltosKML.java2
-rw-r--r--altosui/AltosConfigFC.java (renamed from altosui/AltosConfig.java)12
-rw-r--r--altosui/AltosConfigFCUI.java (renamed from altosui/AltosConfigUI.java)8
-rw-r--r--altosui/AltosConfigPyroUI.java8
-rw-r--r--altosui/AltosUI.java11
-rw-r--r--altosui/Makefile-standalone4
-rw-r--r--altosui/Makefile.am4
-rwxr-xr-xao-bringup/turnon_chaoskey2
-rw-r--r--libaltos/cjnitest.c6
-rw-r--r--src/test/ao_aes_test.c4
-rw-r--r--src/test/ao_int64_test.c2
11 files changed, 35 insertions, 28 deletions
diff --git a/altoslib/AltosKML.java b/altoslib/AltosKML.java
index 1c025ef4..587b845b 100644
--- a/altoslib/AltosKML.java
+++ b/altoslib/AltosKML.java
@@ -121,7 +121,7 @@ public class AltosKML implements AltosWriter {
String state_color = state_color(state);
out.printf(kml_style_start, state_name, state_color);
out.printf("State: %s\n", state_name);
- out.printf("Time: %6.2f s\n", stats.state_end[state] - stats.state_start[state]);
+ out.printf("Time: %6.2f s\n", stats.state_time[state]);
out.printf("Average speed: %s\n", AltosConvert.speed.show(6, stats.state_speed[state]));
out.printf("Average accel: %s\n", AltosConvert.accel.show(6, stats.state_accel[state]));
out.printf("%s", kml_style_end);
diff --git a/altosui/AltosConfig.java b/altosui/AltosConfigFC.java
index bf2b8166..beff71b7 100644
--- a/altosui/AltosConfig.java
+++ b/altosui/AltosConfigFC.java
@@ -26,7 +26,7 @@ import java.text.*;
import org.altusmetrum.altoslib_12.*;
import org.altusmetrum.altosuilib_12.*;
-public class AltosConfig implements ActionListener {
+public class AltosConfigFC implements ActionListener {
class int_ref {
int value;
@@ -62,7 +62,7 @@ public class AltosConfig implements ActionListener {
boolean remote;
AltosConfigData data;
- AltosConfigUI config_ui;
+ AltosConfigFCUI config_ui;
boolean serial_started;
boolean made_visible;
@@ -96,7 +96,7 @@ public class AltosConfig implements ActionListener {
final static int serial_mode_reboot = 2;
class SerialData implements Runnable {
- AltosConfig config;
+ AltosConfigFC config;
int serial_mode;
void callback(String in_cmd) {
@@ -182,7 +182,7 @@ public class AltosConfig implements ActionListener {
}
}
- public SerialData(AltosConfig in_config, int in_serial_mode) {
+ public SerialData(AltosConfigFC in_config, int in_serial_mode) {
config = in_config;
serial_mode = in_serial_mode;
}
@@ -195,7 +195,7 @@ public class AltosConfig implements ActionListener {
}
void init_ui () throws InterruptedException, TimeoutException {
- config_ui = new AltosConfigUI(owner, remote);
+ config_ui = new AltosConfigFCUI(owner, remote);
config_ui.addActionListener(this);
serial_line.set_frame(owner);
set_ui();
@@ -275,7 +275,7 @@ public class AltosConfig implements ActionListener {
}
}
- public AltosConfig(JFrame given_owner) {
+ public AltosConfigFC(JFrame given_owner) {
owner = given_owner;
device = AltosDeviceUIDialog.show(owner, Altos.product_any);
diff --git a/altosui/AltosConfigUI.java b/altosui/AltosConfigFCUI.java
index 270131b8..c0c37254 100644
--- a/altosui/AltosConfigUI.java
+++ b/altosui/AltosConfigFCUI.java
@@ -26,7 +26,7 @@ import java.text.*;
import org.altusmetrum.altoslib_12.*;
import org.altusmetrum.altosuilib_12.*;
-public class AltosConfigUI
+public class AltosConfigFCUI
extends AltosUIDialog
implements ActionListener, ItemListener, DocumentListener, AltosConfigValues, AltosUnitsListener
{
@@ -159,9 +159,9 @@ public class AltosConfigUI
/* A window listener to catch closing events and tell the config code */
class ConfigListener extends WindowAdapter {
- AltosConfigUI ui;
+ AltosConfigFCUI ui;
- public ConfigListener(AltosConfigUI this_ui) {
+ public ConfigListener(AltosConfigFCUI this_ui) {
ui = this_ui;
}
@@ -270,7 +270,7 @@ public class AltosConfigUI
}
/* Build the UI using a grid bag */
- public AltosConfigUI(JFrame in_owner, boolean remote) {
+ public AltosConfigFCUI(JFrame in_owner, boolean remote) {
super (in_owner, "Configure Flight Computer", false);
owner = in_owner;
diff --git a/altosui/AltosConfigPyroUI.java b/altosui/AltosConfigPyroUI.java
index 5016ea63..cd887c00 100644
--- a/altosui/AltosConfigPyroUI.java
+++ b/altosui/AltosConfigPyroUI.java
@@ -30,7 +30,7 @@ public class AltosConfigPyroUI
extends AltosUIDialog
implements ItemListener, DocumentListener, AltosUnitsListener, ActionListener
{
- AltosConfigUI owner;
+ AltosConfigFCUI owner;
Container pane;
static Insets il = new Insets(4,4,4,4);
@@ -347,9 +347,9 @@ public class AltosConfigPyroUI
/* A window listener to catch closing events and tell the config code */
class ConfigListener extends WindowAdapter {
AltosConfigPyroUI ui;
- AltosConfigUI owner;
+ AltosConfigFCUI owner;
- public ConfigListener(AltosConfigPyroUI this_ui, AltosConfigUI this_owner) {
+ public ConfigListener(AltosConfigPyroUI this_ui, AltosConfigFCUI this_owner) {
ui = this_ui;
owner = this_owner;
}
@@ -367,7 +367,7 @@ public class AltosConfigPyroUI
setVisible(false);
}
- public AltosConfigPyroUI(AltosConfigUI in_owner, AltosPyro[] pyros, double pyro_firing_time) {
+ public AltosConfigPyroUI(AltosConfigFCUI in_owner, AltosPyro[] pyros, double pyro_firing_time) {
super(in_owner, "Configure Pyro Channels", false);
diff --git a/altosui/AltosUI.java b/altosui/AltosUI.java
index 26591738..4bc2a5f8 100644
--- a/altosui/AltosUI.java
+++ b/altosui/AltosUI.java
@@ -276,7 +276,7 @@ public class AltosUI extends AltosUIFrame {
}
void ConfigureTeleMetrum() {
- new AltosConfig(AltosUI.this);
+ new AltosConfigFC(AltosUI.this);
}
void ConfigureTeleDongle() {
@@ -520,11 +520,12 @@ public class AltosUI extends AltosUIFrame {
System.out.printf("Main rate: %6.0f m/s %6.0f ft/s\n",
stats.state_speed[Altos.ao_flight_main],
AltosConvert.meters_to_feet(stats.state_speed[Altos.ao_flight_main]));
- if (stats.state_end[Altos.ao_flight_main] != AltosLib.MISSING &&
- stats.state_start[Altos.ao_flight_boost] != AltosLib.MISSING)
+ if (stats.landed_time != AltosLib.MISSING &&
+ stats.boost_time != AltosLib.MISSING &&
+ stats.landed_time > stats.boost_time)
System.out.printf("Flight time: %6.0f s\n",
- stats.state_end[Altos.ao_flight_main] -
- stats.state_start[Altos.ao_flight_boost]);
+ stats.landed_time -
+ stats.boost_time);
System.out.printf("\n");
return true;
}
diff --git a/altosui/Makefile-standalone b/altosui/Makefile-standalone
index cbaf9743..e5f41639 100644
--- a/altosui/Makefile-standalone
+++ b/altosui/Makefile-standalone
@@ -4,8 +4,8 @@ CLASSPATH=classes:./*:/usr/share/java/*
CLASSFILES=\
Altos.class \
AltosChannelMenu.class \
- AltosConfig.class \
- AltosConfigUI.class \
+ AltosConfigFC.class \
+ AltosConfigFCUI.class \
AltosConvert.class \
AltosCRCException.class \
AltosCSV.class \
diff --git a/altosui/Makefile.am b/altosui/Makefile.am
index df022c40..720cae7f 100644
--- a/altosui/Makefile.am
+++ b/altosui/Makefile.am
@@ -14,8 +14,8 @@ altosui_JAVA = \
AltosAscent.java \
AltosChannelMenu.java \
AltosCompanionInfo.java \
- AltosConfig.java \
- AltosConfigUI.java \
+ AltosConfigFC.java \
+ AltosConfigFCUI.java \
AltosConfigPyroUI.java \
AltosConfigureUI.java \
AltosConfigTD.java \
diff --git a/ao-bringup/turnon_chaoskey b/ao-bringup/turnon_chaoskey
index 1a8fe13f..4a255bff 100755
--- a/ao-bringup/turnon_chaoskey
+++ b/ao-bringup/turnon_chaoskey
@@ -27,7 +27,7 @@ echo
FLASH_FILE=~/altusmetrumllc/Binaries/loaders/chaoskey-v1.0-altos-flash-*.bin
ALTOS_FILE=~/altusmetrumllc/Binaries/chaoskey-v1.0-*.elf
-$DFU_UTIL -a 0 -s 0x08000000:leave -D $FLASH_FILE || exit 1
+$DFU_UTIL -a 0 -s 0x08000000:leave -D $FLASH_FILE || true
sleep 2
diff --git a/libaltos/cjnitest.c b/libaltos/cjnitest.c
index 3a65c3d6..7e857275 100644
--- a/libaltos/cjnitest.c
+++ b/libaltos/cjnitest.c
@@ -1,5 +1,9 @@
#include <stdio.h>
#include "libaltos.h"
+#include <string.h>
+
+#define HAS_BLUETOOTH 1
+#define HAS_USB 1
static void
altos_puts(struct altos_file *file, char *string)
@@ -19,6 +23,7 @@ main (int argc, char **argv)
struct altos_bt_list *bt_list;
altos_init();
+#if HAS_USB
list = altos_list_start();
while (altos_list_next(list, &device)) {
struct altos_file *file;
@@ -42,6 +47,7 @@ main (int argc, char **argv)
altos_close(file);
}
altos_list_finish(list);
+#endif
#if HAS_BLUETOOTH
bt_list = altos_bt_list_start(8);
while (altos_bt_list_next(bt_list, &bt_device)) {
diff --git a/src/test/ao_aes_test.c b/src/test/ao_aes_test.c
index 4b65df8d..135c6f1a 100644
--- a/src/test/ao_aes_test.c
+++ b/src/test/ao_aes_test.c
@@ -30,7 +30,7 @@
#include "../aes/ao_aes_tables.c"
#include "../aes/ao_aes.c"
-static uint8_t key[16];
+static uint8_t my_key[64];
static uint8_t text[16];
static uint8_t cbc[16];
@@ -41,7 +41,7 @@ main (int argc, char **argv)
ao_aes_init();
ao_aes_set_mode(ao_aes_mode_cbc_mac);
- ao_aes_set_key(key);
+ ao_aes_set_key(my_key);
ao_aes_zero_iv();
ao_aes_run(text, cbc);
diff --git a/src/test/ao_int64_test.c b/src/test/ao_int64_test.c
index 07538ee0..d329f67b 100644
--- a/src/test/ao_int64_test.c
+++ b/src/test/ao_int64_test.c
@@ -34,7 +34,7 @@ int errors;
c = ao_cast64(&ao_r); \
if (c != r) { \
printf ("trial %4d: %lld " #func mod " %lld = %lld (should be %lld)\n", \
- trial, (int64_t) (a), (int64_t) b, c, r); \
+ trial, (long long) (a), (long long) b, (long long) c, (long long) r); \
++errors; \
} \
} while (0)