From b48eda9735217f813b955adc473f4ef1017cd295 Mon Sep 17 00:00:00 2001 From: Sam Hos Date: Mon, 6 Jan 2025 10:35:54 +0100 Subject: [PATCH] change image refresh time --- src/C++/Driver/src/main.cpp | 2 +- src/Python/flask/web/static/script.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/C++/Driver/src/main.cpp b/src/C++/Driver/src/main.cpp index 3d7e147..9947f31 100644 --- a/src/C++/Driver/src/main.cpp +++ b/src/C++/Driver/src/main.cpp @@ -312,6 +312,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(300)); // Send image every 1000ms + std::this_thread::sleep_for(std::chrono::milliseconds(200)); // Send image every 200ms } } \ No newline at end of file diff --git a/src/Python/flask/web/static/script.js b/src/Python/flask/web/static/script.js index c81bc7b..0445a32 100644 --- a/src/Python/flask/web/static/script.js +++ b/src/Python/flask/web/static/script.js @@ -57,5 +57,5 @@ document.addEventListener("DOMContentLoaded", function() { setInterval(parseData, 1000); // Update the image every 200 milliseconds - setInterval(updateImage, 200); + setInterval(updateImage, 100); }); \ No newline at end of file