diff --git a/serial_substates.h b/serial_substates.h index ebd447e..ab0f2bf 100644 --- a/serial_substates.h +++ b/serial_substates.h @@ -18,7 +18,6 @@ enum SerialComm::States : uint8_t { AUX_CHAN_MASK, COMMANDS, F_AND_T, - UNUSED, PID_FZ_MASTER, PID_TX_MASTER, PID_TY_MASTER, @@ -35,6 +34,8 @@ enum SerialComm::States : uint8_t { END_OF_STATES, }; +static_assert(SerialComm::States::END_OF_STATES == 27, "Added/removed states not acknowledged"); + // Reads part of the state into a COBS payload, named "payload" #define READ_SUBSTATE(name) \ template <> \ @@ -71,9 +72,6 @@ READ_SUBSTATE_PAYLOAD(AUX_CHAN_MASK, state->command_AUX_mask) READ_SUBSTATE_PAYLOAD(COMMANDS, state->command_throttle, state->command_pitch, state->command_roll, state->command_yaw) READ_SUBSTATE_PAYLOAD(F_AND_T, state->Fz, state->Tx, state->Ty, state->Tz) -READ_SUBSTATE(UNUSED) { -} - READ_SUBSTATE(PID_FZ_MASTER) { WritePIDData(payload, control->thrust_pid.master()); }