AceSegmentWriter  0.4
Write decimal numbers, hex numbers, temperature, clock digits, characters, and strings to seven segment LED modules
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.
 
void home ()
 Set the cursor to the beginning.
 
uint8_t writeString (const char *cs, uint8_t numChar=255)
 Write c-string cs at specified position pos up to numChar characters. More...
 
uint8_t writeString (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 ()
 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

◆ writeString() [1/2]

template<typename T_LED_MODULE >
uint8_t ace_segment::StringWriter< T_LED_MODULE >::writeString ( 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 82 of file StringWriter.h.

◆ writeString() [2/2]

template<typename T_LED_MODULE >
uint8_t ace_segment::StringWriter< T_LED_MODULE >::writeString ( 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 72 of file StringWriter.h.


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