used ChatGPT to add comments and proper Headers to all SourceFiles
This commit is contained in:
@@ -1,3 +1,16 @@
|
||||
/**
|
||||
* @file globals.h
|
||||
*
|
||||
* @brief Header file for global variables and enums in the ChainLube application.
|
||||
*
|
||||
* This file contains declarations for global variables and enums used in the ChainLube application.
|
||||
* It includes enums for system status and EEPROM-related requests, as well as a struct for global variables.
|
||||
* The file also defines a struct for constants and initializes it with firmware and required flash version information.
|
||||
*
|
||||
* @author Marcel Peterkau
|
||||
* @date 09.01.2024
|
||||
*/
|
||||
|
||||
#ifndef _GLOBALS_H_
|
||||
#define _GLOBALS_H_
|
||||
|
||||
@@ -29,29 +42,29 @@ typedef enum eEERequest
|
||||
|
||||
typedef struct Globals_s
|
||||
{
|
||||
tSystem_Status systemStatus = sysStat_Startup;
|
||||
tSystem_Status resumeStatus = sysStat_Startup;
|
||||
char systemStatustxt[16] = "";
|
||||
uint16_t purgePulses = 0;
|
||||
eEERequest requestEEAction = EE_IDLE;
|
||||
char DeviceName[33];
|
||||
char FlashVersion[10];
|
||||
uint16_t eePersistanceAdress;
|
||||
uint8_t TankPercentage;
|
||||
bool hasDTC;
|
||||
bool measurementActive;
|
||||
uint32_t measuredPulses;
|
||||
tSystem_Status systemStatus = sysStat_Startup; /**< Current system status */
|
||||
tSystem_Status resumeStatus = sysStat_Startup; /**< Status to resume after rain mode */
|
||||
char systemStatustxt[16] = ""; /**< Text representation of system status */
|
||||
uint16_t purgePulses = 0; /**< Number of purge pulses */
|
||||
eEERequest requestEEAction = EE_IDLE;; /**< EEPROM-related request */
|
||||
char DeviceName[33]; /**< Device name */
|
||||
char FlashVersion[10]; /**< Flash version */
|
||||
uint16_t eePersistanceAdress; /**< EEPROM persistence address */
|
||||
uint8_t TankPercentage; /**< Tank percentage */
|
||||
bool hasDTC; /**< Flag indicating the presence of Diagnostic Trouble Codes (DTC) */
|
||||
bool measurementActive; /**< Flag indicating active measurement */
|
||||
uint32_t measuredPulses; /**< Number of measured pulses */
|
||||
} Globals_t;
|
||||
|
||||
extern Globals_t globals;
|
||||
extern Globals_t globals; /**< Global variable struct */
|
||||
|
||||
typedef struct Constants_s
|
||||
{
|
||||
uint8_t FW_Version_major;
|
||||
uint8_t FW_Version_minor;
|
||||
uint8_t Required_Flash_Version_major;
|
||||
uint8_t Required_Flash_Version_minor;
|
||||
char GitHash[11];
|
||||
uint8_t FW_Version_major; /**< Firmware version major number */
|
||||
uint8_t FW_Version_minor; /**< Firmware version minor number */
|
||||
uint8_t Required_Flash_Version_major; /**< Required flash version major number */
|
||||
uint8_t Required_Flash_Version_minor; /**< Required flash version minor number */
|
||||
char GitHash[11]; /**< Git hash string */
|
||||
} Constants_t;
|
||||
|
||||
const Constants_t constants PROGMEM = {
|
||||
@@ -60,6 +73,9 @@ const Constants_t constants PROGMEM = {
|
||||
GIT_REV // Git-Hash-String
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Initializes global variables.
|
||||
*/
|
||||
void initGlobals();
|
||||
|
||||
#endif
|
||||
#endif // _GLOBALS_H_
|
||||
|
Reference in New Issue
Block a user