AceSegment  0.2.0
An adjustable, configurable, and extensible framework for rendering seven segment LED displays.
Public Member Functions | List of all members
ace_segment::SegmentDriver Class Reference
Inheritance diagram for ace_segment::SegmentDriver:
Inheritance graph
[legend]
Collaboration diagram for ace_segment::SegmentDriver:
Collaboration graph
[legend]

Public Member Functions

 SegmentDriver (LedMatrix *ledMatrix, DimmingDigit *dimmingDigits, uint8_t numDigits, bool ownsLedMatrix=false)
 Constructor. More...
 
virtual void configure () override
 
virtual uint16_t getFieldsPerFrame () override
 Return number of fields per frame. More...
 
virtual bool isBrightnessSupported () override
 Returns true if the driver supports brightness. More...
 
virtual void displayCurrentField () override
 Display the current field of the frame. More...
 
- Public Member Functions inherited from ace_segment::Driver
virtual ~Driver ()
 Virtual destructor needed to clean up LedMatrix that was created on the heap by DriverBuilder. More...
 
void setPattern (uint8_t digit, SegmentPatternType pattern, uint8_t brightness=DimmingDigit::kOn)
 Set the pattern for a given digit. More...
 
void setBrightness (uint8_t digit, uint8_t brightness)
 Set the brightness of the given digit. More...
 

Additional Inherited Members

- Public Types inherited from ace_segment::Driver
typedef uint8_t SegmentPatternType
 Integer type used to store the segment bit patterns of a single digit. More...
 
typedef uint8_t DigitPatternType
 Integer type used to store the digit bit patterns of a single segment. More...
 
- Protected Member Functions inherited from ace_segment::Driver
 Driver (const Driver &)=delete
 
Driveroperator= (const Driver &)=delete
 
 Driver (LedMatrix *ledMatrix, DimmingDigit *dimmingDigits, uint8_t numDigits, bool ownsLedMatrix=false)
 Constructor. More...
 
- Protected Attributes inherited from ace_segment::Driver
LedMatrix *const mLedMatrix
 
DimmingDigit *const mDimmingDigits
 
const uint8_t mNumDigits
 
const bool mOwnsLedMatrix
 
- Static Protected Attributes inherited from ace_segment::Driver
static const uint8_t kNumSegments = 8
 Number of segments on a single digit. More...
 

Detailed Description

Definition at line 35 of file SegmentDriver.h.

Constructor & Destructor Documentation

◆ SegmentDriver()

ace_segment::SegmentDriver::SegmentDriver ( LedMatrix ledMatrix,
DimmingDigit dimmingDigits,
uint8_t  numDigits,
bool  ownsLedMatrix = false 
)
inlineexplicit

Constructor.

Definition at line 38 of file SegmentDriver.h.

Member Function Documentation

◆ displayCurrentField()

void ace_segment::SegmentDriver::displayCurrentField ( )
overridevirtual

Display the current field of the frame.

Automatically advances to the next field for the next call. A frame is one complete rendering of all the digits. A field is a slice of that frame. If the digits are multiplexed, then a field is a rendering of a single digit with all its segments. If the segments are multiplexed, then a field is a rendering of a single segment across multiple digits.

Implements ace_segment::Driver.

Definition at line 32 of file SegmentDriver.cpp.

◆ getFieldsPerFrame()

virtual uint16_t ace_segment::SegmentDriver::getFieldsPerFrame ( )
inlineoverridevirtual

Return number of fields per frame.

Implements ace_segment::Driver.

Definition at line 50 of file SegmentDriver.h.

◆ isBrightnessSupported()

virtual bool ace_segment::SegmentDriver::isBrightnessSupported ( )
inlineoverridevirtual

Returns true if the driver supports brightness.

If not, any brightness greater than 0 will be considered ON, and 0 will be OFF.

Implements ace_segment::Driver.

Definition at line 52 of file SegmentDriver.h.


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