altos/drivers: Pads with multi-port firing and pad selector DIP switch
[fw/altos] / src / drivers / ao_pad.c
1 /*
2  * Copyright © 2012 Keith Packard <keithp@keithp.com>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful, but
10  * WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
17  */
18
19 #include <ao.h>
20 #include <ao_exti.h>
21 #include <ao_pad.h>
22 #include <ao_74hc165.h>
23 #include <ao_radio_cmac.h>
24
25 static __xdata uint8_t ao_pad_ignite;
26 static __xdata struct ao_pad_command    command;
27 static __xdata struct ao_pad_query      query;
28 static __pdata uint8_t  ao_pad_armed;
29 static __pdata uint16_t ao_pad_arm_time;
30 static __pdata uint8_t  ao_pad_box;
31 static __xdata uint8_t  ao_pad_disabled;
32 static __pdata uint16_t ao_pad_packet_time;
33
34 #ifndef AO_PAD_RSSI_MINIMUM
35 #define AO_PAD_RSSI_MINIMUM     -90
36 #endif
37
38 #define DEBUG   1
39
40 #if DEBUG
41 static __pdata uint8_t  ao_pad_debug;
42 #define PRINTD(...) (ao_pad_debug ? (printf(__VA_ARGS__), 0) : 0)
43 #define FLUSHD()    (ao_pad_debug ? (flush(), 0) : 0)
44 #else
45 #define PRINTD(...)
46 #define FLUSHD()
47 #endif
48
49 static void
50 ao_siren(uint8_t v)
51 {
52 #ifdef AO_SIREN
53         ao_gpio_set(AO_SIREN_PORT, AO_SIREN_PIN, AO_SIREN, v);
54 #else
55 #if HAS_BEEP
56         ao_beep(v ? AO_BEEP_MID : 0);
57 #else
58         (void) v;
59 #endif
60 #endif
61 }
62
63 static void
64 ao_strobe(uint8_t v)
65 {
66 #ifdef AO_STROBE
67         ao_gpio_set(AO_STROBE_PORT, AO_STROBE_PIN, AO_STROBE, v);
68 #else
69         (void) v;
70 #endif
71 }
72
73 #ifdef AO_PAD_PORT_0
74 #define pins_pad(pad)   (*((AO_PAD_ ## pad ## _PORT) == AO_PAD_PORT_0 ? (&pins0) : (&pins1)))
75 #else
76 #define pins_pad(pad)   pins0
77 #define AO_PAD_PORT_0 AO_PAD_PORT
78 #endif
79
80 static void
81 ao_pad_run(void)
82 {
83         AO_PORT_TYPE    pins0;
84 #ifdef AO_PAD_PORT_1
85         AO_PORT_TYPE    pins1;
86 #endif
87
88         for (;;) {
89                 while (!ao_pad_ignite)
90                         ao_sleep(&ao_pad_ignite);
91                 /*
92                  * Actually set the pad bits
93                  */
94                 pins0 = 0;
95 #ifdef AO_PAD_PORT_1
96                 pins1 = 0;
97 #endif
98 #if AO_PAD_NUM > 0
99                 if (ao_pad_ignite & (1 << 0))
100                         pins_pad(0) |= (1 << AO_PAD_PIN_0);
101 #endif
102 #if AO_PAD_NUM > 1
103                 if (ao_pad_ignite & (1 << 1))
104                         pins_pad(1) |= (1 << AO_PAD_PIN_1);
105 #endif
106 #if AO_PAD_NUM > 2
107                 if (ao_pad_ignite & (1 << 2))
108                         pins_pad(2) |= (1 << AO_PAD_PIN_2);
109 #endif
110 #if AO_PAD_NUM > 3
111                 if (ao_pad_ignite & (1 << 3))
112                         pins_pad(3) |= (1 << AO_PAD_PIN_3);
113 #endif
114 #if AO_PAD_NUM > 4
115                 if (ao_pad_ignite & (1 << 4))
116                         pins_pad(4) |= (1 << AO_PAD_PIN_4);
117 #endif
118 #if AO_PAD_NUM > 5
119                 if (ao_pad_ignite & (1 << 5))
120                         pins_pad(5) |= (1 << AO_PAD_PIN_5);
121 #endif
122 #if AO_PAD_NUM > 6
123                 if (ao_pad_ignite & (1 << 6))
124                         pins_pad(6) |= (1 << AO_PAD_PIN_6);
125 #endif
126 #if AO_PAD_NUM > 7
127                 if (ao_pad_ignite & (1 << 7))
128                         pins_pad(7) |= (1 << AO_PAD_PIN_7);
129 #endif
130 #ifdef AO_PAD_PORT_1
131                 PRINTD("ignite pins 0x%x 0x%x\n", pins0, pins1);
132                 ao_gpio_set_bits(AO_PAD_PORT_0, pins0);
133                 ao_gpio_set_bits(AO_PAD_PORT_1, pins1);
134 #else
135                 PRINTD("ignite pins 0x%x\n", pins0);
136                 ao_gpio_set_bits(AO_PAD_PORT_0, pins0);
137 #endif
138                 while (ao_pad_ignite) {
139                         ao_pad_ignite = 0;
140
141                         ao_delay(AO_PAD_FIRE_TIME);
142                 }
143 #ifdef AO_PAD_PORT_1
144                 ao_gpio_clr_bits(AO_PAD_PORT_0, pins0);
145                 ao_gpio_clr_bits(AO_PAD_PORT_1, pins1);
146                 PRINTD("turn off pins 0x%x 0x%x\n", pins0, pins1);
147 #else
148                 ao_gpio_set_bits(AO_PAD_PORT_0, pins0);
149                 PRINTD("turn off pins 0x%x\n", pins0);
150 #endif
151         }
152 }
153
154 #define AO_PAD_ARM_SIREN_INTERVAL       200
155
156 #ifndef AO_PYRO_R_PYRO_SENSE
157 #define AO_PYRO_R_PYRO_SENSE    100
158 #define AO_PYRO_R_SENSE_GND     27
159 #define AO_FIRE_R_POWER_FET     100
160 #define AO_FIRE_R_FET_SENSE     100
161 #define AO_FIRE_R_SENSE_GND     27
162 #endif
163
164 static void
165 ao_pad_monitor(void)
166 {
167         uint8_t                 c;
168         uint8_t                 sample;
169         __pdata uint8_t         prev = 0, cur = 0;
170         __pdata uint8_t         beeping = 0;
171         __xdata volatile struct ao_data *packet;
172         __pdata uint16_t        arm_beep_time = 0;
173
174         sample = ao_data_head;
175         for (;;) {
176                 __pdata int16_t                 pyro;
177                 ao_arch_critical(
178                         while (sample == ao_data_head)
179                                 ao_sleep((void *) DATA_TO_XDATA(&ao_data_head));
180                         );
181
182
183                 packet = &ao_data_ring[sample];
184                 sample = ao_data_ring_next(sample);
185
186                 pyro = packet->adc.pyro;
187
188 #define VOLTS_TO_PYRO(x) ((int16_t) ((x) * ((1.0 * AO_PYRO_R_SENSE_GND) / \
189                                             (1.0 * (AO_PYRO_R_SENSE_GND + AO_PYRO_R_PYRO_SENSE)) / 3.3 * AO_ADC_MAX)))
190
191
192 #define VOLTS_TO_FIRE(x) ((int16_t) ((x) * ((1.0 * AO_FIRE_R_SENSE_GND) / \
193                                             (1.0 * (AO_FIRE_R_SENSE_GND + AO_FIRE_R_FET_SENSE)) / 3.3 * AO_ADC_MAX)))
194
195                 /* convert ADC value to voltage in tenths, then add .2 for the diode drop */
196                 query.battery = (packet->adc.batt + 96) / 192 + 2;
197                 cur = 0;
198                 if (pyro > VOLTS_TO_PYRO(10)) {
199                         query.arm_status = AO_PAD_ARM_STATUS_ARMED;
200                         cur |= AO_LED_ARMED;
201 #if AO_FIRE_R_POWER_FET
202                 } else if (pyro > VOLTS_TO_PYRO(5)) {
203                         if ((ao_time() % 100) < 50)
204                                 cur |= AO_LED_ARMED;
205                         query.arm_status = AO_PAD_ARM_STATUS_UNKNOWN;
206                         arm_beep_time = 0;
207 #endif
208                 } else {
209                         query.arm_status = AO_PAD_ARM_STATUS_DISARMED;
210                         arm_beep_time = 0;
211                 }
212                 if ((ao_time() - ao_pad_packet_time) > AO_SEC_TO_TICKS(2))
213                         cur |= AO_LED_RED;
214                 else if (ao_radio_cmac_rssi < AO_PAD_RSSI_MINIMUM)
215                         cur |= AO_LED_AMBER;
216                 else
217                         cur |= AO_LED_GREEN;
218
219                 for (c = 0; c < AO_PAD_NUM; c++) {
220                         int16_t         sense = packet->adc.sense[c];
221                         uint8_t status = AO_PAD_IGNITER_STATUS_UNKNOWN;
222
223                         /*
224                          *      pyro is run through a divider, so pyro = v_pyro * 27 / 127 ~= v_pyro / 20
225                          *      v_pyro = pyro * 127 / 27
226                          *
227                          *              v_pyro \
228                          *      100k            igniter
229                          *              output /
230                          *      100k           \
231                          *              sense   relay
232                          *      27k            /
233                          *              gnd ---
234                          *
235                          *              v_pyro \
236                          *      200k            igniter
237                          *              output /
238                          *      200k           \
239                          *              sense   relay
240                          *      22k            /
241                          *              gnd ---
242                          *
243                          *      If the relay is closed, then sense will be 0
244                          *      If no igniter is present, then sense will be v_pyro * 27k/227k = pyro * 127 / 227 ~= pyro/2
245                          *      If igniter is present, then sense will be v_pyro * 27k/127k ~= v_pyro / 20 = pyro
246                          */
247
248 #if AO_FIRE_R_POWER_FET
249                         if (sense <= pyro / 8) {
250                                 status = AO_PAD_IGNITER_STATUS_NO_IGNITER_RELAY_CLOSED;
251                                 if ((ao_time() % 100) < 50)
252                                         cur |= AO_LED_CONTINUITY(c);
253                         } else
254                         if (pyro / 8 * 3 <= sense && sense <= pyro / 8 * 5)
255                                 status = AO_PAD_IGNITER_STATUS_NO_IGNITER_RELAY_OPEN;
256                         else if (pyro / 8 * 7 <= sense) {
257                                 status = AO_PAD_IGNITER_STATUS_GOOD_IGNITER_RELAY_OPEN;
258                                 cur |= AO_LED_CONTINUITY(c);
259                         }
260 #else
261                         if (sense >= pyro / 8 * 5) {
262                                 status = AO_PAD_IGNITER_STATUS_GOOD_IGNITER_RELAY_OPEN;
263                                 cur |= AO_LED_CONTINUITY(c);
264                         } else {
265                                 status = AO_PAD_IGNITER_STATUS_NO_IGNITER_RELAY_OPEN;
266                         }
267 #endif
268                         query.igniter_status[c] = status;
269                 }
270                 if (cur != prev) {
271                         PRINTD("change leds from %02x to %02x\n",
272                                prev, cur);
273                         FLUSHD();
274                         ao_led_set(cur);
275                         prev = cur;
276                 }
277
278                 if (ao_pad_armed && (int16_t) (ao_time() - ao_pad_arm_time) > AO_PAD_ARM_TIME)
279                         ao_pad_armed = 0;
280
281                 if (ao_pad_armed) {
282                         ao_strobe(1);
283                         ao_siren(1);
284                         beeping = 1;
285                 } else if (query.arm_status == AO_PAD_ARM_STATUS_ARMED && !beeping) {
286                         if (arm_beep_time == 0) {
287                                 arm_beep_time = AO_PAD_ARM_SIREN_INTERVAL;
288                                 beeping = 1;
289                                 ao_siren(1);
290                         }
291                         --arm_beep_time;
292                 } else if (beeping) {
293                         beeping = 0;
294                         ao_siren(0);
295                         ao_strobe(0);
296                 }
297         }
298 }
299
300 void
301 ao_pad_disable(void)
302 {
303         if (!ao_pad_disabled) {
304                 ao_pad_disabled = 1;
305                 ao_radio_recv_abort();
306         }
307 }
308
309 void
310 ao_pad_enable(void)
311 {
312         ao_pad_disabled = 0;
313         ao_wakeup (&ao_pad_disabled);
314 }
315
316 #if HAS_74HC165
317 static uint8_t
318 ao_pad_read_box(void)
319 {
320         uint8_t         byte = ao_74hc165_read();
321         uint8_t         h, l;
322
323         h = byte >> 4;
324         l = byte & 0xf;
325         return h * 10 + l;
326 }
327 #endif
328
329 #ifdef AO_PAD_SELECTOR_PORT
330 static int ao_pad_read_box(void) {
331         AO_PORT_TYPE    value = ao_gpio_get_all(AO_PAD_SELECTOR_PORT);
332         unsigned        pin;
333         int             select = 1;
334
335         for (pin = 0; pin < sizeof (AO_PORT_TYPE) * 8; pin++) {
336                 if (AO_PAD_SELECTOR_PINS & (1 << pin)) {
337                         if ((value & (1 << pin)) == 0)
338                                 return select;
339                         select++;
340                 }
341         }
342         return ao_config.pad_box;
343 }
344 #else
345
346 #if HAS_FIXED_PAD_BOX
347 #define ao_pad_read_box()       ao_config.pad_box
348 #endif
349
350 #ifdef PAD_BOX
351 #define ao_pad_read_box()       PAD_BOX
352 #endif
353
354 #endif
355
356 static void
357 ao_pad(void)
358 {
359         int16_t time_difference;
360         int8_t  ret;
361
362         ao_pad_box = 0;
363         ao_led_set(0);
364         for (;;) {
365                 FLUSHD();
366                 while (ao_pad_disabled)
367                         ao_sleep(&ao_pad_disabled);
368                 ret = ao_radio_cmac_recv(&command, sizeof (command), 0);
369                 PRINTD ("cmac_recv %d %d\n", ret, ao_radio_cmac_rssi);
370                 if (ret != AO_RADIO_CMAC_OK)
371                         continue;
372                 ao_pad_packet_time = ao_time();
373
374                 ao_pad_box = ao_pad_read_box();
375
376                 PRINTD ("tick %d box %d (me %d) cmd %d channels %02x\n",
377                         command.tick, command.box, ao_pad_box, command.cmd, command.channels);
378
379                 switch (command.cmd) {
380                 case AO_PAD_ARM:
381                         if (command.box != ao_pad_box) {
382                                 PRINTD ("box number mismatch\n");
383                                 break;
384                         }
385
386                         if (command.channels & ~(AO_PAD_ALL_CHANNELS))
387                                 break;
388
389                         time_difference = command.tick - ao_time();
390                         PRINTD ("arm tick %d local tick %d\n", command.tick, ao_time());
391                         if (time_difference < 0)
392                                 time_difference = -time_difference;
393                         if (time_difference > 10) {
394                                 PRINTD ("time difference too large %d\n", time_difference);
395                                 break;
396                         }
397                         PRINTD ("armed\n");
398                         ao_pad_armed = command.channels;
399                         ao_pad_arm_time = ao_time();
400                         break;
401
402                 case AO_PAD_QUERY:
403                         if (command.box != ao_pad_box) {
404                                 PRINTD ("box number mismatch\n");
405                                 break;
406                         }
407
408                         query.tick = ao_time();
409                         query.box = ao_pad_box;
410                         query.channels = AO_PAD_ALL_CHANNELS;
411                         query.armed = ao_pad_armed;
412                         PRINTD ("query tick %d box %d channels %02x arm %d arm_status %d igniter %d,%d,%d,%d\n",
413                                 query.tick, query.box, query.channels, query.armed,
414                                 query.arm_status,
415                                 query.igniter_status[0],
416                                 query.igniter_status[1],
417                                 query.igniter_status[2],
418                                 query.igniter_status[3]);
419                         ao_radio_cmac_send(&query, sizeof (query));
420                         break;
421                 case AO_PAD_FIRE:
422                         if (!ao_pad_armed) {
423                                 PRINTD ("not armed\n");
424                                 break;
425                         }
426                         if ((uint16_t) (ao_time() - ao_pad_arm_time) > AO_SEC_TO_TICKS(20)) {
427                                 PRINTD ("late pad arm_time %d time %d\n",
428                                         ao_pad_arm_time, ao_time());
429                                 break;
430                         }
431                         PRINTD ("ignite\n");
432                         ao_pad_ignite = ao_pad_armed;
433                         ao_pad_arm_time = ao_time();
434                         ao_wakeup(&ao_pad_ignite);
435                         break;
436                 case AO_PAD_STATIC:
437                         if (!ao_pad_armed) {
438                                 PRINTD ("not armed\n");
439                                 break;
440                         }
441 #if HAS_LOG
442                         if (!ao_log_running) ao_log_start();
443 #endif
444                         if ((uint16_t) (ao_time() - ao_pad_arm_time) > AO_SEC_TO_TICKS(20)) {
445                                 PRINTD ("late pad arm_time %d time %d\n",
446                                         ao_pad_arm_time, ao_time());
447                                 break;
448                         }
449                         PRINTD ("ignite\n");
450                         ao_pad_ignite = ao_pad_armed;
451                         ao_pad_arm_time = ao_time();
452                         ao_wakeup(&ao_pad_ignite);
453                         break;
454                 case AO_PAD_ENDSTATIC:
455 #if HAS_LOG
456                         ao_log_stop();
457 #endif
458                         break;
459                 }
460         }
461 }
462
463 void
464 ao_pad_test(void)
465 {
466         uint8_t c;
467
468         printf ("Arm switch: ");
469         switch (query.arm_status) {
470         case AO_PAD_ARM_STATUS_ARMED:
471                 printf ("Armed\n");
472                 break;
473         case AO_PAD_ARM_STATUS_DISARMED:
474                 printf ("Disarmed\n");
475                 break;
476         case AO_PAD_ARM_STATUS_UNKNOWN:
477                 printf ("Unknown\n");
478                 break;
479         }
480
481         for (c = 0; c < AO_PAD_NUM; c++) {
482                 printf ("Pad %d: ", c);
483                 switch (query.igniter_status[c]) {
484                 case AO_PAD_IGNITER_STATUS_NO_IGNITER_RELAY_CLOSED:     printf ("No igniter. Relay closed\n"); break;
485                 case AO_PAD_IGNITER_STATUS_NO_IGNITER_RELAY_OPEN:       printf ("No igniter. Relay open\n"); break;
486                 case AO_PAD_IGNITER_STATUS_GOOD_IGNITER_RELAY_OPEN:     printf ("Good igniter. Relay open\n"); break;
487                 case AO_PAD_IGNITER_STATUS_UNKNOWN:                     printf ("Unknown\n"); break;
488                 }
489         }
490 }
491
492 void
493 ao_pad_manual(void)
494 {
495         uint8_t ignite;
496         int     repeat;
497         ao_cmd_white();
498         if (!ao_match_word("DoIt"))
499                 return;
500         ao_cmd_decimal();
501         if (ao_cmd_status != ao_cmd_success)
502                 return;
503         ignite = 1 << ao_cmd_lex_i;
504         ao_cmd_decimal();
505         if (ao_cmd_status != ao_cmd_success) {
506                 repeat = 1;
507                 ao_cmd_status = ao_cmd_success;
508         } else
509                 repeat = ao_cmd_lex_i;
510         while (repeat-- > 0) {
511                 ao_pad_ignite = ignite;
512                 ao_wakeup(&ao_pad_ignite);
513                 ao_delay(AO_PAD_FIRE_TIME>>1);
514         }
515 }
516
517 static __xdata struct ao_task ao_pad_task;
518 static __xdata struct ao_task ao_pad_ignite_task;
519 static __xdata struct ao_task ao_pad_monitor_task;
520
521 #if DEBUG
522 void
523 ao_pad_set_debug(void)
524 {
525         ao_cmd_decimal();
526         if (ao_cmd_status == ao_cmd_success)
527                 ao_pad_debug = ao_cmd_lex_i != 0;
528 }
529
530
531 static void
532 ao_pad_alarm_debug(void)
533 {
534         uint8_t which, value;
535         ao_cmd_decimal();
536         if (ao_cmd_status != ao_cmd_success)
537                 return;
538         which = ao_cmd_lex_i;
539         ao_cmd_decimal();
540         if (ao_cmd_status != ao_cmd_success)
541                 return;
542         value = ao_cmd_lex_i;
543         printf ("Set %s to %d\n", which ? "siren" : "strobe", value);
544         if (which)
545                 ao_siren(value);
546         else
547                 ao_strobe(value);
548 }
549 #endif
550
551 __code struct ao_cmds ao_pad_cmds[] = {
552         { ao_pad_test,  "t\0Test pad continuity" },
553         { ao_pad_manual,        "i <key> <n>\0Fire igniter. <key> is doit with D&I" },
554 #if DEBUG
555         { ao_pad_set_debug,     "D <0 off, 1 on>\0Debug" },
556         { ao_pad_alarm_debug,   "S <0 strobe, 1 siren> <0 off, 1 on>\0Set alarm output" },
557 #endif
558         { 0, NULL }
559 };
560
561 #ifndef AO_PAD_PORT_1
562 #define AO_PAD_0_PORT   AO_PAD_PORT
563 #define AO_PAD_1_PORT   AO_PAD_PORT
564 #define AO_PAD_2_PORT   AO_PAD_PORT
565 #define AO_PAD_3_PORT   AO_PAD_PORT
566 #define AO_PAD_4_PORT   AO_PAD_PORT
567 #define AO_PAD_5_PORT   AO_PAD_PORT
568 #define AO_PAD_6_PORT   AO_PAD_PORT
569 #define AO_PAD_7_PORT   AO_PAD_PORT
570 #endif
571
572 void
573 ao_pad_init(void)
574 {
575 #ifdef AO_PAD_SELECTOR_PORT
576         unsigned pin;
577
578         for (pin = 0; pin < sizeof (AO_PORT_TYPE) * 8; pin++) {
579                 if (AO_PAD_SELECTOR_PINS & (1 << pin))
580                         ao_enable_input(AO_PAD_SELECTOR_PORT, pin, AO_EXTI_MODE_PULL_UP);
581         }
582 #endif
583 #if AO_PAD_NUM > 0
584         ao_enable_output(AO_PAD_0_PORT, AO_PAD_PIN_0, AO_PAD_0, 0);
585 #endif
586 #if AO_PAD_NUM > 1
587         ao_enable_output(AO_PAD_1_PORT, AO_PAD_PIN_1, AO_PAD_1, 0);
588 #endif
589 #if AO_PAD_NUM > 2
590         ao_enable_output(AO_PAD_2_PORT, AO_PAD_PIN_2, AO_PAD_2, 0);
591 #endif
592 #if AO_PAD_NUM > 3
593         ao_enable_output(AO_PAD_3_PORT, AO_PAD_PIN_3, AO_PAD_3, 0);
594 #endif
595 #if AO_PAD_NUM > 4
596         ao_enable_output(AO_PAD_4_PORT, AO_PAD_PIN_4, AO_PAD_4, 0);
597 #endif
598 #if AO_PAD_NUM > 5
599         ao_enable_output(AO_PAD_5_PORT, AO_PAD_PIN_5, AO_PAD_5, 0);
600 #endif
601 #if AO_PAD_NUM > 5
602         ao_enable_output(AO_PAD_6_PORT, AO_PAD_PIN_6, AO_PAD_6, 0);
603 #endif
604 #if AO_PAD_NUM > 7
605         ao_enable_output(AO_PAD_7_PORT, AO_PAD_PIN_7, AO_PAD_7, 0);
606 #endif
607 #ifdef AO_STROBE
608         ao_enable_output(AO_STROBE_PORT, AO_STROBE_PIN, AO_STROBE, 0);
609 #endif
610 #ifdef AO_SIREN
611         ao_enable_output(AO_SIREN_PORT, AO_SIREN_PIN, AO_SIREN, 0);
612 #endif
613         ao_cmd_register(&ao_pad_cmds[0]);
614         ao_add_task(&ao_pad_task, ao_pad, "pad listener");
615         ao_add_task(&ao_pad_ignite_task, ao_pad_run, "pad igniter");
616         ao_add_task(&ao_pad_monitor_task, ao_pad_monitor, "pad monitor");
617 }