X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=ao-tools%2Fao-test-igniter%2Fao-test-igniter.c;fp=ao-tools%2Fao-test-igniter%2Fao-test-igniter.c;h=180defdb441a436af5a850d731bcee79cee95c3f;hp=17d5aad6451dd22d1ff874db4e2a525fc0f1d045;hb=b140da92536d7c48ba37868f1c2afce7bb86dfdb;hpb=1d208c9509f03f7e2c913abe5c0dd78ef0083c0f diff --git a/ao-tools/ao-test-igniter/ao-test-igniter.c b/ao-tools/ao-test-igniter/ao-test-igniter.c index 17d5aad6..180defdb 100644 --- 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; } +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) { @@ -115,7 +125,9 @@ igniters(struct cc_usb *usb) 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; }