libwallaby  v24
The wallaby standard library
Motor Class Reference

#include <motors.hpp>

Public Member Functions

 Motor (int port)
 
void clearPositionCounter ()
 
void moveAtVelocity (short velocity)
 
void moveToPosition (short speed, int goalPos)
 
void moveRelativePosition (short speed, int deltaPos)
 
void setPidGains (short p, short i, short d, short pd, short id, short dd)
 
void pidGains (short &p, short &i, short &d, short &pd, short &id, short &dd)
 
void freeze ()
 
bool isMotorDone () const
 
void blockMotorDone () const
 
void forward ()
 
void backward ()
 
void motor (int percent)
 
void motorPower (int percent)
 
void off ()
 
int port () const
 

Constructor & Destructor Documentation

◆ Motor()

Motor::Motor ( int  port)

Member Function Documentation

◆ backward()

void Motor::backward ( )

◆ blockMotorDone()

void Motor::blockMotorDone ( ) const

◆ clearPositionCounter()

void Motor::clearPositionCounter ( )

◆ forward()

void Motor::forward ( )

◆ freeze()

void Motor::freeze ( )

◆ isMotorDone()

bool Motor::isMotorDone ( ) const

◆ motor()

void Motor::motor ( int  percent)

◆ motorPower()

void Motor::motorPower ( int  percent)

◆ moveAtVelocity()

void Motor::moveAtVelocity ( short  velocity)

◆ moveRelativePosition()

void Motor::moveRelativePosition ( short  speed,
int  deltaPos 
)

◆ moveToPosition()

void Motor::moveToPosition ( short  speed,
int  goalPos 
)

◆ off()

void Motor::off ( )

◆ pidGains()

void Motor::pidGains ( short &  p,
short &  i,
short &  d,
short &  pd,
short &  id,
short &  dd 
)

◆ port()

int Motor::port ( ) const

◆ setPidGains()

void Motor::setPidGains ( short  p,
short  i,
short  d,
short  pd,
short  id,
short  dd 
)

The documentation for this class was generated from the following file: