RSeries astromech firmware
CommandScreenDisplay< COMMAND_DISPLAY > Class Template Reference

#include <menus/CommandScreenDisplay.h>

+ Inheritance diagram for CommandScreenDisplay< COMMAND_DISPLAY >:
+ Collaboration diagram for CommandScreenDisplay< COMMAND_DISPLAY >:

Public Member Functions

 CommandScreenDisplay (COMMAND_DISPLAY &display, PinManager &pinManager, bool(*init)(void)=nullptr)
 
bool begin ()
 
virtual void wakeDevice () override
 
virtual void sleepDevice () override
 
void invertDisplay (bool invert)
 
void clearDisplay ()
 
void setTextSize (int siz)
 
void getTextBounds (const char *string, int16_t x, int16_t y, int16_t *x1, int16_t *y1, uint16_t *w, uint16_t *h)
 
void setRotation (uint8_t r)
 
void setTextColor (uint16_t c)
 
void setCursor (uint8_t x, uint8_t y)
 
void print (String text)
 
void println (unsigned val)
 
void println (String text)
 
void display ()
 
void drawTextCentered (String text)
 
void remoteDialEvent (long newValue, long oldValue)
 
void remoteButtonEvent (uint8_t id, bool pressed, bool repeat)
 
void remoteActive ()
 
virtual bool handleEvent () override
 
void resetDisplay ()
 
- Public Member Functions inherited from CommandScreenHandler
 CommandScreenHandler (uint32_t screenBlankDelay=15000)
 
CommandScreencurrent ()
 
ScreenID currentID ()
 
CommandScreenfindScreen (ScreenID id)
 
unsigned getNumScreens ()
 
CommandScreengetScreenAt (unsigned index)
 
void setScreenBlankDelay (uint32_t millis)
 
uint32_t getScreenSleepDuration ()
 
void switchToScreen (ScreenID id, bool popStack=true)
 
void pushScreen (ScreenID id)
 
void popScreen ()
 
void blankScreen ()
 
void restoreScreen ()
 
bool isSleeping () const
 
void process ()
 
uint32_t elapsed ()
 
bool isEnabled () const
 
void setEnabled (bool enabled)
 

Public Attributes

COMMAND_DISPLAY & fDisplay
 
AnoRotaryEncoder fDial
 
bool(* fInitProc )(void)
 
long fDialValue = 0
 
uint32_t fLastKeyEvent = 0
 
ScreenID fLastScreenID = kInvalid
 
bool fSkipButtonReleased = false
 

Additional Inherited Members

- Protected Member Functions inherited from CommandScreenHandler
virtual void clearContext ()
 
virtual void saveContext ()
 
virtual void restoreContext ()
 
virtual bool isTouching ()
 
virtual void swapDevice ()
 
virtual uint8_t currentSelection ()
 
void resetBlankingTimer ()
 
void append (CommandScreen *screen)
 
- Protected Attributes inherited from CommandScreenHandler
CommandScreenfHead = nullptr
 
CommandScreenfTail = nullptr
 
CommandScreenfCurrentScreen = nullptr
 
uint8_t fScreenState = 0
 
uint32_t fScreenStartMillis = 0
 
uint32_t fLastMillis = 0
 
CommandScreenfLastScreen = nullptr
 
uint32_t fScreenBlankDelay
 
bool fScreenTouched = false
 
bool fEnabled = false
 
uint8_t fScreenIDSP = 0
 
ScreenID fScreenIDStack [5]
 

Constructor & Destructor Documentation

◆ CommandScreenDisplay()

template<typename COMMAND_DISPLAY >
CommandScreenDisplay< COMMAND_DISPLAY >::CommandScreenDisplay ( COMMAND_DISPLAY &  display,
PinManager pinManager,
bool(*)(void)  init = nullptr 
)
inline

Member Function Documentation

◆ begin()

template<typename COMMAND_DISPLAY >
bool CommandScreenDisplay< COMMAND_DISPLAY >::begin ( )
inline

◆ clearDisplay()

template<typename COMMAND_DISPLAY >
void CommandScreenDisplay< COMMAND_DISPLAY >::clearDisplay ( )
inline

◆ display()

template<typename COMMAND_DISPLAY >
void CommandScreenDisplay< COMMAND_DISPLAY >::display ( )
inline

◆ drawTextCentered()

template<typename COMMAND_DISPLAY >
void CommandScreenDisplay< COMMAND_DISPLAY >::drawTextCentered ( String  text)
inline

◆ getTextBounds()

template<typename COMMAND_DISPLAY >
void CommandScreenDisplay< COMMAND_DISPLAY >::getTextBounds ( const char *  string,
int16_t  x,
int16_t  y,
int16_t *  x1,
int16_t *  y1,
uint16_t *  w,
uint16_t *  h 
)
inline

◆ handleEvent()

template<typename COMMAND_DISPLAY >
virtual bool CommandScreenDisplay< COMMAND_DISPLAY >::handleEvent ( )
inlineoverridevirtual

Reimplemented from CommandScreenHandler.

◆ invertDisplay()

template<typename COMMAND_DISPLAY >
void CommandScreenDisplay< COMMAND_DISPLAY >::invertDisplay ( bool  invert)
inline

◆ print()

template<typename COMMAND_DISPLAY >
void CommandScreenDisplay< COMMAND_DISPLAY >::print ( String  text)
inline

◆ println() [1/2]

template<typename COMMAND_DISPLAY >
void CommandScreenDisplay< COMMAND_DISPLAY >::println ( String  text)
inline

◆ println() [2/2]

template<typename COMMAND_DISPLAY >
void CommandScreenDisplay< COMMAND_DISPLAY >::println ( unsigned  val)
inline

◆ remoteActive()

template<typename COMMAND_DISPLAY >
void CommandScreenDisplay< COMMAND_DISPLAY >::remoteActive ( )
inline

◆ remoteButtonEvent()

template<typename COMMAND_DISPLAY >
void CommandScreenDisplay< COMMAND_DISPLAY >::remoteButtonEvent ( uint8_t  id,
bool  pressed,
bool  repeat 
)
inline

◆ remoteDialEvent()

template<typename COMMAND_DISPLAY >
void CommandScreenDisplay< COMMAND_DISPLAY >::remoteDialEvent ( long  newValue,
long  oldValue 
)
inline

◆ resetDisplay()

template<typename COMMAND_DISPLAY >
void CommandScreenDisplay< COMMAND_DISPLAY >::resetDisplay ( )
inline

◆ setCursor()

template<typename COMMAND_DISPLAY >
void CommandScreenDisplay< COMMAND_DISPLAY >::setCursor ( uint8_t  x,
uint8_t  y 
)
inline

◆ setRotation()

template<typename COMMAND_DISPLAY >
void CommandScreenDisplay< COMMAND_DISPLAY >::setRotation ( uint8_t  r)
inline

◆ setTextColor()

template<typename COMMAND_DISPLAY >
void CommandScreenDisplay< COMMAND_DISPLAY >::setTextColor ( uint16_t  c)
inline

◆ setTextSize()

template<typename COMMAND_DISPLAY >
void CommandScreenDisplay< COMMAND_DISPLAY >::setTextSize ( int  siz)
inline

◆ sleepDevice()

template<typename COMMAND_DISPLAY >
virtual void CommandScreenDisplay< COMMAND_DISPLAY >::sleepDevice ( )
inlineoverridevirtual

Reimplemented from CommandScreenHandler.

◆ wakeDevice()

template<typename COMMAND_DISPLAY >
virtual void CommandScreenDisplay< COMMAND_DISPLAY >::wakeDevice ( )
inlineoverridevirtual

Reimplemented from CommandScreenHandler.

Member Data Documentation

◆ fDial

template<typename COMMAND_DISPLAY >
AnoRotaryEncoder CommandScreenDisplay< COMMAND_DISPLAY >::fDial

◆ fDialValue

template<typename COMMAND_DISPLAY >
long CommandScreenDisplay< COMMAND_DISPLAY >::fDialValue = 0

◆ fDisplay

template<typename COMMAND_DISPLAY >
COMMAND_DISPLAY& CommandScreenDisplay< COMMAND_DISPLAY >::fDisplay

◆ fInitProc

template<typename COMMAND_DISPLAY >
bool(* CommandScreenDisplay< COMMAND_DISPLAY >::fInitProc) (void)

◆ fLastKeyEvent

template<typename COMMAND_DISPLAY >
uint32_t CommandScreenDisplay< COMMAND_DISPLAY >::fLastKeyEvent = 0

◆ fLastScreenID

template<typename COMMAND_DISPLAY >
ScreenID CommandScreenDisplay< COMMAND_DISPLAY >::fLastScreenID = kInvalid

◆ fSkipButtonReleased

template<typename COMMAND_DISPLAY >
bool CommandScreenDisplay< COMMAND_DISPLAY >::fSkipButtonReleased = false

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