- time_difference = command.tick - ao_time();
- PRINTD ("arm tick %d local tick %d\n", command.tick, ao_time());
- if (time_difference < 0)
- time_difference = -time_difference;
- if (time_difference > 10) {
- PRINTD ("time difference too large %d\n", time_difference);
+ tick_difference = command.tick - (uint16_t) ao_time();
+ PRINTD ("arm tick %d local tick %d\n", command.tick, (uint16_t) ao_time());
+ if (tick_difference < 0)
+ tick_difference = -tick_difference;
+ if (tick_difference > 10) {
+ PRINTD ("tick difference too large %d\n", tick_difference);
+ break;
+ }
+ if (query.arm_status != AO_PAD_ARM_STATUS_ARMED) {
+ PRINTD ("box not armed locally\n");