Remove connection attempts field from Config

This commit is contained in:
2025-12-16 16:14:32 +01:00
parent 8dffe8747f
commit e72df056a3
3 changed files with 2 additions and 5 deletions

View File

@@ -7,6 +7,5 @@
"mqtt_port": 1883,
"mqtt_topic": "",
"device_id": "",
"sleep_time": 30,
"connection_attempts": 60
"sleep_time": 30
}

View File

@@ -12,8 +12,7 @@ typedef struct {
const char *topic;
const char *device_id;
int mqtt_port;
long sleep_time;
int connection_attempts;
unsigned long sleep_time;
} Config;
void initialize_config(Config *config, JsonDocument json);

View File

@@ -11,7 +11,6 @@ void initialize_config(Config *config, JsonDocument json) {
config->device_id = strdup(json["device_id"]);
config->mqtt_port = json["mqtt_port"];
config->sleep_time = minutes_to_milliseconds(json["sleep_time"]);
config->connection_attempts = json["connection_attempts"];
}
bool load_config_file(const char *file_path, Config *config) {