Skip to content

MiP_Motion

github-actions[bot] edited this page Aug 10, 2026 · 9 revisions

Class MiP_Motion

Manages MiP's drive system.

Members & Functions

Type Signature Description
variable constexpr uint8_t MIP_CMD_CONTINUOUS_DRIVENone MiP protocol command bytes used by the motion subsystem.
variable constexpr uint8_t MIP_CMD_DISTANCE_DRIVENone
variable constexpr uint8_t MIP_CMD_TURN_LEFTNone
variable constexpr uint8_t MIP_CMD_TURN_RIGHTNone
variable constexpr uint8_t MIP_CMD_DRIVE_FORWARDNone
variable constexpr uint8_t MIP_CMD_DRIVE_BACKWARDNone
variable constexpr uint8_t MIP_CMD_STOPNone
variable constexpr uint8_t MIP_CMD_SET_POSITIONNone
variable constexpr uint8_t MIP_CMD_GET_UPNone
variable constexpr uint8_t MIP_CONTINUOUS_DRIVE_DELAYNone
variable MiP & m_mipNone
variable uint32_t m_lastContinuousDriveTimeNone
function MiP_Motion(MiP &mip) Constructs the drive system manager.
function void continuousDrive(int8_t velocity, int8_t turnRate) Sends continuous drive command (velocity + turn rate).
function void distanceDrive(MiPDriveDirection driveDirection, uint8_t cm, MiPTurnDirection turnDirection, uint16_t degrees) Drives a specific distance then optionally turns.
function void driveForward(uint8_t speed, uint16_t time) Drives forward for a limited time at given speed.
function void driveBackward(uint8_t speed, uint16_t time) Drives backward for a limited time at given speed.
function void turnLeft(uint16_t degrees, uint8_t speed) Turns left by the specified angle at given speed.
function void turnRight(uint16_t degrees, uint8_t speed) Turns right by the specified angle at given speed.
function void stop() Stops all motion.
function void fallForward() Commands MiP to fall forward (face down).
function void fallBackward() Commands MiP to fall backward (on its back).
function void getUp(MiPGetUp getup=MIP_GETUP_FROM_EITHER) Commands MiP to get up from a fallen position.
function void fallDown(MiPFallDirection direction)

Clone this wiki locally