We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
能不能添加sayToClient函数,即向指定客户端发送文字的功能? 在设备收到服务器下发指令后,能够恢复简单结果可以提升用户体验。 尤其是在公众号或网站对话时。
The text was updated successfully, but these errors were encountered:
bool BIGIOT::sayToClient(const char *client_id, const char *content) { if (!_isLogin || !client_id || !content)return false; #if ARDUINOJSON_V6113 root.clear(); #elif ARDUINOJSON_V5132 jsonBuffer.clear(); JsonObject &root = jsonBuffer.createObject(); #endif
root["M"] = "say"; root["ID"] = client_id; root["C"] = content; String json;
#if ARDUINOJSON_V6113 serializeJson(root, json); #elif ARDUINOJSON_V5132 root.printTo(json); #endif json += "\n"; print(json); DEBUG_BIGIOTCIENT("Send:%s", json); return true; }
Sorry, something went wrong.
另外,由于packetParse()并没有解析client_id, 建议将const char *salve = (const char *)root["S"]; 改成const char *salve = (const char *)root["ID"]; 即用slave传递ui到_eventCallback
No branches or pull requests
能不能添加sayToClient函数,即向指定客户端发送文字的功能?
在设备收到服务器下发指令后,能够恢复简单结果可以提升用户体验。
尤其是在公众号或网站对话时。
The text was updated successfully, but these errors were encountered: