From b6305005fc93abda6f37d5116f749873cef977fd Mon Sep 17 00:00:00 2001 From: Oliver Toth Date: Sun, 24 Nov 2019 17:49:17 +0100 Subject: [PATCH] Increase init messages delay --- src/MPDevice.cpp | 2 +- src/MPDevice.h | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/MPDevice.cpp b/src/MPDevice.cpp index 770bcdb7..877517e4 100644 --- a/src/MPDevice.cpp +++ b/src/MPDevice.cpp @@ -149,7 +149,7 @@ void MPDevice::sendInitMessages() * so TimerJob has no effect, hence sending * it with a lower timeout. */ - QTimer::singleShot(INIT_STARTING_DELAY/2, [this]() + QTimer::singleShot(RESET_SEND_DELAY, [this]() { if (AppDaemon::isDebugDev()) qDebug() << "Resetting flip bit for BLE"; diff --git a/src/MPDevice.h b/src/MPDevice.h index bfd7f6de..5df84a33 100644 --- a/src/MPDevice.h +++ b/src/MPDevice.h @@ -434,8 +434,9 @@ private slots: EXPORT_IS_BLE_INDEX = 14, EXPORT_BLE_USER_CATEGORIES_INDEX = 15 }; - static constexpr int STATUS_STARTING_DELAY = 500; - static constexpr int INIT_STARTING_DELAY = 300; + static constexpr int RESET_SEND_DELAY = 1000; + static constexpr int INIT_STARTING_DELAY = RESET_SEND_DELAY + 150; + static constexpr int STATUS_STARTING_DELAY = RESET_SEND_DELAY + 500; }; #endif // MPDEVICE_H