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_DRIVE MiP protocol command bytes used by the motion subsystem.
variable constexpr uint8_t MIP_CMD_DISTANCE_DRIVE
variable constexpr uint8_t MIP_CMD_TURN_LEFT
variable constexpr uint8_t MIP_CMD_TURN_RIGHT
variable constexpr uint8_t MIP_CMD_DRIVE_FORWARD
variable constexpr uint8_t MIP_CMD_DRIVE_BACKWARD
variable constexpr uint8_t MIP_CMD_STOP
variable constexpr uint8_t MIP_CMD_SET_POSITION
variable constexpr uint8_t MIP_CMD_GET_UP
variable constexpr uint8_t MIP_CONTINUOUS_DRIVE_DELAY
variable MiP & m_mip
variable uint32_t m_lastContinuousDriveTime
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