summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBdale Garbee <bdale@gag.com>2017-04-22 23:01:44 -0600
committerBdale Garbee <bdale@gag.com>2017-04-22 23:01:44 -0600
commite3b30d4bd6faf68c885791fb87229558cc1157a6 (patch)
tree8f56d36c05543f63bef857b7b48b61ab35522584 /src
parente5e0ce18b2ae684896a6d7d0a4c10269199d95b5 (diff)
add static test start and stop commands to radio protocol for telefiretwo
Diffstat (limited to 'src')
-rw-r--r--src/drivers/ao_pad.c31
-rw-r--r--src/drivers/ao_pad.h5
2 files changed, 33 insertions, 3 deletions
diff --git a/src/drivers/ao_pad.c b/src/drivers/ao_pad.c
index ffa833fe..28c00fe3 100644
--- a/src/drivers/ao_pad.c
+++ b/src/drivers/ao_pad.c
@@ -316,7 +316,7 @@ ao_pad(void)
command.tick, command.box, ao_pad_box, command.cmd, command.channels);
switch (command.cmd) {
- case AO_LAUNCH_ARM:
+ case AO_PAD_ARM:
if (command.box != ao_pad_box) {
PRINTD ("box number mismatch\n");
break;
@@ -338,7 +338,7 @@ ao_pad(void)
ao_pad_arm_time = ao_time();
break;
- case AO_LAUNCH_QUERY:
+ case AO_PAD_QUERY:
if (command.box != ao_pad_box) {
PRINTD ("box number mismatch\n");
break;
@@ -357,7 +357,7 @@ ao_pad(void)
query.igniter_status[3]);
ao_radio_cmac_send(&query, sizeof (query));
break;
- case AO_LAUNCH_FIRE:
+ case AO_PAD_FIRE:
if (!ao_pad_armed) {
PRINTD ("not armed\n");
break;
@@ -373,6 +373,31 @@ ao_pad(void)
ao_wakeup(&ao_pad_ignite);
break;
}
+ case AO_PAD_STATIC:
+ if (!ao_pad_armed) {
+ PRINTD ("not armed\n");
+ break;
+ }
+#ifdef HAS_LOG
+ if (!ao_log_running) ao_log_start();
+#endif
+ if ((uint16_t) (ao_time() - ao_pad_arm_time) > AO_SEC_TO_TICKS(20)) {
+ PRINTD ("late pad arm_time %d time %d\n",
+ ao_pad_arm_time, ao_time());
+ break;
+ }
+ PRINTD ("ignite\n");
+ ao_pad_ignite = ao_pad_armed;
+ ao_pad_arm_time = ao_time();
+ ao_wakeup(&ao_pad_ignite);
+ break;
+ }
+ case AO_PAD_ENDSTATIC:
+#ifdef HAS_LOG
+ ao_log_stop();
+#endif
+ break;
+ }
}
}
diff --git a/src/drivers/ao_pad.h b/src/drivers/ao_pad.h
index 648d3005..e4115222 100644
--- a/src/drivers/ao_pad.h
+++ b/src/drivers/ao_pad.h
@@ -54,6 +54,11 @@ struct ao_pad_query {
*/
#define AO_PAD_FIRE 3
+/* Fire current armed pads for 200ms, no report, logging test stand sensors
+ */
+#define AO_PAD_STATIC 4
+#define AO_PAD_ENDSTATIC 5
+
#define AO_PAD_FIRE_TIME AO_MS_TO_TICKS(200)
#define AO_PAD_ARM_STATUS_DISARMED 0