callback
parent
4c17c8034b
commit
f0918088e5
|
@ -263,7 +263,7 @@ void callback(char *topic, byte *payload, unsigned int length)
|
||||||
Serial.print("Message arrived [");
|
Serial.print("Message arrived [");
|
||||||
Serial.print(topic);
|
Serial.print(topic);
|
||||||
Serial.print("] ");
|
Serial.print("] ");
|
||||||
|
|
||||||
char jsonResult[250];
|
char jsonResult[250];
|
||||||
|
|
||||||
for (int i = 0; i < length; i++)
|
for (int i = 0; i < length; i++)
|
||||||
|
@ -283,7 +283,7 @@ void callback(char *topic, byte *payload, unsigned int length)
|
||||||
// {"percent":50,"speed":20}
|
// {"percent":50,"speed":20}
|
||||||
//сделать проверку на байті
|
//сделать проверку на байті
|
||||||
|
|
||||||
SetAngle = docResult["percent"];
|
SetAngle = docResult["percent"];
|
||||||
SpeedAngle = docResult["speed"]; //0-100
|
SpeedAngle = docResult["speed"]; //0-100
|
||||||
|
|
||||||
// byte isTimer = docResult["timer"];
|
// byte isTimer = docResult["timer"];
|
||||||
|
|
Loading…
Reference in New Issue