You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 8, 2019. It is now read-only.
exit status 1
'StaticJsonBuffer' was not declared in this scope
This is the location of the error
/********************************** START SEND STATE*****************************************/
void sendState() {
StaticJsonBuffer<BUFFER_SIZE> jsonBuffer;
On Thu, 22 Nov 2018, 03:42 jccarey5 ***@***.*** wrote:
When compiling i get an error:
exit status 1
'StaticJsonBuffer' was not declared in this scope
This is the location of the error
/********************************** START SEND
STATE*****************************************/
void sendState() {
StaticJsonBuffer<BUFFER_SIZE> jsonBuffer;
JsonObject& root = jsonBuffer.createObject();
root["state"] = (stateOn) ? on_cmd : off_cmd;
JsonObject& color = root.createNestedObject("color");
color["r"] = red;
color["g"] = green;
color["b"] = blue;
root["brightness"] = brightness;
root["effect"] = effectString.c_str();
char buffer[root.measureLength() + 1];
root.printTo(buffer, sizeof(buffer));
client.publish(light_state_topic, buffer, true);
}
Is there a fix for this?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#103>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AH0nLmSYeBEZtwUyFQEAJJT82ufJJzkxks5uxh0kgaJpZM4YunOZ>
.
When compiling i get an error:
exit status 1
'StaticJsonBuffer' was not declared in this scope
This is the location of the error
/********************************** START SEND STATE*****************************************/
void sendState() {
StaticJsonBuffer<BUFFER_SIZE> jsonBuffer;
JsonObject& root = jsonBuffer.createObject();
root["state"] = (stateOn) ? on_cmd : off_cmd;
JsonObject& color = root.createNestedObject("color");
color["r"] = red;
color["g"] = green;
color["b"] = blue;
root["brightness"] = brightness;
root["effect"] = effectString.c_str();
char buffer[root.measureLength() + 1];
root.printTo(buffer, sizeof(buffer));
client.publish(light_state_topic, buffer, true);
}
Is there a fix for this?
The text was updated successfully, but these errors were encountered: