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::TemperatureWriter< T_LED_MODULE > Class Template Reference

The TemperatureWriter supports writing integer temperature values in Celcius or Farenheit. More...

#include <TemperatureWriter.h>

Public Member Functions

 TemperatureWriter (NumberWriter< T_LED_MODULE > &numberWriter)
 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.
 
uint8_t writeTemp (int16_t temp, int8_t boxSize=0)
 Write signed integer temperature without deg or unit within the boxSize.
 
uint8_t writeTempDeg (int16_t temp, int8_t boxSize=0)
 Write integer temperature with degree symbol. More...
 
uint8_t writeTempDegC (int16_t temp, int8_t boxSize=0)
 Write integer temperature with degree symbol and 'C' symbol.
 
uint8_t writeTempDegF (int16_t temp, int8_t boxSize=0)
 Write integer temperature with degree symbol and 'F' symbol.
 
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::TemperatureWriter< T_LED_MODULE >

The TemperatureWriter supports writing integer temperature values in Celcius or Farenheit.

Negative values are supported.

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 42 of file TemperatureWriter.h.

Constructor & Destructor Documentation

◆ TemperatureWriter()

template<typename T_LED_MODULE >
ace_segment::TemperatureWriter< T_LED_MODULE >::TemperatureWriter ( NumberWriter< T_LED_MODULE > &  numberWriter)
inlineexplicit

Constructor.

Parameters
numberWriterinstance of NumberWriter<T_LED_MODULE>

Definition at line 49 of file TemperatureWriter.h.

Member Function Documentation

◆ writeTempDeg()

template<typename T_LED_MODULE >
uint8_t ace_segment::TemperatureWriter< T_LED_MODULE >::writeTempDeg ( int16_t  temp,
int8_t  boxSize = 0 
)
inline

Write integer temperature with degree symbol.

The caller is responsible for verifying that the temp value fits inside the boxSize. For example, if boxSize is 2, then the range of temp value is [-9, 99]. If the boxSize is too small, the digits will bleed to the right of the box.

Returns
number of digits written, including any '-' or space characters

Definition at line 84 of file TemperatureWriter.h.


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