Merge branch 'master' into rsyslog-client

This commit is contained in:
Thomas Göttgens
2023-01-30 19:06:42 +01:00
335 changed files with 8406 additions and 8353 deletions

View File

@@ -6,13 +6,13 @@
#include "mesh/http/ContentHelper.h"
#include "mesh/http/WebServer.h"
#include "mesh/http/WiFiAPClient.h"
#include "mqtt/JSON.h"
#include "power.h"
#include "sleep.h"
#include <FSCommon.h>
#include <HTTPBodyParser.hpp>
#include <HTTPMultipartBodyParser.hpp>
#include <HTTPURLEncodedBodyParser.hpp>
#include "mqtt/JSON.h"
#ifdef ARCH_ESP32
#include "esp_task_wdt.h"
@@ -321,7 +321,7 @@ void handleFsBrowseStatic(HTTPRequest *req, HTTPResponse *res)
res->print(value->Stringify().c_str());
delete value;
delete value;
}
void handleFsDeleteStatic(HTTPRequest *req, HTTPResponse *res)
@@ -336,7 +336,7 @@ void handleFsDeleteStatic(HTTPRequest *req, HTTPResponse *res)
std::string pathDelete = "/" + paramValDelete;
if (FSCom.remove(pathDelete.c_str())) {
LOG_INFO("%s\n", pathDelete.c_str());
JSONObject jsonObjOuter;
JSONObject jsonObjOuter;
jsonObjOuter["status"] = new JSONValue("ok");
JSONValue *value = new JSONValue(jsonObjOuter);
res->print(value->Stringify().c_str());

View File

@@ -1,6 +1,5 @@
#pragma once
void registerHandlers(HTTPServer *insecureServer, HTTPSServer *secureServer);
// Declare some handler functions for the various URLs on the server
@@ -22,7 +21,6 @@ void handleAdmin(HTTPRequest *req, HTTPResponse *res);
void handleAdminSettings(HTTPRequest *req, HTTPResponse *res);
void handleAdminSettingsApply(HTTPRequest *req, HTTPResponse *res);
// Interface to the PhoneAPI to access the protobufs with messages
class HttpAPI : public PhoneAPI
{
@@ -34,7 +32,6 @@ class HttpAPI : public PhoneAPI
// Nothing here yet
protected:
/// Check the current underlying physical link to see if the client is currently connected
virtual bool checkIsConnected() override { return true; } // FIXME, be smarter about this
};

View File

@@ -152,7 +152,7 @@ void createSSLCert()
if (millis() / 1000 >= 3) {
screen->setSSLFrames();
}
#endif
#endif
}
runLoop = false;
} else {
@@ -165,7 +165,8 @@ void createSSLCert()
WebServerThread *webServerThread;
WebServerThread::WebServerThread() : concurrency::OSThread("WebServerThread") {
WebServerThread::WebServerThread() : concurrency::OSThread("WebServerThread")
{
if (!config.network.wifi_enabled) {
disable();
}

View File

@@ -194,7 +194,8 @@ bool initWifi()
WiFi.onEvent(WiFiEvent);
WiFi.setAutoReconnect(true);
WiFi.setSleep(false);
if (config.network.address_mode == Config_NetworkConfig_AddressMode_STATIC && config.network.ipv4_config.ip != 0) {
if (config.network.address_mode == meshtastic_Config_NetworkConfig_AddressMode_STATIC &&
config.network.ipv4_config.ip != 0) {
WiFi.config(config.network.ipv4_config.ip, config.network.ipv4_config.gateway, config.network.ipv4_config.subnet,
config.network.ipv4_config.dns,
config.network.ipv4_config.dns); // Wifi wants two DNS servers... set both to the same value

View File

@@ -1,7 +1,7 @@
#pragma once
#include "configuration.h"
#include "concurrency/Periodic.h"
#include "configuration.h"
#include <Arduino.h>
#include <functional>