AceSegmentWriter  0.5
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::ClockWriter< T_LED_MODULE > Class Template Reference

The ClockWriter writes "hh:mm" and "yyyy" to the LedModule. More...

#include <ClockWriter.h>

Public Member Functions

 ClockWriter (NumberWriter< T_LED_MODULE > &numberWriter, uint8_t colonDigit=1)
 Constructor. More...
 
T_LED_MODULE & ledModule ()
 Get the underlying LedModule.
 
PatternWriter< T_LED_MODULE > & patternWriter ()
 Get the underlying PatternWriter.
 
NumberWriter< T_LED_MODULE > & numberWriter ()
 Get the underlying NumberWriter.
 
void home ()
 Reset cursor to home.
 
void writeHourMinute24 (uint8_t hh, uint8_t mm)
 Write the hour and minute in 24-hour format (i.e. More...
 
void writeHourMinute12 (uint8_t hh, uint8_t mm)
 Write the hour and minute in 12-hour format (i.e. More...
 
void writeColon (bool state=true)
 Write the colon symbol between 'hh' and 'mm'. 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::ClockWriter< T_LED_MODULE >

The ClockWriter writes "hh:mm" and "yyyy" to the LedModule.

A few other characters are supported.

Definition at line 39 of file ClockWriter.h.

Constructor & Destructor Documentation

◆ ClockWriter()

template<typename T_LED_MODULE >
ace_segment::ClockWriter< T_LED_MODULE >::ClockWriter ( NumberWriter< T_LED_MODULE > &  numberWriter,
uint8_t  colonDigit = 1 
)
inlineexplicit

Constructor.

Parameters
numberWriterinstance of NumberWriter<T_LED_MODULE>
colonDigitThe digit which has the colon (":") character, mapped to bit 7 (i.e. 'H' segment). In many 4-digit LED clock display modules, this is digit 1 (counting from the left, 0-based, so the second digit from the left).

Definition at line 50 of file ClockWriter.h.

Member Function Documentation

◆ writeColon()

template<typename T_LED_MODULE >
void ace_segment::ClockWriter< T_LED_MODULE >::writeColon ( bool  state = true)
inline

Write the colon symbol between 'hh' and 'mm'.

Parameters
stateSet to false to turn off the colon.

Definition at line 99 of file ClockWriter.h.

◆ writeHourMinute12()

template<typename T_LED_MODULE >
void ace_segment::ClockWriter< T_LED_MODULE >::writeHourMinute12 ( uint8_t  hh,
uint8_t  mm 
)
inline

Write the hour and minute in 12-hour format (i.e.

leading space), and the colon in one-shot, assuming the LED module is a 4-digit clock module. This is a convenience function.

Definition at line 88 of file ClockWriter.h.

◆ writeHourMinute24()

template<typename T_LED_MODULE >
void ace_segment::ClockWriter< T_LED_MODULE >::writeHourMinute24 ( uint8_t  hh,
uint8_t  mm 
)
inline

Write the hour and minute in 24-hour format (i.e.

leading 0), and the colon in one-shot, assuming the LED module is a 4-digit clock module. This is a convenience function.

Definition at line 77 of file ClockWriter.h.


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