9 return static_cast<int16_t
>(
static_cast<uint16_t
>(
a -
b)) > 0;
45 if (key !=
kArmKey || key_inv !=
static_cast<uint32_t
>(~
kArmKey)) {
Decides whether a valid frame is allowed to ARM or UN-ARM the rocket.
void note_seq(uint16_t seq)
void tick(uint32_t now_ms)
Call periodically so an unconfirmed ARM expires.
ArmAction on_frame(const Frame &f, uint32_t now_ms)
Feed one already-validated frame (decode_frame returned Ok).
*brief create JSON pointer *sa reference_tokens const string_t const string_t & b
*brief create JSON pointer *sa reference_tokens const string_t & a
bool seq_newer(uint16_t a, uint16_t b)
constexpr uint32_t kArmConfirmWindowMs
Max time between the two ARM frames.
uint32_t get_u32(const uint8_t *p)
constexpr uint32_t kArmKey
PLACEHOLDER: lead to choose the real key before flight.
uint8_t payload[kFrameMaxPayload]