moteurs
This commit is contained in:
14
autom.cpp
14
autom.cpp
@@ -229,14 +229,14 @@ void mqtt_open(mqtt::async_client *client)
|
|||||||
|
|
||||||
void mqtt_send(mqtt::async_client *client)
|
void mqtt_send(mqtt::async_client *client)
|
||||||
{
|
{
|
||||||
json obj = {
|
json obj = { };
|
||||||
{"m0", m0},
|
|
||||||
{"m1", m1},
|
|
||||||
{"m2", m2},
|
|
||||||
{"m3", m3},
|
|
||||||
};
|
|
||||||
|
|
||||||
obj["c"] = json::array();
|
obj["moteurs"] = json::array();
|
||||||
|
for (int i = 0; i < 8; ++i) {
|
||||||
|
obj["moteurs"].push_back(moteur[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
obj["actionneurs"] = json::array();
|
||||||
for (int i = 0; i < 8; ++i) {
|
for (int i = 0; i < 8; ++i) {
|
||||||
obj["actionneurs"].push_back(actionneur[i]);
|
obj["actionneurs"].push_back(actionneur[i]);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user