diff --git a/appsrc/appconfig/basic/zappversion.hpp b/appsrc/appconfig/basic/zappversion.hpp index 81c73bd..c2093f3 100644 --- a/appsrc/appconfig/basic/zappversion.hpp +++ b/appsrc/appconfig/basic/zappversion.hpp @@ -1,3 +1,3 @@ #pragma once -#define VERSION "3.0.6" +#define VERSION "3.0.7" #define PROJECT_NAME "TRANSMIT_DM" \ No newline at end of file diff --git a/appsrc/baseservice/db/calibrate_info_dao.hpp b/appsrc/baseservice/db/calibrate_info_dao.hpp index 6a8e160..75ae6ea 100644 --- a/appsrc/baseservice/db/calibrate_info_dao.hpp +++ b/appsrc/baseservice/db/calibrate_info_dao.hpp @@ -35,7 +35,7 @@ using namespace nlohmann; namespace db { typedef struct { - int id; + int id; float h2O2LiquidWeightSensorZeroBias; // H2O2液体重量传感器零点偏差 } CalibrationInfo; } // namespace db @@ -62,8 +62,12 @@ class CalibrationInfoDao : public KeyValDBV2Dao { CalibrationInfo getCalibrationInfo(); json getCalibrationInfoJson(); - void setH2O2LiquidWeightSensorZeroBias(float bias); - float getH2O2LiquidWeightSensorZeroBias(); + void setH2O2LiquidWeightSensorZeroBias(float bias); + float getH2O2LiquidWeightSensorZeroBias(); + + + + private: void initialize(); diff --git a/appsrc/service/app/disinfection_ctrl/disinfection_ctrl_service.cpp b/appsrc/service/app/disinfection_ctrl/disinfection_ctrl_service.cpp index 060e04b..30cb698 100644 --- a/appsrc/service/app/disinfection_ctrl/disinfection_ctrl_service.cpp +++ b/appsrc/service/app/disinfection_ctrl/disinfection_ctrl_service.cpp @@ -608,11 +608,20 @@ void DisinfectionCtrlService::processStateDisinfection(DisinfectionEvent* event) } } -void DisinfectionCtrlService::setHandleStopPumpInjectionFlag() { +// void DisinfectionCtrlService::setHandleStopPumpInjectionFlag() { +// handlePumpStopFlag = true; +// updateCfg(); +// } +// void DisinfectionCtrlService::clearHandleStopPumpInjectionFlag() { +// handlePumpStopFlag = false; +// updateCfg(); +// } + +void DisinfectionCtrlService::handleStopPumpInjection() { handlePumpStopFlag = true; updateCfg(); } -void DisinfectionCtrlService::clearHandleStopPumpInjectionFlag() { +void DisinfectionCtrlService::handleStartPumpInjection() { handlePumpStopFlag = false; updateCfg(); } diff --git a/appsrc/service/app/disinfection_ctrl/disinfection_ctrl_service.hpp b/appsrc/service/app/disinfection_ctrl/disinfection_ctrl_service.hpp index ca10e57..70a794b 100644 --- a/appsrc/service/app/disinfection_ctrl/disinfection_ctrl_service.hpp +++ b/appsrc/service/app/disinfection_ctrl/disinfection_ctrl_service.hpp @@ -90,8 +90,12 @@ class DisinfectionCtrlService : public enable_shared_from_this syncState) { sm.getStateSafeBlock(syncState); } - void clearHandleStopPumpInjectionFlag(); - void setHandleStopPumpInjectionFlag(); + // void clearHandleStopPumpInjectionFlag(); + // void setHandleStopPumpInjectionFlag(); + void handleStopPumpInjection(); + void handleStartPumpInjection(); + + bool getHandlePumpStopFlag() { return handlePumpStopFlag; } map& getRealtimeCfg() { return m_realtimeCfg; } diff --git a/appsrc/service/app/disinfection_ctrl_service_ext.cpp b/appsrc/service/app/disinfection_ctrl_service_ext.cpp index 25b97a6..06f8839 100644 --- a/appsrc/service/app/disinfection_ctrl_service_ext.cpp +++ b/appsrc/service/app/disinfection_ctrl_service_ext.cpp @@ -50,8 +50,11 @@ void DisinfectionCtrlServiceExt::initialize() { REG_EXTFN_VOID(getServiceConfig, void()); REG_EXTFN_VOID(startStateReport, void()); REG_EXTFN_VOID(stopStateReport, void()); - REG_EXTFN_VOID(clearHandleStopPumpInjectionFlag, void()); + REG_EXTFN_VOID(handleStopPumpInjection, void()); + REG_EXTFN_VOID(handleStartPumpInjection, void()); REG_EXTFN_VOID(setHandleStopPumpInjectionFlag, void()); + REG_EXTFN_VOID(clearHandleStopPumpInjectionFlag, void()); + stateUpdateThread.reset(new Thread("DisinfectionCtrlServiceExt-stateUpdateThread", [this]() { ThisThread thisThread; @@ -109,12 +112,21 @@ void DisinfectionCtrlServiceExt::setRealtimeConfig(shared_ptr dcs->getRealtimeCfg()[key] = val; dcs->updateCfg(); } +void DisinfectionCtrlServiceExt::handleStopPumpInjection(shared_ptr cxt) { + dcs->handleStopPumpInjection(); + if (stateUpdateThread) stateUpdateThread->wake(); +} +void DisinfectionCtrlServiceExt::handleStartPumpInjection(shared_ptr cxt) { + dcs->handleStartPumpInjection(); + if (stateUpdateThread) stateUpdateThread->wake(); +} + void DisinfectionCtrlServiceExt::clearHandleStopPumpInjectionFlag(shared_ptr cxt) { - dcs->clearHandleStopPumpInjectionFlag(); + dcs->handleStopPumpInjection(); if (stateUpdateThread) stateUpdateThread->wake(); } void DisinfectionCtrlServiceExt::setHandleStopPumpInjectionFlag(shared_ptr cxt) { - dcs->setHandleStopPumpInjectionFlag(); + dcs->handleStartPumpInjection(); if (stateUpdateThread) stateUpdateThread->wake(); } void DisinfectionCtrlServiceExt::getState(shared_ptr cxt) { cxt->rely = getState(); } diff --git a/appsrc/service/app/disinfection_ctrl_service_ext.hpp b/appsrc/service/app/disinfection_ctrl_service_ext.hpp index e0f7a59..68e5777 100644 --- a/appsrc/service/app/disinfection_ctrl_service_ext.hpp +++ b/appsrc/service/app/disinfection_ctrl_service_ext.hpp @@ -47,6 +47,9 @@ class DisinfectionCtrlServiceExt : public enable_shared_from_this cxt); void setHandleStopPumpInjectionFlag(shared_ptr cxt); + void handleStopPumpInjection(shared_ptr cxt); + void handleStartPumpInjection(shared_ptr cxt); + /******************************************************************************* * 状态 * *******************************************************************************/