#54 fixed some todos

pull/1/head
Thomas Ballmann 3 years ago
parent 59322547e0
commit 8a37073204

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

@ -100,7 +100,6 @@ void setupApp()
request->send(404);
});
// TODO response
server.on("/stats", HTTP_GET, [](AsyncWebServerRequest *request) {
AsyncResponseStream *response = request->beginResponseStream("application/json");
const size_t capacity = 5 * JSON_OBJECT_SIZE(2) + JSON_OBJECT_SIZE(3) + JSON_OBJECT_SIZE(5) + JSON_OBJECT_SIZE(7) + JSON_OBJECT_SIZE(8) + 410;
@ -142,10 +141,6 @@ void setupApp()
doc["app"]["created"] = appConfig.buildTime;
doc["app"]["rev"] = appConfig.buildRev;
//JsonArray capability = doc.createNestedArray("capability");
//capability.add("jpg");
//capability.add("wbmp");
serializeJson(doc, *response);
request->send(response);
});
@ -329,7 +324,7 @@ void setupApiDevice()
size_t cnt = 0;
for (size_t i = 0; i < n; ++i)
{
// checking for epd
// checking for paperdash device
if (MDNS.hasTxt(i, "paperdash"))
{
if (cnt)

@ -13,8 +13,6 @@ void setupSettings()
void settingsFactoryReset()
{
NVS.eraseAll();
// TODO remove also json db file
}
void loadSettingsColor()

@ -15,8 +15,7 @@ void setupWlan()
String ssid = NVS.getString("wifi.ssid");
String password = NVS.getString("wifi.password");
// TODO count failed connecting wifiFailedCount <=3
if (!ssid.isEmpty() && !password.isEmpty() && wifiFailedCount <=3) // && wifiFailedCount <=3
if (!ssid.isEmpty() && !password.isEmpty() && wifiFailedCount <=3)
{
// client mode
initClientMode(ssid.c_str(), password.c_str());
@ -52,7 +51,7 @@ void initClientMode(const char *ssid, const char *password)
Serial.print(".");
if (!tryCount--)
{
// todo, hier passt was nicht
// TODO is this correct?
wifiFailedCount++;
if (wifiFailedCount > 3) {
Serial.println(" wifi is not reachable...");
@ -88,6 +87,7 @@ void initAPMode()
{
Serial.println(" init AP (Access Point)");
//WiFi.disconnect();
WiFi.softAP("paperdash.io");
IPAddress IP = WiFi.softAPIP();

Loading…
Cancel
Save