From 872490f7afe50efffd03d9b89b856cf2198429c2 Mon Sep 17 00:00:00 2001 From: Jacob Walser Date: Tue, 19 Dec 2023 09:14:00 -0500 Subject: [PATCH] sensor: ping360: allow _profileRequestLogic.type to be updated more than once this allows the logic type to be updated after a firmware update --- src/sensor/ping360.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/sensor/ping360.cpp b/src/sensor/ping360.cpp index 9baca9405..e2da138a9 100644 --- a/src/sensor/ping360.cpp +++ b/src/sensor/ping360.cpp @@ -109,15 +109,13 @@ Ping360::Ping360() _commonVariables.deviceInformation.firmware_version_patch); qCDebug(PING_PROTOCOL_PING360) << "Firmware version:" << version; - // Wait for firmware information to be available before looking for new versions - static bool once = false; - if (!once && _commonVariables.deviceInformation.initialized) { - once = true; - + if (_commonVariables.deviceInformation.initialized) { if (version > QVersionNumber(3, 3, 0)) { _profileRequestLogic.type = Ping360RequestStateStruct::Type::AutoTransmitAsync; + qCInfo(PING_PROTOCOL_PING360) << "using asynchronous automatic transmit strategy"; } else { _profileRequestLogic.type = Ping360RequestStateStruct::Type::Legacy; + qCInfo(PING_PROTOCOL_PING360) << "using synchronous transmit strategy"; } } });