summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ao-tools/altosui/AltosFlash.java4
-rw-r--r--src/ao_ignite.c4
-rw-r--r--src/ao_radio.c33
3 files changed, 27 insertions, 14 deletions
diff --git a/ao-tools/altosui/AltosFlash.java b/ao-tools/altosui/AltosFlash.java
index fa2465d3..3af25c23 100644
--- a/ao-tools/altosui/AltosFlash.java
+++ b/ao-tools/altosui/AltosFlash.java
@@ -336,7 +336,9 @@ public class AltosFlash {
debug = new AltosDebug(in_debug_dongle);
input = new FileInputStream(file);
image = new AltosHexfile(input);
- if (!debug.check_connection())
+ if (!debug.check_connection()) {
+ debug.close();
throw new IOException("Debug port not connected");
+ }
}
} \ No newline at end of file
diff --git a/src/ao_ignite.c b/src/ao_ignite.c
index 4093b6a7..58d340d9 100644
--- a/src/ao_ignite.c
+++ b/src/ao_ignite.c
@@ -113,9 +113,7 @@ ao_igniter(void)
ao_igniter_fire(igniter);
ao_delay(AO_IGNITER_CHARGE_TIME);
- status = ao_igniter_status(igniter);
- if (status == ao_igniter_open)
- ao_ignition[igniter].fired = 1;
+ ao_ignition[igniter].fired = 1;
}
}
}
diff --git a/src/ao_radio.c b/src/ao_radio.c
index f4a9d3b2..3fb4afd7 100644
--- a/src/ao_radio.c
+++ b/src/ao_radio.c
@@ -448,19 +448,32 @@ ao_radio_rdf_abort(void)
void
ao_radio_test(void)
{
- ao_set_monitor(0);
- ao_packet_slave_stop();
- ao_radio_get();
- printf ("Hit a character to stop..."); flush();
- RFST = RFST_STX;
- getchar();
- ao_radio_idle();
- ao_radio_put();
- putchar('\n');
+ uint8_t mode = 2;
+ ao_cmd_white();
+ if (ao_cmd_lex_c != '\n') {
+ ao_cmd_decimal();
+ mode = (uint8_t) ao_cmd_lex_u32;
+ }
+ mode++;
+ if (mode & 2) {
+ ao_set_monitor(0);
+ ao_packet_slave_stop();
+ ao_radio_get();
+ RFST = RFST_STX;
+ }
+ if (mode == 3) {
+ printf ("Hit a character to stop..."); flush();
+ getchar();
+ putchar('\n');
+ }
+ if (mode & 1) {
+ ao_radio_idle();
+ ao_radio_put();
+ }
}
__code struct ao_cmds ao_radio_cmds[] = {
- { 'C', ao_radio_test, "C Radio carrier test" },
+ { 'C', ao_radio_test, "C <1 start, 0 stop, none both> Radio carrier test" },
{ 0, ao_radio_test, NULL },
};