Fang-Robotics-MCB
Fang Robotics Team Codebase
Loading...
Searching...
No Matches
trap::algorithms::Ramp< ValueUnit, TimeUnit > Class Template Reference

#include <ramp.hpp>

Public Member Functions

 Ramp (ValueUnit initialValue, double rampSpeed)
 
mockable void setTarget (ValueUnit target)
 
mockable ValueUnit getTarget () const
 
mockable void setSpeed (double speed)
 
mockable void update ()
 
mockable ValueUnit getValue () const
 
mockable bool isTargetReached () const
 

Detailed Description

template<typename ValueUnit, typename TimeUnit>
class trap::algorithms::Ramp< ValueUnit, TimeUnit >

Dimensional wrap for taproot ramp

Constructor & Destructor Documentation

◆ Ramp()

template<typename ValueUnit , typename TimeUnit >
trap::algorithms::Ramp< ValueUnit, TimeUnit >::Ramp ( ValueUnit  initialValue,
double  rampSpeed 
)
inline

Speed should be positive

Member Function Documentation

◆ getTarget()

template<typename ValueUnit , typename TimeUnit >
mockable ValueUnit trap::algorithms::Ramp< ValueUnit, TimeUnit >::getTarget ( ) const
inline

◆ getValue()

template<typename ValueUnit , typename TimeUnit >
mockable ValueUnit trap::algorithms::Ramp< ValueUnit, TimeUnit >::getValue ( ) const
inline

◆ isTargetReached()

template<typename ValueUnit , typename TimeUnit >
mockable bool trap::algorithms::Ramp< ValueUnit, TimeUnit >::isTargetReached ( ) const
inline

◆ setSpeed()

template<typename ValueUnit , typename TimeUnit >
mockable void trap::algorithms::Ramp< ValueUnit, TimeUnit >::setSpeed ( double  speed)
inline

How many units per time unit the ramp moves towards the target value

This should be positive`

This is a float to allow ramp to use primitive types

◆ setTarget()

template<typename ValueUnit , typename TimeUnit >
mockable void trap::algorithms::Ramp< ValueUnit, TimeUnit >::setTarget ( ValueUnit  target)
inline

◆ update()

template<typename ValueUnit , typename TimeUnit >
mockable void trap::algorithms::Ramp< ValueUnit, TimeUnit >::update ( )
inline

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