Remove connection attempts field from Config
This commit is contained in:
@@ -7,6 +7,5 @@
|
||||
"mqtt_port": 1883,
|
||||
"mqtt_topic": "",
|
||||
"device_id": "",
|
||||
"sleep_time": 30,
|
||||
"connection_attempts": 60
|
||||
"sleep_time": 30
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user