Generalize the use of JSON_MSG_BUFFER (#1114)
* Generalize the use of JSON_MSG_BUFFER instead of calculated buffer
This commit is contained in:
1 parent
afd7a96537
commit
66ce0d5a41
6 files changed
+10
-28
No files matched your search
@@ -41,8 +41,7 @@ void setupHCSR501() {
|
||||
|
||||
void MeasureHCSR501() {
|
||||
if (millis() > TimeBeforeStartHCSR501) { //let time to init the PIR sensor
|
||||
const int JSON_MSG_CALC_BUFFER = JSON_OBJECT_SIZE(1);
|
||||
StaticJsonDocument<JSON_MSG_CALC_BUFFER> jsonBuffer;
|
||||
StaticJsonDocument<JSON_MSG_BUFFER> jsonBuffer;
|
||||
JsonObject HCSR501data = jsonBuffer.to<JsonObject>();
|
||||
static int pirState = LOW;
|
||||
int PresenceValue = digitalRead(HCSR501_GPIO);
|
||||
|
||||
Reference in new issue
Block a user