AceSegment  0.8.2
A framework for rendering seven segment LED displays using the TM1637, MAX7219, HT16K33, or 74HC595 controller chips
Public Member Functions | List of all members
ace_segment::StringWriter< T_LED_MODULE > Class Template Reference

Class that writes out a string, collapsing '. More...

#include <StringWriter.h>

Public Member Functions

 StringWriter (CharWriter< T_LED_MODULE > &charWriter)
 Constructor.
 
T_LED_MODULE & ledModule ()
 Get the underlying LedModule.
 
PatternWriter< T_LED_MODULE > & patternWriter ()
 Get the underlying PatternWriter.
 
CharWriter< T_LED_MODULE > & charWriter ()
 Get the underlying CharWriter.
 
uint8_t writeStringAt (uint8_t pos, const char *cs, uint8_t numChar=255)
 Write c-string cs at specified position pos up to numChar characters. More...
 
uint8_t writeStringAt (uint8_t pos, const __FlashStringHelper *fs, uint8_t numChar=255)
 Write flash string fs at specified position pos up to numChar characters. More...
 
void clear ()
 Clear the entire display.
 
void clearToEnd (uint8_t pos)
 Clear the display from pos to the end.
 

Detailed Description

template<typename T_LED_MODULE>
class ace_segment::StringWriter< T_LED_MODULE >

Class that writes out a string, collapsing '.

' characters into the decimal point of the previous character. In other words, "0.1.2.3" takes up 4 digits, not 7 digits.

Template Parameters
T_LED_MODULEthe class of the underlying LED Module, often LedModule but other classes with the same generic public methods can be substituted

Definition at line 45 of file StringWriter.h.

Member Function Documentation

◆ writeStringAt() [1/2]

template<typename T_LED_MODULE >
uint8_t ace_segment::StringWriter< T_LED_MODULE >::writeStringAt ( uint8_t  pos,
const __FlashStringHelper *  fs,
uint8_t  numChar = 255 
)
inline

Write flash string fs at specified position pos up to numChar characters.

Returns
number of actual LED digits written

Definition at line 83 of file StringWriter.h.

◆ writeStringAt() [2/2]

template<typename T_LED_MODULE >
uint8_t ace_segment::StringWriter< T_LED_MODULE >::writeStringAt ( uint8_t  pos,
const char *  cs,
uint8_t  numChar = 255 
)
inline

Write c-string cs at specified position pos up to numChar characters.

Returns
number of actual LED digits written

Definition at line 69 of file StringWriter.h.


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