modm API documentation
modm::ui::Indicator< T > Class Template Reference

#include <modm/ui/animation/indicator.hpp>

Public Member Functions

 Indicator (Animation< T > &animator)
 constructs an indicator with a period of 1s
 
void setPeriod (TimeType period, uint8_t dutyCycle=50)
 
void setFadeTimes (TimeType onFade, TimeType offFade)
 
void setRange (T minValue, T maxValue)
 
void start (uint8_t repeat=0)
 start indicating for ever
 
void stop ()
 
bool isAnimating () const
 
void update ()
 Must be called at least every ms.
 

Detailed Description

template<typename T = uint8_t>
class modm::ui::Indicator< T >

This class provided smooth on and off phases, much like a blinker/indicator on cars.

|-------------- period -|
|- duty cycle -|
______________ _____
_/ \________/ ...
^ onFade ^ offFade
Author
Niklas Hauser

Member Function Documentation

template<typename T = uint8_t>
void modm::ui::Indicator< T >::setFadeTimes ( TimeType  onFade,
TimeType  offFade 
)
inline
Parameters
onFadethe time is takes to turn on in ms
offFadethe time is takes to turn off in ms
template<typename T = uint8_t>
void modm::ui::Indicator< T >::setPeriod ( TimeType  period,
uint8_t  dutyCycle = 50 
)
inline
Parameters
periodin ms
dutyCyclein percent <= 100

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