From 0ac282c2d07d0748883e7adaa8b92a3e78db2f6b Mon Sep 17 00:00:00 2001 From: sunwen Date: Thu, 10 Oct 2024 15:45:46 +0800 Subject: [PATCH] feat: Delay the set heartbeat and get dms version after dms init finished. --- src/device/DeviceManager.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/device/DeviceManager.cpp b/src/device/DeviceManager.cpp index 2048b46..2d9b4ae 100644 --- a/src/device/DeviceManager.cpp +++ b/src/device/DeviceManager.cpp @@ -211,11 +211,7 @@ void DeviceManager::initDevice() mSetSimulatorModeAction->setSendData("{ \"code\":0, \"info\":\"1\"}"); mSetSimulatorModeAction->execute(); } - - mSetHeartBeatAction->setSendData("{ \"code\":0, \"info\":\"0\"}"); - mSetHeartBeatAction->execute(); mSoftwareVersion = "DMS Version Loading"; - mGetSoftwareVersionAction->execute(); mCheckInitStatusTimer = startTimer(500); } @@ -229,6 +225,10 @@ void DeviceManager::initGUI(bool aIsInitSucceed) return; } + mSetHeartBeatAction->setSendData("{ \"code\":0, \"info\":\"0\"}"); + mSetHeartBeatAction->execute(); + mGetSoftwareVersionAction->execute(); + if(aIsInitSucceed) { if(getDeviceStatus() != DeviceStatus::Rready)