Go to the documentation of this file.
31 #ifndef MOTORMESSAGE_H
32 #define MOTORMESSAGE_H
35 #include <boost/array.hpp>
42 #define MIN_FW_RECOMMENDED 32
43 #define MIN_FW_MOT_POW_ACTIVE 32
44 #define MIN_FW_ESTOP_SUPPORT 32
45 #define MIN_FW_HW_VERSION_SET 32
46 #define MIN_FW_MAX_SPEED_AND_PWM 34
47 #define MIN_FW_ENC_6_STATE 35
48 #define MIN_FW_FIRMWARE_DATE 35
49 #define MIN_FW_DEADZONE 35
50 #define MIN_FW_PID_V_TERM 35
51 #define MIN_FW_SELFTESTS_REV1 36
52 #define MIN_FW_BATTERY_WARN 36
53 #define MIN_FW_PID_CONTROL_REV1 37
54 #define MIN_FW_WHEEL_TYPE_THIN 37
55 #define MIN_FW_SYSTEM_EVENTS 37
56 #define MIN_FW_OPTION_SWITCH 37
57 #define MIN_FW_PID_RDY_REGS 37
58 #define MIN_FW_WHEEL_DIRECTION 38
59 #define MIN_FW_WHEEL_NULL_ERROR 38
60 #define MIN_FW_PID_CONTROL_REV2 39
61 #define MIN_FW_DRIVE_TYPE 42 // Separated wheel type from drive type July 2021
62 #define MIN_FW_SUGGESTED 43 // We suggest this as the firmware to use if fw is lower revision
205 #define STEST_STATE_SHIFT 24
@ OPT_WHEEL_TYPE_STANDARD
const static int32_t MOT_POW_ACTIVE
static uint8_t generateChecksum(const std::vector< uint8_t > &data)
MotorMessage::ErrorCodes deserialize(const RawMotorMessage &serialized)
const static uint8_t delimeter
MotorMessage::MessageTypes getType() const
const static uint8_t valid_registers[]
@ PID_CTRL_USE_ONLY_P_TERM
const static uint8_t valid_types[]
@ PID_CTRL_CAP_POS_SETPOINT
void setData(int32_t data)
@ PID_CTRL_USE_VELOCITY_TERM
@ OPT_DRIVE_TYPE_STANDARD
@ PID_CTRL_P_ONLY_ON_0_VEL
@ PID_CTRL_AUTOSHIFT_TO_SQUARED
RawMotorMessage serialize() const
static int verifyRegister(uint8_t r)
#define STEST_STATE_SHIFT
static int verifyType(uint8_t t)
const static uint8_t protocol_version
MotorMessage::Registers getRegister() const
boost::array< uint8_t, 4 > data
@ PID_CTRL_AUTOSHIFT_TO_BOOST_P
boost::array< uint8_t, 8 > RawMotorMessage
void setRegister(MotorMessage::Registers reg)
@ PID_CTRL_NO_SPECIAL_MODES
void setType(MotorMessage::MessageTypes type)