- time_difference = command.tick - ao_time();
- if (time_difference < 0)
- time_difference = -time_difference;
- if (time_difference > 10) {
- PRINTD ("time different too large %d\n", time_difference);
+ PRINTD ("ignite\n");
+ ao_pad_ignite = ao_pad_armed;
+ ao_pad_arm_time = ao_time();
+ ao_wakeup(&ao_pad_ignite);
+ break;
+ case AO_PAD_STATIC:
+ if (!ao_pad_armed) {
+ PRINTD ("not armed\n");
+ break;
+ }
+#if 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());