Added the Matrix handling and clock/day wordmaps
Time and day display is functional again
This commit is contained in:
@@ -0,0 +1,108 @@
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
/// \file clock.h
|
||||
/// \brief File description
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
//
|
||||
// vbchaos software design
|
||||
//
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
/// $Revision: $
|
||||
/// $Author: $
|
||||
/// $Date: $
|
||||
// (c) 2023 vbchaos
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
#ifndef MAIN_APPLICATION_INC_CLOCK_H_
|
||||
#define MAIN_APPLICATION_INC_CLOCK_H_
|
||||
|
||||
/**
|
||||
* clock implementation
|
||||
* \defgroup clock
|
||||
* \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 "time.h"
|
||||
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
// Constant and macro definitions
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
// Type definitions.
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
// Function declarations
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
class Clock
|
||||
{
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
// Public Section
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
public:
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TEN_BEFORE_HALF,
|
||||
TWENTY_OVER
|
||||
}Mode_t;
|
||||
|
||||
// Class Constructor
|
||||
Clock(Mode_t mode);
|
||||
|
||||
void generateWordlist(std::list<std::string>* wordlist);
|
||||
|
||||
time_t getTime(void);
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
// Protected Section
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
protected:
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
// Private Section
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
private:
|
||||
Mode_t clockmode;
|
||||
time_t currentTime;
|
||||
|
||||
|
||||
std::string toNumbers[20] {"zero", "one", "two", "three", "four",
|
||||
"five", "six", "seven", "eight",
|
||||
"nine", "ten", "eleven", "twelve",
|
||||
"thirteen", "fourteen", "fifteen",
|
||||
"sixteen", "seventeen", "eighteen",
|
||||
"nineteen"};
|
||||
|
||||
int calculateHours(struct tm time);
|
||||
|
||||
};
|
||||
|
||||
/** @} */
|
||||
|
||||
|
||||
#endif /* MAIN_APPLICATION_INC_CLOCK_H_ */
|
||||
Reference in New Issue
Block a user