4 niveaux
This commit is contained in:
24
autom.cpp
24
autom.cpp
@@ -57,7 +57,7 @@ int i0, i1, i2, i3, i4, i5, i6, i7;
|
||||
int s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11;
|
||||
int m0, m1, m2, m3;
|
||||
int v0;
|
||||
int p0;
|
||||
int p0, p1, p2, p3;
|
||||
|
||||
int a0, a1, a2, a3, a4, a5, a6, a7;
|
||||
int c0, c1, c2, c3, c4, c5, c6, c7;
|
||||
@@ -192,8 +192,28 @@ public:
|
||||
if (j.contains("v0") && j["v0"].is_number())
|
||||
v0 = j["v0"].get<int>();
|
||||
|
||||
if (j.contains("p0") && j["p0"].is_number())
|
||||
if (j.contains("p0") && j["p0"].is_number()) {
|
||||
p0 = j["p0"].get<int>();
|
||||
niveau[0] = j["p0"].get<int>();
|
||||
}
|
||||
|
||||
if (j.contains("p1") && j["p1"].is_number())
|
||||
{
|
||||
p1 = j["p1"].get<int>();
|
||||
niveau[1] = j["p1"].get<int>();
|
||||
}
|
||||
|
||||
if (j.contains("p2") && j["p2"].is_number())
|
||||
{
|
||||
p2 = j["p2"].get<int>();
|
||||
niveau[2] = j["p2"].get<int>();
|
||||
}
|
||||
|
||||
if (j.contains("p3") && j["p3"].is_number())
|
||||
{
|
||||
p3 = j["p3"].get<int>();
|
||||
niveau[3] = j["p3"].get<int>();
|
||||
}
|
||||
|
||||
process();
|
||||
mqtt_send(&client);
|
||||
|
||||
Reference in New Issue
Block a user