From 533f0765950ad0deea0291e72ccaa2967c8b8cc3 Mon Sep 17 00:00:00 2001 From: Jacob Walser Date: Tue, 23 Jan 2024 17:05:20 -0500 Subject: [PATCH] ping360: remove profile timeout for AUTO_DEVICE_DATA --- src/sensor/ping360.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/sensor/ping360.cpp b/src/sensor/ping360.cpp index fb478ec06..194fe1c83 100644 --- a/src/sensor/ping360.cpp +++ b/src/sensor/ping360.cpp @@ -419,22 +419,15 @@ void Ping360::handleMessage(const ping_message& msg) } case Ping360Id::AUTO_DEVICE_DATA: { + // Stop profile message timeout, the data will be automatically sent + _timeoutProfileMessage.stop(); + // Parse message const ping360_auto_device_data autoDeviceData = *static_cast(&msg); // Get angle to request next message _angle = autoDeviceData.angle(); - // Restart timer, if the channel allows it - if (link()->isWritable()) { - // Use 200ms for network delay - const int profileRunningTimeout = _angular_speed / _angularSpeedGradPerMs + 200; - _timeoutProfileMessage.start(profileRunningTimeout); - qCDebug(PING_PROTOCOL_PING360) << QString::asprintf("restarting timeout with %d ms", profileRunningTimeout); - } else { - qCDebug(PING_PROTOCOL_PING360) << "link is not writable to restart timeout"; - } - _data.resize(autoDeviceData.data_length()); #pragma omp for for (int i = 0; i < autoDeviceData.data_length(); i++) {