Added the message wordmap and worked on the OTA. Basically functional, but only checks the difference in version, not the actual version number.
LED matrix got row and column write actions
This commit is contained in:
@@ -100,6 +100,8 @@ class Clock
|
||||
|
||||
int calculateHours(struct tm time);
|
||||
|
||||
std::list<struct tm> specialList;
|
||||
|
||||
};
|
||||
|
||||
/** @} */
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
/// \file messagewordmap.h
|
||||
/// \brief File description
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
//
|
||||
// vbchaos software design
|
||||
//
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
/// $Revision: $
|
||||
/// $Author: $
|
||||
/// $Date: $
|
||||
// (c) 2023 vbchaos
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
#ifndef MAIN_APPLICATION_INC_MESSAGEWORDMAP_H_
|
||||
#define MAIN_APPLICATION_INC_MESSAGEWORDMAP_H_
|
||||
|
||||
/**
|
||||
* messagewordmap implementation
|
||||
* \defgroup messagewordmap
|
||||
* \brief {group_description}
|
||||
* \addtogroup {Layer}
|
||||
*
|
||||
* Detailed description
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
// Include files
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
// CompilerIncludes
|
||||
// All include files that are provided by the compiler directly
|
||||
|
||||
|
||||
|
||||
// ProjectIncludes
|
||||
// All include files that are provided by the project
|
||||
#include "wordmap.h"
|
||||
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
// Constant and macro definitions
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
// Type definitions.
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
// Function declarations
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
class messagewordmap: public wordmap
|
||||
{
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
// Public Section
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
public:
|
||||
// Class Constructor
|
||||
messagewordmap(ledmatrix* matrix);
|
||||
~messagewordmap();
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
// Protected Section
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
protected:
|
||||
void createList_NL(void);
|
||||
void createList_EN(void);
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
// Private Section
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
/** @} */
|
||||
|
||||
|
||||
#endif /* MAIN_APPLICATION_INC_MESSAGEWORDMAP_H_ */
|
||||
@@ -64,9 +64,27 @@ class ota
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
public:
|
||||
|
||||
static const uint32_t checkInterval_ms = 10000;
|
||||
typedef enum
|
||||
{
|
||||
OTA_STATUS_IDLE = 0,
|
||||
OTA_STATUS_DOWNLOAD,
|
||||
OTA_STATUS_VERIFY,
|
||||
OTA_STATUS_WRITE,
|
||||
OTA_STATUS_UPDATE,
|
||||
OTA_STATUS_SUCCESS,
|
||||
OTA_STATUS_FAIL,
|
||||
OTA_STATUS_RESTART
|
||||
}UpdateStatus_t;
|
||||
|
||||
typedef void (*updateStatusCallback)(int);
|
||||
struct statusCallbackData
|
||||
{
|
||||
UpdateStatus_t status;
|
||||
int percentage;
|
||||
};
|
||||
|
||||
static const uint32_t checkInterval_ms = 60000;
|
||||
|
||||
typedef void (*updateStatusCallback)(struct statusCallbackData* status);
|
||||
static updateStatusCallback usCallback;
|
||||
|
||||
// Class Constructor
|
||||
|
||||
Reference in New Issue
Block a user