projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
[fw/altos]
/
ao-tools
/
ao-test-igniter
/
ao-test-igniter.c
diff --git
a/ao-tools/ao-test-igniter/ao-test-igniter.c
b/ao-tools/ao-test-igniter/ao-test-igniter.c
index 17d5aad6451dd22d1ff874db4e2a525fc0f1d045..180defdb441a436af5a850d731bcee79cee95c3f 100644
(file)
--- a/
ao-tools/ao-test-igniter/ao-test-igniter.c
+++ b/
ao-tools/ao-test-igniter/ao-test-igniter.c
@@
-82,6
+82,16
@@
map_igniter_name(char *adc_name, char *igniter_name)
return true;
}
return true;
}
+static const char *
+other_igniter_name(const char *name)
+{
+ if (!strcmp(name, "drogue"))
+ return "apogee";
+ if (!strcmp(name, "apogee"))
+ return "drogue";
+ return name;
+}
+
static struct igniter *
igniters(struct cc_usb *usb)
{
static struct igniter *
igniters(struct cc_usb *usb)
{
@@
-115,7
+125,9
@@
igniters(struct cc_usb *usb)
if (found_igniter) {
struct igniter *i;
for (i = head; i; i = i->next)
if (found_igniter) {
struct igniter *i;
for (i = head; i; i = i->next)
- if (!strcmp(i->name, igniter_name)) {
+ if (!strcmp(i->name, igniter_name) ||
+ !strcmp(i->name, other_igniter_name(igniter_name)))
+ {
i->adc = atoi(tok);
break;
}
i->adc = atoi(tok);
break;
}