diff --git a/application/MissionManager/README.md b/application/MissionManager/README.md index d08c414..09371c6 100644 --- a/application/MissionManager/README.md +++ b/application/MissionManager/README.md @@ -80,4 +80,10 @@ end ## 1.4. MCU监视器 -  MCU监视器必须由其中一个状态继承,只有状态机运行之后才能处理串口命令。 \ No newline at end of file +  MCU监视器必须由其中一个状态继承,只有状态机运行之后才能处理串口命令。 + +## 1.5. 测试启动模式(TestMissionState) + +  面向用户开放的测试模式。 + +1. 此状态下,先按下format按键不放,再按下reset按键不放可以关闭喂狗功能; diff --git a/application/MissionManager/src/LedsHandle.cpp b/application/MissionManager/src/LedsHandle.cpp index af0f312..6744dc3 100644 --- a/application/MissionManager/src/LedsHandle.cpp +++ b/application/MissionManager/src/LedsHandle.cpp @@ -36,6 +36,9 @@ void LedsHandle::ControlDeviceStatusLed(const DeviceStatus &status, const long i case DeviceStatus::TAKING_PICTURE_OR_VIDEO: mDeviceStatus = SetLedState::ControlLed("device_status", LedState::GREEN, keepAliveTime, blinkPeriod); break; + case DeviceStatus::CLOSE_WATCHDOG: + mDeviceStatus = SetLedState::ControlLed("device_status", LedState::RED, keepAliveTime, blinkPeriod); + break; default: LogWarning("unknow device status.\n"); diff --git a/application/MissionManager/src/LedsHandle.h b/application/MissionManager/src/LedsHandle.h index d38ff75..1782067 100644 --- a/application/MissionManager/src/LedsHandle.h +++ b/application/MissionManager/src/LedsHandle.h @@ -23,6 +23,7 @@ enum class DeviceStatus SD_CARD_REMOVE, SD_CARD_INSERT, SD_CARD_ABNORMAL, + CLOSE_WATCHDOG, END }; /** diff --git a/application/MissionManager/src/MediaHandleState.cpp b/application/MissionManager/src/MediaHandleState.cpp index 4c5767f..b0f4400 100644 --- a/application/MissionManager/src/MediaHandleState.cpp +++ b/application/MissionManager/src/MediaHandleState.cpp @@ -19,6 +19,8 @@ #include "IMediaManager.h" #include "IMissionManager.h" #include "IStateMachine.h" +#include "LedsHandle.h" +#include "LedControl.h" #include "MediaTask.h" #include "MediaTaskHandle.h" #include "MissionStateMachine.h" diff --git a/application/MissionManager/src/TestMissionState.cpp b/application/MissionManager/src/TestMissionState.cpp index 45f3738..8c92803 100644 --- a/application/MissionManager/src/TestMissionState.cpp +++ b/application/MissionManager/src/TestMissionState.cpp @@ -16,27 +16,35 @@ #include "DataProcessing.h" #include "IAppManager.h" #include "ILog.h" +#include "IMcuManager.h" #include "IMissionManager.h" #include "IStateMachine.h" #include "IStorageManager.h" +#include "LedControl.h" #include "LedsHandle.h" +#include "McuAskBase.h" #include "MissionState.h" #include "MissionStateMachine.h" #include #include -TestMissionState::TestMissionState() : MissionState("TestMissionState"), mFormattingSDCard(false) +TestMissionState::TestMissionState() + : MissionState("TestMissionState"), mFormattingSDCard(SD_CARD_IS_NOT_FORMATTING), mResetKeyHoldTime(0), + mFormatKeyHoldTime(0) { mEventHandle[InternalStateEvent::ANY_STATE_SD_STATUS_PERORIED] = std::bind(&TestMissionState::SdCardEventReportSendToApp, this, _1); mEventHandle[InternalStateEvent::RESET_KEY_MEDIA_TASK] = std::bind(&TestMissionState::ResetKeyMediaTaskHandle, this, _1); mKeyClickHandle["reset"] = std::bind(&TestMissionState::ClickResetKey, this, _1); + mKeyHoldDownHandle["reset"] = std::bind(&TestMissionState::HoldDownResetKey, this, _1); mKeyHoldDownHandle["format"] = std::bind(&TestMissionState::HoldDownFormatKey, this, _1); mKeyHoldUpHandle["format"] = std::bind(&TestMissionState::HoldUpFormatKey, this, _1); } void TestMissionState::GoInState() { - mFormattingSDCard = false; + mFormattingSDCard = SD_CARD_IS_NOT_FORMATTING; + mFormatKeyHoldTime = 0; + mResetKeyHoldTime = 0; MissionState::GoInState(); LogInfo(" ========== TestMissionState::GoInState.\n"); AppParam mAppParam(APP_MANAGER_DEVICE_IP, APP_MANAGER_HTTP_SERVER_PORT, APP_MANAGER_TCP_SERVER_PORT); // TODO: @@ -71,32 +79,73 @@ bool TestMissionState::ResetKeyMediaTaskHandle(VStateMachineData *msg) bool TestMissionState::ClickResetKey(const KeyEventData &data) { LogInfo("reset key click:make a media task.\n"); - // std::shared_ptr message = std::make_shared>( - // static_cast(InternalStateEvent::MEDIA_REPORT_EVENT), event); - // MissionStateMachine::GetInstance()->SendStateMessage(message); std::shared_ptr message = std::make_shared(static_cast(InternalStateEvent::RESET_KEY_MEDIA_TASK)); MissionStateMachine::GetInstance()->SendStateMessage(message); return EXECUTED; } +bool TestMissionState::HoldDownResetKey(const KeyEventData &data) +{ + constexpr int CLOSE_WATCH_DOG_PRESSING_TIME_MS = 1000 * 3; + if (mFormatKeyHoldTime > data.mHoldTime && data.mHoldTime >= CLOSE_WATCH_DOG_PRESSING_TIME_MS) { + LogInfo("Close watch dog.\n"); + constexpr int KEEP_BLINKING_FAST_MS = 1000 * 3; + LedsHandle::ControlDeviceStatusLed(DeviceStatus::CLOSE_WATCHDOG, KEEP_BLINKING_FAST_MS, BLINKING_FAST_MS); + CloseWatchDog(); + } + mFormattingSDCard = DO_NOT_FORMAT_SDCARD_ANYMORE; + // mResetKeyHoldTime = data.mHoldTime; + return EXECUTED; +} +bool TestMissionState::HoldUpResetKey(const KeyEventData &data) +{ + mFormattingSDCard = SD_CARD_IS_NOT_FORMATTING; + return EXECUTED; +} bool TestMissionState::HoldDownFormatKey(const KeyEventData &data) { constexpr int FORMAT_SD_CARD_PRESSING_TIME_MS = 1000 * 15; - if (FORMAT_SD_CARD_PRESSING_TIME_MS <= data.mHoldTime && false == mFormattingSDCard) { + if (FORMAT_SD_CARD_PRESSING_TIME_MS <= data.mHoldTime && SD_CARD_IS_NOT_FORMATTING == mFormattingSDCard) { LogInfo("format key down.\n"); - mFormattingSDCard = true; + mFormattingSDCard = DO_NOT_FORMAT_SDCARD_ANYMORE; std::shared_ptr message = std::make_shared(static_cast(InternalStateEvent::FORMAT_KEY_FORMAT_SD_CARD)); MissionStateMachine::GetInstance()->SendStateMessage(message); return EXECUTED; } + mFormatKeyHoldTime = data.mHoldTime; return NOT_EXECUTED; } bool TestMissionState::HoldUpFormatKey(const KeyEventData &data) { // mFormattingSDCard = false; + mFormatKeyHoldTime = 0; return EXECUTED; } +void inline TestMissionState::CloseWatchDog(void) +{ + class McuAskCloseWatchDog : public McuAsk, public McuAskBase + { + public: + McuAskCloseWatchDog() : McuAskBase(McuAskBlock::NOT_BLOCK, McuAskReply::NEED_REPLY) + { + } // using McuAskBlock::NOT_BLOCK + virtual ~McuAskCloseWatchDog() = default; + void ReplyFinished(const bool result) override + { + McuAskBase::ReplyFinished(result); + if (result) { + LogInfo("Ask data succeed, mDataReply = %d.\n", static_cast(mDataReply)); + // Do something here. + } + else { + LogError("Ask data falied.\n"); + } + } + }; + std::shared_ptr ask = std::make_shared(); + IMcuManager::GetInstance()->SetFeedingCycleForWatchDog(ask, CLOSE_WATCH_DOG); +} SdCardStatus TestMissionState::SdCardStatusConvert(const StorageEvent &event) { switch (event) { diff --git a/application/MissionManager/src/TestMissionState.h b/application/MissionManager/src/TestMissionState.h index 6da17fa..9fb60c2 100644 --- a/application/MissionManager/src/TestMissionState.h +++ b/application/MissionManager/src/TestMissionState.h @@ -18,6 +18,8 @@ #include "IStateMachine.h" #include "IStorageManager.h" #include "MissionState.h" +constexpr bool DO_NOT_FORMAT_SDCARD_ANYMORE = true; +constexpr bool SD_CARD_IS_NOT_FORMATTING = false; class TestMissionState : public MissionState, public AppMonitor { public: @@ -30,13 +32,20 @@ private: bool SdCardEventReportSendToApp(VStateMachineData *msg); bool ResetKeyMediaTaskHandle(VStateMachineData *msg); bool ClickResetKey(const KeyEventData &data); + bool HoldDownResetKey(const KeyEventData &data); + bool HoldUpResetKey(const KeyEventData &data); bool HoldDownFormatKey(const KeyEventData &data); bool HoldUpFormatKey(const KeyEventData &data); +private: + void CloseWatchDog(void); + private: SdCardStatus SdCardStatusConvert(const StorageEvent &event); private: bool mFormattingSDCard; + unsigned int mResetKeyHoldTime; + unsigned int mFormatKeyHoldTime; }; #endif \ No newline at end of file diff --git a/middleware/McuManager/include/IMcuManager.h b/middleware/McuManager/include/IMcuManager.h index 6fc4ae4..5659902 100644 --- a/middleware/McuManager/include/IMcuManager.h +++ b/middleware/McuManager/include/IMcuManager.h @@ -16,6 +16,7 @@ #define I_MCU_MANAGER_H #include "StatusCode.h" #include +constexpr unsigned short CLOSE_WATCH_DOG = 0; bool CreateMcuManager(void); bool DestroyMcuManager(void); enum class IpcMission @@ -153,6 +154,15 @@ public: virtual const StatusCode FeedWatchDog(std::shared_ptr &ask); virtual const StatusCode SetFeedingCycleForWatchDog(std::shared_ptr &ask, const unsigned char &hour, const unsigned char &min, const unsigned char &second); + /** + * @brief Set the dog feeding cycle. When the dog feeding cycle is set to 0, it means that the dog feeding is turned + * off. + * @param ask + * @param feedCycle_s The dog feeding cycle is in seconds. Using CLOSE_WATCH_DOG(0) means close watch dog. + * @return const StatusCode + */ + virtual const StatusCode SetFeedingCycleForWatchDog(std::shared_ptr &ask, + const unsigned short &feedCycle_s); virtual const StatusCode SetDateTime(std::shared_ptr &ask, const McuAskDateTime &value); virtual const StatusCode SetPirSensitivity(std::shared_ptr &ask, const unsigned char &sensitivity); virtual const StatusCode ContorlInfraredLight(std::shared_ptr &ask, const ControlLight &control); diff --git a/middleware/McuManager/src/IMcuManager.cpp b/middleware/McuManager/src/IMcuManager.cpp index 1b77778..112c5e9 100644 --- a/middleware/McuManager/src/IMcuManager.cpp +++ b/middleware/McuManager/src/IMcuManager.cpp @@ -83,50 +83,68 @@ std::shared_ptr &IMcuManager::GetInstance(std::shared_ptr &monitor) { + LogWarning("STATUS_CODE_VIRTUAL_FUNCTION.\n"); return CreateStatusCode(STATUS_CODE_VIRTUAL_FUNCTION); } const StatusCode IMcuManager::GetIpcMission(std::shared_ptr &ask) { + LogWarning("STATUS_CODE_VIRTUAL_FUNCTION.\n"); return CreateStatusCode(STATUS_CODE_VIRTUAL_FUNCTION); } const StatusCode IMcuManager::CutOffPowerSupply(std::shared_ptr &ask) { + LogWarning("STATUS_CODE_VIRTUAL_FUNCTION.\n"); return CreateStatusCode(STATUS_CODE_VIRTUAL_FUNCTION); } const StatusCode IMcuManager::FeedWatchDog(std::shared_ptr &ask) { + LogWarning("STATUS_CODE_VIRTUAL_FUNCTION.\n"); return CreateStatusCode(STATUS_CODE_VIRTUAL_FUNCTION); } const StatusCode IMcuManager::SetFeedingCycleForWatchDog(std::shared_ptr &ask, const unsigned char &hour, const unsigned char &min, const unsigned char &second) { + LogWarning("STATUS_CODE_VIRTUAL_FUNCTION.\n"); + return CreateStatusCode(STATUS_CODE_VIRTUAL_FUNCTION); +} +const StatusCode IMcuManager::SetFeedingCycleForWatchDog(std::shared_ptr &ask, + const unsigned short &feedCycle_s) +{ + LogWarning("STATUS_CODE_VIRTUAL_FUNCTION.\n"); return CreateStatusCode(STATUS_CODE_VIRTUAL_FUNCTION); } const StatusCode IMcuManager::SetDateTime(std::shared_ptr &ask, const McuAskDateTime &value) { + LogWarning("STATUS_CODE_VIRTUAL_FUNCTION.\n"); return CreateStatusCode(STATUS_CODE_VIRTUAL_FUNCTION); } const StatusCode IMcuManager::SetPirSensitivity(std::shared_ptr &ask, const unsigned char &sensitivity) { + LogWarning("STATUS_CODE_VIRTUAL_FUNCTION.\n"); return CreateStatusCode(STATUS_CODE_VIRTUAL_FUNCTION); } const StatusCode IMcuManager::ContorlInfraredLight(std::shared_ptr &ask, const ControlLight &control) { + LogWarning("STATUS_CODE_VIRTUAL_FUNCTION.\n"); return CreateStatusCode(STATUS_CODE_VIRTUAL_FUNCTION); } const StatusCode IMcuManager::GetPhotosensitivityValue(std::shared_ptr &ask) { + LogWarning("STATUS_CODE_VIRTUAL_FUNCTION.\n"); return CreateStatusCode(STATUS_CODE_VIRTUAL_FUNCTION); } const char *IMcuManager::PrintIpcMissionString(const IpcMission &mission) { + LogWarning("STATUS_CODE_VIRTUAL_FUNCTION.\n"); return "VIRTUAL FUNCTION"; } \ No newline at end of file diff --git a/middleware/McuManager/src/McuManagerImpl.cpp b/middleware/McuManager/src/McuManagerImpl.cpp index 71ea14d..e6aa404 100644 --- a/middleware/McuManager/src/McuManagerImpl.cpp +++ b/middleware/McuManager/src/McuManagerImpl.cpp @@ -121,6 +121,12 @@ const StatusCode McuManagerImpl::SetFeedingCycleForWatchDog(std::shared_ptr context = std::make_shared>>(ask); return McuProtocol::SetFeedingCycleForWatchDog(hour, min, second, context); } +const StatusCode McuManagerImpl::SetFeedingCycleForWatchDog(std::shared_ptr &ask, + const unsigned short &feedCycle_s) +{ + std::shared_ptr context = std::make_shared>>(ask); + return McuProtocol::SetFeedingCycleForWatchDog(feedCycle_s, context); +} const StatusCode McuManagerImpl::SetDateTime(std::shared_ptr &ask, const McuAskDateTime &value) { std::shared_ptr context = std::make_shared>>(ask); diff --git a/middleware/McuManager/src/McuManagerImpl.h b/middleware/McuManager/src/McuManagerImpl.h index 0e012f7..10c891f 100644 --- a/middleware/McuManager/src/McuManagerImpl.h +++ b/middleware/McuManager/src/McuManagerImpl.h @@ -48,6 +48,8 @@ public: const StatusCode FeedWatchDog(std::shared_ptr &ask) override; const StatusCode SetFeedingCycleForWatchDog(std::shared_ptr &ask, const unsigned char &hour, const unsigned char &min, const unsigned char &second) override; + const StatusCode SetFeedingCycleForWatchDog(std::shared_ptr &ask, + const unsigned short &feedCycle_s) override; const StatusCode SetDateTime(std::shared_ptr &ask, const McuAskDateTime &value) override; const StatusCode SetPirSensitivity(std::shared_ptr &ask, const unsigned char &sensitivity) override; const StatusCode ContorlInfraredLight(std::shared_ptr &ask, const ControlLight &control) override; diff --git a/test/application/HuntingCamera/src_mock/McuManager_Mock_Test.cpp b/test/application/HuntingCamera/src_mock/McuManager_Mock_Test.cpp index 5c71b95..313204b 100644 --- a/test/application/HuntingCamera/src_mock/McuManager_Mock_Test.cpp +++ b/test/application/HuntingCamera/src_mock/McuManager_Mock_Test.cpp @@ -64,4 +64,20 @@ TEST_F(HuntingCameraTest, HS_INTEGRATION_HunttingCamera_EXAMPLE_PirTriggeredMiss std::this_thread::sleep_for(std::chrono::milliseconds(100)); MainThread::GetInstance()->Runing(); } +/** + * @brief Construct a new test f object + * ../output_files/test/bin/HuntingCameraTest + * --gtest_filter=HuntingCameraTest.HS_INTEGRATION_HunttingCamera_EXAMPLE_CloseWatchDog + */ +TEST_F(HuntingCameraTest, HS_INTEGRATION_HunttingCamera_EXAMPLE_CloseWatchDog) +{ + McuManagerTestTool::MockOtherSideIpcMissionReply(IpcMission::TEST); + MainThread::GetInstance()->Init(); + TestManager::ResetTimeOut(1000 * 10); + std::this_thread::sleep_for(std::chrono::milliseconds(100)); + HalTestTool::MockKeyClick("format", 1000 * 5); // Simulate pressing a button. + std::this_thread::sleep_for(std::chrono::milliseconds(1000)); + HalTestTool::MockKeyClick("reset", 1000 * 5); // Simulate pressing a button. + MainThread::GetInstance()->Runing(); +} } // namespace McuManager_Mock_Test \ No newline at end of file diff --git a/test/middleware/McuManager/src_mock/McuManager_Mock_Test.cpp b/test/middleware/McuManager/src_mock/McuManager_Mock_Test.cpp index 0dc3693..f58dbaf 100644 --- a/test/middleware/McuManager/src_mock/McuManager_Mock_Test.cpp +++ b/test/middleware/McuManager/src_mock/McuManager_Mock_Test.cpp @@ -593,6 +593,41 @@ TEST_F(McuManagerMockTest, HS_INTEGRATION_McuManager_AUTO_SetFeedingCycleForWatc IMcuManager::GetInstance()->UnInit(); } // ../output_files/test/bin/McuManagerTest +// --gtest_filter=McuManagerMockTest.HS_INTEGRATION_McuManager_AUTO_SetFeedingCycleToCloseWatchDog +TEST_F(McuManagerMockTest, HS_INTEGRATION_McuManager_AUTO_SetFeedingCycleToCloseWatchDog) +{ + class McuAskTest : public McuAsk, public McuAskBaseTestTool + { + public: + McuAskTest() + : McuAskBaseTestTool(McuAskBlock::NOT_BLOCK, + McuAskReply::NEED_REPLY) // using McuAskBlock::NOT_BLOCK + { + } + virtual ~McuAskTest() = default; + void ReplyFinished(const bool result) override + { + McuAskBaseTestTool::ReplyFinished(result); + if (result) { + LogInfo("Ask data succeed, mDataReply = %d.\n", static_cast(mDataReply)); + // Do something here. + } + else { + LogError("Ask data falied.\n"); + } + } + }; + IMcuManager::GetInstance()->Init(); + std::shared_ptr ask = std::make_shared(); + std::shared_ptr testTool = std::dynamic_pointer_cast(ask); + testTool->McuAskDefaultFeatures(testTool); + StatusCode code = IMcuManager::GetInstance()->SetFeedingCycleForWatchDog(ask, CLOSE_WATCH_DOG); + EXPECT_EQ(code.mStatusCode, STATUS_CODE_OK); // STATUS_CODE_OK means write data to mcu succeed. + std::this_thread::sleep_for(std::chrono::milliseconds(2000)); + EXPECT_EQ(CheckAskExist(ask), false); // Ensure that the request has been processed and deleted. + IMcuManager::GetInstance()->UnInit(); +} +// ../output_files/test/bin/McuManagerTest // --gtest_filter=McuManagerMockTest.HS_INTEGRATION_McuManager_AUTO_STRESS_MultiThreadWrite TEST_F(McuManagerMockTest, HS_INTEGRATION_McuManager_AUTO_STRESS_MultiThreadWrite) { diff --git a/test/utils/McuProtocol/tool/src/McuProtocolTestTool.cpp b/test/utils/McuProtocol/tool/src/McuProtocolTestTool.cpp index 01ef1e1..217f96e 100644 --- a/test/utils/McuProtocol/tool/src/McuProtocolTestTool.cpp +++ b/test/utils/McuProtocol/tool/src/McuProtocolTestTool.cpp @@ -63,7 +63,7 @@ unsigned char REPLY_IPC_MISSION_X[] = {0xFA, 0xC1, 0x00, 0x00, 0x00, 0x00, 0x01, unsigned char ASK_CUT_OFF_POWER_SUPPLY_X[] = {0xFA, 0xC1, 0x00, 0x00, 0x00, 0x00, 0x81, 0x02, 0x00, 0x0C, 0xFF, 0xFF}; unsigned char ASK_FEED_WATCH_DOG_X[] = {0xFA, 0xC1, 0x00, 0x00, 0x00, 0x00, 0x81, 0x03, 0x00, 0x0C, 0xFF, 0xFF}; unsigned char ASK_SET_FEEDING_CYCLE_X[] = { - 0xFA, 0xC1, 0x00, 0x00, 0x00, 0x00, 0x81, 0x04, 0x00, 0x0F, 0x01, 0x01, 0x01, 0xFF, 0xFF}; + 0xFA, 0xC1, 0x00, 0x00, 0x00, 0x00, 0x81, 0x04, 0x00, 0x0F, 0x01, 0x01, 0xFF, 0xFF}; unsigned char REPLY_SET_FEEDING_CYCLE_X[] = { 0xFA, 0xC1, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x0D, 0x01, 0xFF, 0xFF}; unsigned char ASK_SET_DATE_TIME_X[] = { diff --git a/utils/McuProtocol/include/McuProtocol.h b/utils/McuProtocol/include/McuProtocol.h index 74302c6..b56a7a5 100644 --- a/utils/McuProtocol/include/McuProtocol.h +++ b/utils/McuProtocol/include/McuProtocol.h @@ -121,6 +121,8 @@ protected: const StatusCode SetFeedingCycleForWatchDog(const unsigned char &hour, const unsigned char &min, const unsigned char &second, std::shared_ptr &context); + const StatusCode SetFeedingCycleForWatchDog(const unsigned short &feedCycle_s, + std::shared_ptr &context); const StatusCode McuSetDateTime(const unsigned short &year, const unsigned char &mon, const unsigned char &day, const unsigned char &hour, const unsigned char &min, const unsigned char &second, std::shared_ptr &context); diff --git a/utils/McuProtocol/src/McuProtocol.cpp b/utils/McuProtocol/src/McuProtocol.cpp index 481c96e..474ab0b 100644 --- a/utils/McuProtocol/src/McuProtocol.cpp +++ b/utils/McuProtocol/src/McuProtocol.cpp @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -142,6 +143,20 @@ const StatusCode McuProtocol::SetFeedingCycleForWatchDog(const unsigned char &ho return WriteProtocolData( handle->GetProtocolDataBuff(), handle->GetProtocolDataLength(), context, handle->GetSerialNumber()); } +const StatusCode McuProtocol::SetFeedingCycleForWatchDog(const unsigned short &feedCycle_s, + std::shared_ptr &context) +{ + unsigned short feedCycle = 0; + char byteOrder = ProtocolHandle::GetByteOrder(); + if (ORDER_LITTLE_ENDIAN == byteOrder) { + feedCycle = htons(feedCycle_s); + } + std::shared_ptr param = + std::make_shared>(PROTOCOL_COMMAND::ASK_SET_FEEDING_CYCLE, feedCycle); + std::shared_ptr handle = ProtocolHandle::CreateProtocolData(param); + return WriteProtocolData( + handle->GetProtocolDataBuff(), handle->GetProtocolDataLength(), context, handle->GetSerialNumber()); +} const StatusCode McuProtocol::McuSetDateTime(const unsigned short &year, const unsigned char &mon, const unsigned char &day, const unsigned char &hour, const unsigned char &min, const unsigned char &second, diff --git a/utils/McuProtocol/src/ProtocolHandle.cpp b/utils/McuProtocol/src/ProtocolHandle.cpp index bec0c57..3b8dbcf 100644 --- a/utils/McuProtocol/src/ProtocolHandle.cpp +++ b/utils/McuProtocol/src/ProtocolHandle.cpp @@ -178,7 +178,7 @@ void ProtocolHandle::MakeAskFeedWatchDogPacket(const std::shared_ptr ¶m) { - MakeProtocolData(param); + MakeProtocolData(param); } void ProtocolHandle::MakeAskSetDateTimePacket(const std::shared_ptr ¶m) {