[SYS] Optimize memory usage (#1632)

Add MQTT BLEtask stack follow up and reduce allocated stack
Other memory usage optimizations
This commit is contained in:
Florian authored and GitHub committed 2023-05-02 15:22:57 -05:00
1 parent b03e18260f
commit 9bbe909661
3 files changed
+15 -14

No files matched your search

+2 -2
View File
@@ -277,7 +277,7 @@ void ActuatorTrigger() {
PowerIndicatorOFF();
}
// Send the state of the switch to the broker so as to update the status
StaticJsonDocument<JSON_MSG_BUFFER> jsonBuffer;
StaticJsonDocument<64> jsonBuffer;
JsonObject ONOFFdata = jsonBuffer.to<JsonObject>();
ONOFFdata["cmd"] = (int)level;
# ifdef ESP32
@@ -292,7 +292,7 @@ void ActuatorTrigger() {
void stateONOFFMeasures() {
//Publish actuator state
StaticJsonDocument<JSON_MSG_BUFFER> jsonBuffer;
StaticJsonDocument<64> jsonBuffer;
JsonObject ONOFFdata = jsonBuffer.to<JsonObject>();
ONOFFdata["cmd"] = (int)digitalRead(ACTUATOR_ONOFF_GPIO);
pub(subjectGTWONOFFtoMQTT, ONOFFdata);