replace the use of calculate buffer by a constant buffer size for json size
This commit is contained in:
1 parent
618f8d6087
commit
2ee18320be
5 files changed
+5
-10
No files matched your search
+1
-2
@@ -52,8 +52,7 @@ void MeasureINA226(){
|
||||
if (millis() > (timeINA226 + TimeBetweenReadingINA226)) {//retriving value of temperature and humidity of the box from DHT every xUL
|
||||
timeINA226 = millis();
|
||||
trc(F("Creating INA226 buffer"));
|
||||
const int JSON_MSG_CALC_BUFFER = JSON_OBJECT_SIZE(3);
|
||||
StaticJsonBuffer<JSON_MSG_CALC_BUFFER> jsonBuffer;
|
||||
StaticJsonBuffer<JSON_MSG_BUFFER> jsonBuffer;
|
||||
JsonObject& INA226data = jsonBuffer.createObject();
|
||||
// Topic on which we will send data
|
||||
trc(F("Retrieving electrical data"));
|
||||
|
||||
Reference in new issue
Block a user