Added the Matrix handling and clock/day wordmaps
Time and day display is functional again
This commit is contained in:
@@ -0,0 +1,112 @@
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
/// \file wordmap.h
|
||||
/// \brief File description
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
//
|
||||
// vbchaos software design
|
||||
//
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
/// $Revision: $
|
||||
/// $Author: $
|
||||
/// $Date: $
|
||||
// (c) 2023 vbchaos
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
#ifndef MAIN_APPLICATION_INC_WORDMAP_H_
|
||||
#define MAIN_APPLICATION_INC_WORDMAP_H_
|
||||
|
||||
/**
|
||||
* wordmap implementation
|
||||
* \defgroup wordmap
|
||||
* \brief {group_description}
|
||||
* \addtogroup {Layer}
|
||||
*
|
||||
* Detailed description
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
// Include files
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
// CompilerIncludes
|
||||
// All include files that are provided by the compiler directly
|
||||
#include <string>
|
||||
#include <list>
|
||||
|
||||
|
||||
// ProjectIncludes
|
||||
// All include files that are provided by the project
|
||||
#include "ledmatrix.h"
|
||||
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
// Constant and macro definitions
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
// Type definitions.
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
// Function declarations
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
class wordmap
|
||||
{
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
// Public Section
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
public:
|
||||
// Class Constructor
|
||||
typedef enum
|
||||
{
|
||||
NL = 0,
|
||||
EN,
|
||||
NumberOfLanguages
|
||||
} Language_t;
|
||||
|
||||
wordmap(ledmatrix* matrix);
|
||||
virtual ~wordmap() {}
|
||||
|
||||
bool setColour(uint8_t red, uint8_t green, uint8_t blue);
|
||||
bool setWord(Language_t lang, std::string& identifier, bool value);
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
// Protected Section
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
protected:
|
||||
struct word
|
||||
{
|
||||
std::string identifier;
|
||||
std::list<struct ledmatrix::coordinate> pixels;
|
||||
};
|
||||
|
||||
ledmatrix* matrix;
|
||||
Language_t language;
|
||||
|
||||
std::list<struct word> wordlist[NumberOfLanguages];
|
||||
|
||||
virtual void createList_NL(void) = 0;
|
||||
virtual void createList_EN(void) = 0;
|
||||
|
||||
uint8_t red;
|
||||
uint8_t green;
|
||||
uint8_t blue;
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
// Private Section
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
/** @} */
|
||||
|
||||
|
||||
#endif /* MAIN_APPLICATION_INC_WORDMAP_H_ */
|
||||
Reference in New Issue
Block a user