diff --git a/src/C++/Driver/src/main.cpp b/src/C++/Driver/src/main.cpp index d7d626e..3d98908 100644 --- a/src/C++/Driver/src/main.cpp +++ b/src/C++/Driver/src/main.cpp @@ -305,6 +305,6 @@ void CapnSend() { client.publishMessage("kobuki/cam", string(enc_msg, enc_msg + buf.size())); cout << "Sent image" << endl; - std::this_thread::sleep_for(std::chrono::milliseconds(1000)); // Send image every 1000ms + std::this_thread::sleep_for(std::chrono::milliseconds(300)); // Send image every 1000ms } } \ No newline at end of file diff --git a/src/Python/flask/web/app.py b/src/Python/flask/web/app.py index 841e42c..9b91158 100644 --- a/src/Python/flask/web/app.py +++ b/src/Python/flask/web/app.py @@ -14,7 +14,7 @@ def on_message(client, userdata, message): # Create an MQTT client instance mqtt_client = mqtt.Client() mqtt_client.username_pw_set("server", "serverwachtwoordofzo") -mqtt_client.connect("localhost", 1883, 60) +mqtt_client.connect("localhost", 1884, 60) mqtt_client.loop_start() mqtt_client.subscribe("kobuki/data") mqtt_client.subscribe("kobuki/cam") diff --git a/src/Python/flask/web/static/script.js b/src/Python/flask/web/static/script.js index 2121cc9..db8cd8c 100644 --- a/src/Python/flask/web/static/script.js +++ b/src/Python/flask/web/static/script.js @@ -14,7 +14,7 @@ document.addEventListener("DOMContentLoaded", function() { body: JSON.stringify({ direction: direction }) }) .then(response => response.json()) - .then(data => { + .then(data => {script console.log("Success:", data); }) .catch(error => { @@ -53,5 +53,5 @@ document.addEventListener("DOMContentLoaded", function() { setInterval(parseData, 1000); // Update the image every 5 seconds - setInterval(updateImage, 400); + setInterval(updateImage, 200); }); \ No newline at end of file