Commit 216b7e3f authored by Eric Duminil's avatar Eric Duminil
Browse files

Updated config

parent 84aa2075
Pipeline #5850 passed with stage
in 2 minutes and 24 seconds
#include "web_config.h" #include "web_config.h"
#define STRING_LEN 40 // Should be enough for ip, addresses, passwords... #define STRING_LEN 33 // Should be enough for ip, addresses, passwords...
#include "config.h" #include "config.h"
#ifndef AMPEL_PASSWORD #ifndef AMPEL_PASSWORD
...@@ -28,7 +28,7 @@ namespace web_config { ...@@ -28,7 +28,7 @@ namespace web_config {
IotWebConf *iotWebConf; IotWebConf *iotWebConf;
const char config_version[IOTWEBCONF_CONFIG_VERSION_LENGTH] = "a09"; // -- Configuration specific key. The value should be modified if config structure was changed. const char config_version[IOTWEBCONF_CONFIG_VERSION_LENGTH] = "a10"; // -- Configuration specific key. The value should be modified if config structure was changed.
using namespace iotwebconf; using namespace iotwebconf;
/** /**
...@@ -141,7 +141,7 @@ namespace web_config { ...@@ -141,7 +141,7 @@ namespace web_config {
LORAWAN_DEVICE_EUI).build(); LORAWAN_DEVICE_EUI).build();
TextTParameter<17> appEUIParam = Builder<TextTParameter<17>>("app_eui").label("App EUI (MSB)").defaultValue( TextTParameter<17> appEUIParam = Builder<TextTParameter<17>>("app_eui").label("App EUI (MSB)").defaultValue(
LORAWAN_APPLICATION_EUI).build(); LORAWAN_APPLICATION_EUI).build();
TextTParameter<33> appKeyParam = Builder<TextTParameter<33>>("app_key").label("App key (MSB)").defaultValue( PasswordTParameter<33> appKeyParam = Builder<PasswordTParameter<33>>("app_key").label("App key (MSB)").defaultValue(
LORAWAN_APPLICATION_KEY).build(); LORAWAN_APPLICATION_KEY).build();
#endif #endif
...@@ -223,6 +223,7 @@ namespace web_config { ...@@ -223,6 +223,7 @@ namespace web_config {
//TODO: Add "ap" command? //TODO: Add "ap" command?
//TODO: Add "wifi_ssid" command? //TODO: Add "wifi_ssid" command?
//TODO: Add "wifi_password" command? //TODO: Add "wifi_password" command?
//TODO: Add "save_config" command?
sensor_console::defineCommand("reset_config", []() { sensor_console::defineCommand("reset_config", []() {
Serial.println(F("Resetting config...")); Serial.println(F("Resetting config..."));
iotWebConf->getRootParameterGroup()->applyDefaultValue(); iotWebConf->getRootParameterGroup()->applyDefaultValue();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment