Khangai Robot Play - Naive  01
THe naive play of the Khangai Robot
Wheel Class Reference

#include <wheel.h>

Collaboration diagram for Wheel:

Public Member Functions

 Wheel ()
 
 Wheel (Wheel_Config *wheel)
 
 Wheel (Wheel &&)=default
 
 Wheel (const Wheel &)=default
 
Wheeloperator= (Wheel &&)=default
 
Wheeloperator= (const Wheel &)=default
 
 ~Wheel ()
 
void set_Config (Wheel_Config *wheel)
 
void set_Direction (enum Direction d)
 
void set_Omega (float omega)
 Function that sets the angular velocity of the wheel. More...
 
void update () const
 
float get_Omega (uint32_t dt_millis)
 
float get_MaxOmega () const
 
void start_Periphs ()
 Function that starts timer base, pwm and encoder of the wheel. More...
 
void set_PIDController (PID *pid)
 
PIDget_PIDController ()
 
void log (float omega, float new_omega)
 
void clear ()
 

Private Attributes

Wheel_Configwheel_
 
enum Direction dir_
 
float omega_
 

Constructor & Destructor Documentation

◆ Wheel() [1/4]

Wheel::Wheel ( )
inline

◆ Wheel() [2/4]

Wheel::Wheel ( Wheel_Config wheel)
inline

◆ Wheel() [3/4]

Wheel::Wheel ( Wheel &&  )
default

◆ Wheel() [4/4]

Wheel::Wheel ( const Wheel )
default

◆ ~Wheel()

Wheel::~Wheel ( )
inline

Member Function Documentation

◆ clear()

void Wheel::clear ( )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_MaxOmega()

float Wheel::get_MaxOmega ( ) const
inline
Here is the caller graph for this function:

◆ get_Omega()

float Wheel::get_Omega ( uint32_t  dt_millis)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_PIDController()

PID* Wheel::get_PIDController ( )
inline
Here is the caller graph for this function:

◆ log()

void Wheel::log ( float  omega,
float  new_omega 
)
inline

◆ operator=() [1/2]

Wheel& Wheel::operator= ( Wheel &&  )
default

◆ operator=() [2/2]

Wheel& Wheel::operator= ( const Wheel )
default

◆ set_Config()

void Wheel::set_Config ( Wheel_Config wheel)
inline

◆ set_Direction()

void Wheel::set_Direction ( enum Direction  d)
inline

◆ set_Omega()

void Wheel::set_Omega ( float  omega)

Function that sets the angular velocity of the wheel.

Parameters
omegaThe new angular of the wheel
Return values
None
Note
This function does not actually update the value of the wheel. The update() function need to be called separately for new value to be updated.
Tasks performed by this function :
1) Sets the direction of the wheel according to the sign of omega
2) Sets the omega of the wheel
Here is the caller graph for this function:

◆ set_PIDController()

void Wheel::set_PIDController ( PID pid)
inline

◆ start_Periphs()

void Wheel::start_Periphs ( )

Function that starts timer base, pwm and encoder of the wheel.

Return values
None
Tasks performed by this function :
1) Starts Timer associated with the wheel
2) Starts PWM of the wheel
3) Starts Encoder of the wheel

◆ update()

void Wheel::update ( ) const
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ dir_

enum Direction Wheel::dir_
private

◆ omega_

float Wheel::omega_
private

◆ wheel_

Wheel_Config* Wheel::wheel_
private

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