Commit 29388bab authored by Eric Duminil's avatar Eric Duminil
Browse files

Notes & stuff

parent 7a1888cf
...@@ -69,7 +69,7 @@ namespace web_server { ...@@ -69,7 +69,7 @@ namespace web_server {
#define NUMBER_LEN 32 #define NUMBER_LEN 32
// -- Configuration specific key. The value should be modified if config structure was changed. // -- Configuration specific key. The value should be modified if config structure was changed.
#define CONFIG_VERSION "dem2" const char config_version[] = "ampel_test_v1";
char stringParamValue[STRING_LEN]; char stringParamValue[STRING_LEN];
char intParamValue[NUMBER_LEN]; char intParamValue[NUMBER_LEN];
...@@ -99,7 +99,7 @@ namespace web_server { ...@@ -99,7 +99,7 @@ namespace web_server {
} }
void initialize() { void initialize() {
iotWebConf = new IotWebConf(ampel.sensorId, &dnsServer, &http, HTTP_PASSWORD, "ampel_test_v1"); iotWebConf = new IotWebConf(ampel.sensorId, &dnsServer, &http, HTTP_PASSWORD, config_version);
const int ONBOARD_LED_PIN = 2; const int ONBOARD_LED_PIN = 2;
# ifdef ESP8266 # ifdef ESP8266
...@@ -161,13 +161,19 @@ namespace web_server { ...@@ -161,13 +161,19 @@ namespace web_server {
iotWebConf->skipApStartup(); iotWebConf->skipApStartup();
//TODO: Add callbacks //TODO: Add callbacks
//TODO: Add LED effects //TODO: Add LED effects
//TODO: Allow offline config loading
//TODO: Add default values for SSID/password
//TODO: Add other params //TODO: Add other params
//TODO: Use HTTP_USER / HTTP_PASSWORD for config //TODO: Use HTTP_USER / HTTP_PASSWORD for config
//TODO: Move to own class //TODO: Move to own class
//TODO: Remove AP Password config? //TODO: Remove AP Password config?
//TODO: Save LoRaWAN key if possible? //TODO: Save LoRaWAN key if possible?
//FIXME: Why does MQTT fail? //FIXME: Why does MQTT fail? (on ESP32)
Serial.println(intParamValue);
// iotWebConf->loadConfig();
iotWebConf->init(); iotWebConf->init();
Serial.println(intParamValue);
sensor_console::defineCommand("reset_config", []() { sensor_console::defineCommand("reset_config", []() {
Serial.println(F("Resetting config...")); Serial.println(F("Resetting config..."));
......
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