mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2026-02-17 12:12:11 +01:00
Allocate more memory for json files.
This commit is contained in:
parent
1edd5d9b87
commit
7d9d0b7fe9
8 changed files with 10 additions and 10 deletions
|
|
@ -3,7 +3,7 @@
|
||||||
#ifndef configsettings_h
|
#ifndef configsettings_h
|
||||||
#define configsettings_h
|
#define configsettings_h
|
||||||
|
|
||||||
#define FW_VERSION "v2.3.1"
|
#define FW_VERSION "v2.3.2"
|
||||||
enum DeviceStatus {
|
enum DeviceStatus {
|
||||||
DS_OK = 0,
|
DS_OK = 0,
|
||||||
DS_ERROR = 1,
|
DS_ERROR = 1,
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
6
Web.cpp
6
Web.cpp
|
|
@ -22,7 +22,7 @@ extern MQTTClass mqtt;
|
||||||
extern GitUpdater git;
|
extern GitUpdater git;
|
||||||
extern Network net;
|
extern Network net;
|
||||||
|
|
||||||
#define WEB_MAX_RESPONSE 32768
|
#define WEB_MAX_RESPONSE 34768
|
||||||
static char g_content[WEB_MAX_RESPONSE];
|
static char g_content[WEB_MAX_RESPONSE];
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -231,7 +231,7 @@ void Web::handleController(WebServer &server) {
|
||||||
HTTPMethod method = server.method();
|
HTTPMethod method = server.method();
|
||||||
settings.printAvailHeap();
|
settings.printAvailHeap();
|
||||||
if (method == HTTP_POST || method == HTTP_GET) {
|
if (method == HTTP_POST || method == HTTP_GET) {
|
||||||
DynamicJsonDocument doc(WEB_MAX_RESPONSE);
|
DynamicJsonDocument doc(min((uint32_t)WEB_MAX_RESPONSE, ESP.getMaxAllocHeap() - 512));
|
||||||
somfy.toJSON(doc);
|
somfy.toJSON(doc);
|
||||||
serializeJson(doc, g_content);
|
serializeJson(doc, g_content);
|
||||||
server.send(200, _encoding_json, g_content);
|
server.send(200, _encoding_json, g_content);
|
||||||
|
|
@ -713,7 +713,7 @@ void Web::handleDiscovery(WebServer &server) {
|
||||||
HTTPMethod method = apiServer.method();
|
HTTPMethod method = apiServer.method();
|
||||||
if (method == HTTP_POST || method == HTTP_GET) {
|
if (method == HTTP_POST || method == HTTP_GET) {
|
||||||
Serial.println("Discovery Requested");
|
Serial.println("Discovery Requested");
|
||||||
DynamicJsonDocument doc(WEB_MAX_RESPONSE);
|
DynamicJsonDocument doc(min((uint32_t)WEB_MAX_RESPONSE, ESP.getMaxAllocHeap() - 512));
|
||||||
JsonObject obj = doc.to<JsonObject>();
|
JsonObject obj = doc.to<JsonObject>();
|
||||||
obj["serverId"] = settings.serverId;
|
obj["serverId"] = settings.serverId;
|
||||||
obj["version"] = settings.fwVersion.name;
|
obj["version"] = settings.fwVersion.name;
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
2.3.1
|
2.3.2
|
||||||
|
|
@ -3,11 +3,11 @@
|
||||||
<head>
|
<head>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<link rel="stylesheet" href="main.css?v=2.3.1r" type="text/css" />
|
<link rel="stylesheet" href="main.css?v=2.3.2a" type="text/css" />
|
||||||
<link rel="stylesheet" href="widgets.css?v=2.3.1r" type="text/css" />
|
<link rel="stylesheet" href="widgets.css?v=2.3.2a" type="text/css" />
|
||||||
<link rel="stylesheet" href="icons.css?v=2.3.1r" type="text/css" />
|
<link rel="stylesheet" href="icons.css?v=2.3.2a" type="text/css" />
|
||||||
<link rel="icon" type="image/png" href="favicon.png" />
|
<link rel="icon" type="image/png" href="favicon.png" />
|
||||||
<script type="text/javascript" src="index.js?v=2.3.1r"></script>
|
<script type="text/javascript" src="index.js?v=2.3.2a"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="divContainer" class="container main" data-auth="false">
|
<div id="divContainer" class="container main" data-auth="false">
|
||||||
|
|
|
||||||
|
|
@ -1263,7 +1263,7 @@ var security = new Security();
|
||||||
|
|
||||||
class General {
|
class General {
|
||||||
initialized = false;
|
initialized = false;
|
||||||
appVersion = 'v2.3.1';
|
appVersion = 'v2.3.2';
|
||||||
reloadApp = false;
|
reloadApp = false;
|
||||||
init() {
|
init() {
|
||||||
if (this.initialized) return;
|
if (this.initialized) return;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue