Compare commits

..

No commits in common. "8ef469b9f129496a63f144379b9a69dfcd22ad83" and "75ed8e630882e766f853c171ade3ae304265b7c2" have entirely different histories.

5 changed files with 9 additions and 28 deletions

View File

@ -45,14 +45,9 @@ def extract_struct_fields(file_content, variable_types):
if match:
# Extrahiere die Felder aus dem Treffer
fields_match = re.findall(r'\b(\w+)\s+(\w+)(?:\[(\d+)\])?\s*;', match.group(1))
fields_match = re.findall(r'\b(\w+)\s+(\w+)\s*;', match.group(1))
if fields_match:
result[var_name] = {'type': var_type, 'fields': {}}
for field_type, field_name, array_size in fields_match:
if array_size:
result[var_name]['fields'][field_name] = {'type': field_type, 'size': int(array_size)}
else:
result[var_name]['fields'][field_name] = {'type': field_type}
result[var_name] = {'type': var_type, 'fields': {field_name: field_type for field_type, field_name in fields_match}}
return result

View File

@ -21,8 +21,6 @@
#include "dtc.h"
#include "common.h"
#define EEPROM_STRUCTURE_REVISION 3 // Increment this version when changing EEPROM structures
#if PCB_REV == 1 || PCB_REV == 2 || PCB_REV == 3
#define EEPROM_SIZE_BYTES I2C_DEVICESIZE_24LC64
#elif PCB_REV == 4
@ -75,10 +73,6 @@ typedef struct
bool LED_Mode_Flash;
uint8_t LED_Max_Brightness;
uint8_t LED_Min_Brightness;
char wifi_ap_ssid[33];
char wifi_ap_password[64];
char wifi_client_ssid[33];
char wifi_client_password[64];
uint32_t checksum;
} LubeConfig_t;
@ -90,10 +84,6 @@ const LubeConfig_t LubeConfig_defaults = {
false,
255,
5,
"ChainLube",
QUOTE(WIFI_AP_PASSWORD),
QUOTE(WIFI_SSID_CLIENT),
QUOTE(WIFI_PASSWORD_CLIENT),
0};
void InitEEPROM();

View File

@ -3,10 +3,10 @@
*
* @brief Header file for converting structs to JSON objects.
*
* @note This file is auto-generated by a script on 2024-01-25 14:30:32.
* @note This file is auto-generated by a script on 2024-01-10 18:01:52.
*
* @author Marcel Peterkau
* @date 25.01.2024
* @date 10.01.2024
*/
#ifndef _STRUCT2JSON_H_
@ -23,4 +23,4 @@ void generateJsonObject_PersistenceData(JsonObject& data);
#endif /* _STRUCT2JSON_H_ */
// CODEGENERATOR_CHECKSUM: 4bb0dc037057aafd9688aacedfaae5c97c9de79dbbd0e139d982208053f74fa8
// CODEGENERATOR_CHECKSUM: 9e8dd21170fd6ef8fbf8c4b156d9af751836a76081f811bf0e3ab2b1eb8ee48c

View File

@ -18,7 +18,7 @@ LubeConfig_t LubeConfig;
persistenceData_t PersistenceData;
// EEPROM version identifier
const uint16_t eeVersion = EEPROM_STRUCTURE_REVISION;
const uint16_t eeVersion = 2; // Increment this version when changing EEPROM structures
// Flag indicating whether EEPROM is available
boolean eeAvailable = false;

View File

@ -3,10 +3,10 @@
*
* @brief Implementation file for converting structs to JSON objects.
*
* @note This file is auto-generated by a script on 2024-01-25 14:30:32.
* @note This file is auto-generated by a script on 2024-01-10 18:01:52.
*
* @author Marcel Peterkau
* @date 25.01.2024
* @date 10.01.2024
*/
@ -32,10 +32,6 @@ void generateJsonObject_LubeConfig(JsonObject& data)
data["LED_Mode_Flash"] = LubeConfig.LED_Mode_Flash;
data["LED_Max_Brightness"] = LubeConfig.LED_Max_Brightness;
data["LED_Min_Brightness"] = LubeConfig.LED_Min_Brightness;
data["wifi_ap_ssid"] = LubeConfig.wifi_ap_ssid;
data["wifi_ap_password"] = LubeConfig.wifi_ap_password;
data["wifi_client_ssid"] = LubeConfig.wifi_client_ssid;
data["wifi_client_password"] = LubeConfig.wifi_client_password;
data["checksum"] = LubeConfig.checksum;
}
@ -51,4 +47,4 @@ void generateJsonObject_PersistenceData(JsonObject& data)
// CODEGENERATOR_CHECKSUM: 4bb0dc037057aafd9688aacedfaae5c97c9de79dbbd0e139d982208053f74fa8
// CODEGENERATOR_CHECKSUM: 9e8dd21170fd6ef8fbf8c4b156d9af751836a76081f811bf0e3ab2b1eb8ee48c