Files
wordclock/code/main/inc/wordmap.h
T
Matthias Mitscherlich 7c2b0d8d24 Updated the matrix to the real size
Fixed orientation missings
added the temperature wordmap
2023-11-25 15:24:51 +01:00

108 lines
2.9 KiB
C++

// --------------------------------------------------------------------------------------------------------------------
/// \file wordmap.h
/// \brief File description
// --------------------------------------------------------------------------------------------------------------------
//
// vbchaos software design
//
// --------------------------------------------------------------------------------------------------------------------
/// $Revision: $
/// $Author: $
/// $Date: $
// (c) 2023 vbchaos
// --------------------------------------------------------------------------------------------------------------------
#ifndef MAIN_INC_WORDMAP_H_
#define MAIN_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
// --------------------------------------------------------------------------------------------------------------------
using namespace std;
class Wordmap
{
public:
typedef enum language
{
NL = 0,
EN,
NumberOfLanguages
} Language_t;
Wordmap(LEDMatrix* matrix);
bool setColour(uint8_t red, uint8_t green, uint8_t blue);
bool setWord(Language_t lang, string identifier, bool value);
protected:
struct word
{
string identifier;
list<LEDMatrix::coordinate> pixels;
// LEDMatrix::coordinate position;
// int length;
};
LEDMatrix* matrix;
language language;
list<struct word> wordlist[NumberOfLanguages];
void createList_NL(void);
void createList_EN(void);
uint8_t red;
uint8_t green;
uint8_t blue;
};
/** @} */
#endif /* MAIN_INC_WORDMAP_H_ */