reworked build-Process

This commit is contained in:
2025-08-24 22:55:34 +02:00
parent c6d65f50bf
commit 3a6c102b45
4 changed files with 128 additions and 32 deletions

View File

@@ -18,38 +18,63 @@
#include "config.h"
#include "common.h"
#ifndef FW_VERSION_MAJOR
#define FW_VERSION_MAJOR 0
#endif
#ifndef FW_VERSION_MINOR
#define FW_VERSION_MINOR 0
#endif
#ifndef REQ_FLASH_MAJOR
#define REQ_FLASH_MAJOR 0
#endif
#ifndef REQ_FLASH_MINOR
#define REQ_FLASH_MINOR 0
#endif
#ifndef GIT_REV
#define GIT_REV "nogit"
#endif
#ifndef FW_VERSION_STR
#define FW_VERSION_STR "0.00"
#endif
#ifndef REQ_FLASH_STR
#define REQ_FLASH_STR "0.00"
#endif
typedef struct Globals_s
{
tSystem_Status systemStatus = sysStat_Startup; /**< Current system status */
tSystem_Status resumeStatus = sysStat_Startup; /**< Status to resume after rain mode */
uint16_t purgePulses = 0; /**< Number of purge pulses */
EERequest_t requestEEAction = EE_IDLE; /**< EEPROM-related request */
char DeviceName[33]; /**< Device name */
char FlashVersion[10]; /**< Flash version */
uint16_t eePersistenceAddress; /**< 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 */
tSystem_Status systemStatus = sysStat_Startup; /**< Current system status */
tSystem_Status resumeStatus = sysStat_Startup; /**< Status to resume after rain mode */
uint16_t purgePulses = 0; /**< Number of purge pulses */
EERequest_t requestEEAction = EE_IDLE; /**< EEPROM-related request */
char DeviceName[33]; /**< Device name */
char FlashVersion[10]; /**< Flash version */
uint16_t eePersistenceAddress; /**< 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 */
bool toggle_wifi;
uint16_t isr_debug;
} Globals_t;
extern Globals_t globals; /**< Global variable struct */
extern Globals_t globals; /**< Global variable struct */
typedef struct Constants_s
{
uint8_t FW_Version_major; /**< Firmware version major number */
uint8_t FW_Version_minor; /**< Firmware version minor number */
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 */
char GitHash[11]; /**< Git hash string */
} Constants_t;
const Constants_t constants PROGMEM = {
1,4, // Firmware_Version
1,4, // Required Flash Version
GIT_REV // Git-Hash-String
FW_VERSION_MAJOR, FW_VERSION_MINOR, // Firmware_Version
REQ_FLASH_MAJOR, REQ_FLASH_MINOR, // Required Flash Version
QUOTE(GIT_REV) // Git-Hash-String
};
/**