Added max_points in .ini, increased spiff csv file character limit, and file name limit. Added more prints for how many devices you can configure based on current memory size and max_points.
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
#include <stddef.h>
|
||||
|
||||
#define DEVICE_NAME_MAX_LEN 32
|
||||
#define DEVICE_CSV_MAX_LEN 64
|
||||
#define WIFI_SSID_MAX_LEN 32
|
||||
#define WIFI_PASSWORD_MAX_LEN 64
|
||||
#define IPV4_STR_MAX_LEN 16
|
||||
@@ -29,6 +28,7 @@ typedef struct
|
||||
uint16_t port;
|
||||
uint8_t max_clients;
|
||||
uint8_t device_count;
|
||||
size_t max_points;
|
||||
} modbus_settings_t;
|
||||
|
||||
typedef struct
|
||||
@@ -36,7 +36,7 @@ typedef struct
|
||||
bool enabled;
|
||||
uint8_t unit_id;
|
||||
char name[DEVICE_NAME_MAX_LEN];
|
||||
char csv[DEVICE_CSV_MAX_LEN];
|
||||
char *csv;
|
||||
} virtual_device_settings_t;
|
||||
|
||||
typedef struct
|
||||
@@ -46,6 +46,7 @@ typedef struct
|
||||
virtual_device_settings_t devices[MAX_VIRTUAL_DEVICES];
|
||||
} device_config_t;
|
||||
|
||||
void config_store_free(device_config_t *cfg);
|
||||
void config_store_set_defaults(device_config_t *cfg);
|
||||
bool config_store_load(const char *filename, device_config_t *cfg);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user