- if (query.valid) {
- switch (query.arm_status) {
- case ao_igniter_ready:
- case ao_igniter_active:
- printf ("Armed: ");
- break;
- default:
- printf("Disarmed: ");
- }
- switch (query.igniter_status) {
- default:
- printf("unknown\n");
- break;
- case ao_igniter_ready:
- printf("igniter good\n");
- break;
- case ao_igniter_open:
- printf("igniter bad\n");
- break;
+ switch (ao_pad_query.arm_status) {
+ case AO_PAD_ARM_STATUS_ARMED:
+ printf ("Armed: ");
+ break;
+ case AO_PAD_ARM_STATUS_DISARMED:
+ printf("Disarmed: ");
+ break;
+ case AO_PAD_ARM_STATUS_UNKNOWN:
+ default:
+ printf("Unknown: ");
+ break;
+ }
+ for (c = 0; c < AO_PAD_MAX_CHANNELS; c++) {
+ if (ao_pad_query.channels & (1 << c)) {
+ printf (" pad %d ", c);
+ switch (ao_pad_query.igniter_status[c]) {
+ default:
+ printf("unknown, ");
+ break;
+ case AO_PAD_IGNITER_STATUS_NO_IGNITER_RELAY_OPEN:
+ printf("bad-open, ");
+ break;
+ case AO_PAD_IGNITER_STATUS_GOOD_IGNITER_RELAY_OPEN:
+ printf("good-igniter, ");
+ break;
+ case AO_PAD_IGNITER_STATUS_NO_IGNITER_RELAY_CLOSED:
+ printf("bad-closed, ");
+ break;
+ }