-
Notifications
You must be signed in to change notification settings - Fork 0
/
reset.js
39 lines (36 loc) · 850 Bytes
/
reset.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
const mqtt = require("mqtt");
let client = mqtt.connect(
"wss://team07:[email protected]:8443"
);
client.on("connect", () => {
client.publish("team07/prod/city/reset", null);
// client.publish(
// "team07/prod/user/path-to-target",
// JSON.stringify({
// vehicle_type: "car",
// path: [[1.9, 3.8], [2.0, 3.8]],
// costs: [0.0, 0.0]
// })
// );
client.publish(
"team07/prod/user/path-to-target",
JSON.stringify({
vehicle_type: "walk",
path: [[5.5, 3.8], [5.6, 3.8]],
costs: [0.0, 0.0]
})
);
client.publish(
"team07/prod/context/change/weather",
JSON.stringify({
condition: "normal"
})
);
client.publish(
"team07/prod/context/change/air",
JSON.stringify({
condition: "normal"
})
);
client.end();
});