Commit aab7df5d authored by Eric Duminil's avatar Eric Duminil
Browse files

Done

parent e588950d
Pipeline #5834 passed with stage
in 2 minutes and 31 seconds
......@@ -149,7 +149,6 @@ namespace web_config {
LORAWAN_APPLICATION_EUI).build();
TextTParameter<33> appKeyParam = Builder<TextTParameter<33>>("app_key").label("App key (MSB)").defaultValue(
LORAWAN_APPLICATION_KEY).build();
#endif
OptionalGroupHtmlFormatProvider optionalGroupHtmlFormatProvider;
......@@ -172,7 +171,7 @@ namespace web_config {
}
void initialize() {
iotWebConf = new IotWebConf(ampel.sensorId, &dnsServer, &http, AMPEL_PASSWORD, config_version);
iotWebConf = new IotWebConf(ampel.sensorId, &dnsServer, &http, "", config_version);
iotWebConf->setHtmlFormatProvider(&optionalGroupHtmlFormatProvider);
......@@ -182,6 +181,10 @@ namespace web_config {
iotWebConf->getThingNameParameter()->label = "Ampel name";
iotWebConf->getApPasswordParameter()->label = "Ampel password (user : 'admin')";
iotWebConf->getApPasswordParameter()->defaultValue = AMPEL_PASSWORD;
iotWebConf->getWifiSsidParameter()->defaultValue = WIFI_SSID;
iotWebConf->getWifiPasswordParameter()->defaultValue = WIFI_PASSWORD;
co2Params.addItem(&timestepParam);
co2Params.addItem(&temperatureOffsetParam);
co2Params.addItem(&altitudeParam);
......@@ -257,14 +260,10 @@ namespace web_config {
iotWebConf->skipApStartup();
//TODO: Add callbacks
//TODO: Add default values for SSID/password
//TODO: Save LoRaWAN key if possible?
iotWebConf->init();
//TODO: Authenticate only if required?
//TODO: / captive fast return?
http.on("/config", [] {
iotWebConf->handleConfig();
});
......
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