mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-02-06 16:46:13 +00:00
Changed mqtt buffer to 384, JSON buffer to <512>
This commit is contained in:
@@ -36,7 +36,7 @@ AmsWebServer ws;
|
||||
|
||||
// WiFi client and MQTT client
|
||||
WiFiClient *client;
|
||||
MQTTClient mqtt(512);
|
||||
MQTTClient mqtt(384);
|
||||
|
||||
// Object used for debugging
|
||||
Stream* debugger = NULL;
|
||||
@@ -306,7 +306,7 @@ void readHanPort() {
|
||||
if (debugger) debugger->println(time);
|
||||
|
||||
// Define a json object to keep the data
|
||||
StaticJsonDocument<1024> json;
|
||||
StaticJsonDocument<512> json;
|
||||
|
||||
// Any generic useful info here
|
||||
json["id"] = WiFi.macAddress();
|
||||
|
||||
@@ -35,7 +35,7 @@ void AmsWebServer::loop() {
|
||||
server.handleClient();
|
||||
}
|
||||
|
||||
void AmsWebServer::setJson(StaticJsonDocument<1024> json) {
|
||||
void AmsWebServer::setJson(StaticJsonDocument<512> json) {
|
||||
if(!json.isNull()) {
|
||||
p = json["data"]["P"].as<int>();
|
||||
po = json["data"]["PO"].as<int>();
|
||||
|
||||
@@ -28,7 +28,7 @@ class AmsWebServer {
|
||||
public:
|
||||
void setup(AmsConfiguration* config, Stream* debugger, MQTTClient* mqtt);
|
||||
void loop();
|
||||
void setJson(StaticJsonDocument<1024> json);
|
||||
void setJson(StaticJsonDocument<512> json);
|
||||
|
||||
private:
|
||||
HwTools hw;
|
||||
|
||||
Reference in New Issue
Block a user