Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rcontent issue #42

Open
HudsonProdigy opened this issue Jun 9, 2017 · 1 comment
Open

Rcontent issue #42

HudsonProdigy opened this issue Jun 9, 2017 · 1 comment

Comments

@HudsonProdigy
Copy link

Hello,
I am having issue with library, i have spent much time trying to figure out what is going on but have had no luck. it seems that parser method may be broken as Rcontent is not being created correctly.

Example.

Server:

function UpdateEsp(){
console.log("Updating Esp!");
console.log(currentEffect);
console.log(JSON.stringify(currentEffect))
socket.emit('FXData', { "FXData" :100 });
};

ESP:
if (client.monitor())
{
if (RID == "FXData")
{
Serial.println(RID);
Serial.println(Rname);
Serial.println(Rcontent);
}
}

Debugger is displaying:

Received message = 42["FXData",{"FXData":100}]
FXData
FXData
00}]

///End

Any ideas what may be causing the issue? I have simplified code to make issue more evident , any help would be greatly appropriated.

Cheers

@HudsonProdigy
Copy link
Author

I solved issue by editing library code. Line 123 to :
Rcontent = rcvdmsg.substring(rcvdmsg.indexOf("":") + 2, rcvdmsg.lastIndexOf('}'));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant