Browse Source

3.0.7

master
zhaohe 4 weeks ago
parent
commit
3bbb09becf
  1. 2
      appsrc/appconfig/basic/zappversion.hpp
  2. 10
      appsrc/baseservice/db/calibrate_info_dao.hpp
  3. 13
      appsrc/service/app/disinfection_ctrl/disinfection_ctrl_service.cpp
  4. 8
      appsrc/service/app/disinfection_ctrl/disinfection_ctrl_service.hpp
  5. 18
      appsrc/service/app/disinfection_ctrl_service_ext.cpp
  6. 3
      appsrc/service/app/disinfection_ctrl_service_ext.hpp

2
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"

10
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();

13
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();
}

8
appsrc/service/app/disinfection_ctrl/disinfection_ctrl_service.hpp

@ -90,8 +90,12 @@ class DisinfectionCtrlService : public enable_shared_from_this<DisinfectionCtrlS
void getStateSafeBlock(function<void()> syncState) { sm.getStateSafeBlock(syncState); }
void clearHandleStopPumpInjectionFlag();
void setHandleStopPumpInjectionFlag();
// void clearHandleStopPumpInjectionFlag();
// void setHandleStopPumpInjectionFlag();
void handleStopPumpInjection();
void handleStartPumpInjection();
bool getHandlePumpStopFlag() { return handlePumpStopFlag; }
map<string, string>& getRealtimeCfg() { return m_realtimeCfg; }

18
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<MsgProcessContext>
dcs->getRealtimeCfg()[key] = val;
dcs->updateCfg();
}
void DisinfectionCtrlServiceExt::handleStopPumpInjection(shared_ptr<MsgProcessContext> cxt) {
dcs->handleStopPumpInjection();
if (stateUpdateThread) stateUpdateThread->wake();
}
void DisinfectionCtrlServiceExt::handleStartPumpInjection(shared_ptr<MsgProcessContext> cxt) {
dcs->handleStartPumpInjection();
if (stateUpdateThread) stateUpdateThread->wake();
}
void DisinfectionCtrlServiceExt::clearHandleStopPumpInjectionFlag(shared_ptr<MsgProcessContext> cxt) {
dcs->clearHandleStopPumpInjectionFlag();
dcs->handleStopPumpInjection();
if (stateUpdateThread) stateUpdateThread->wake();
}
void DisinfectionCtrlServiceExt::setHandleStopPumpInjectionFlag(shared_ptr<MsgProcessContext> cxt) {
dcs->setHandleStopPumpInjectionFlag();
dcs->handleStartPumpInjection();
if (stateUpdateThread) stateUpdateThread->wake();
}
void DisinfectionCtrlServiceExt::getState(shared_ptr<MsgProcessContext> cxt) { cxt->rely = getState(); }

3
appsrc/service/app/disinfection_ctrl_service_ext.hpp

@ -47,6 +47,9 @@ class DisinfectionCtrlServiceExt : public enable_shared_from_this<DisinfectionCt
void clearHandleStopPumpInjectionFlag(shared_ptr<MsgProcessContext> cxt);
void setHandleStopPumpInjectionFlag(shared_ptr<MsgProcessContext> cxt);
void handleStopPumpInjection(shared_ptr<MsgProcessContext> cxt);
void handleStartPumpInjection(shared_ptr<MsgProcessContext> cxt);
/*******************************************************************************
* *
*******************************************************************************/

Loading…
Cancel
Save