diff --git a/.settings/language.settings.xml b/.settings/language.settings.xml
index 3313117..02bc15c 100644
--- a/.settings/language.settings.xml
+++ b/.settings/language.settings.xml
@@ -5,7 +5,7 @@
-
+
@@ -16,7 +16,7 @@
-
+
diff --git a/Drivers b/Drivers
index e71ddbc..078acc8 160000
--- a/Drivers
+++ b/Drivers
@@ -1 +1 @@
-Subproject commit e71ddbca4e7fc61b82b6b1f03f66b7cfbffb0495
+Subproject commit 078acc813aab2a755e85f89f8d3b1f94174cfd1f
diff --git a/README.md b/README.md
index 5138590..574fe99 100644
--- a/README.md
+++ b/README.md
@@ -11,6 +11,10 @@
3. 上位机指令超时时间建议设置成500ms
V105:
1.修复比例阀控制失败的BUG
+ V106:
+ 1.修复电机错误的停止方式
+ 2.将所有依赖更新到最新版本
+ 3.支持外置过氧化氢传感器
```
diff --git a/app_protocols/transmit_disfection_protocol b/app_protocols/transmit_disfection_protocol
index bc4d7a3..0edd82d 160000
--- a/app_protocols/transmit_disfection_protocol
+++ b/app_protocols/transmit_disfection_protocol
@@ -1 +1 @@
-Subproject commit bc4d7a3d201125f735fb193b6109be24399be84a
+Subproject commit 0edd82d824736ca1d4d2f113a382204e702709bc
diff --git a/app_protocols/zscanprotocol b/app_protocols/zscanprotocol
index 1b678c1..81529a1 160000
--- a/app_protocols/zscanprotocol
+++ b/app_protocols/zscanprotocol
@@ -1 +1 @@
-Subproject commit 1b678c19f32b1718ae4ebd719b1dc19cd1e48bf5
+Subproject commit 81529a15c57000f73cc5bd4b7276f567099b9988
diff --git a/stm32basic b/stm32basic
index bed34d4..ea11d9f 160000
--- a/stm32basic
+++ b/stm32basic
@@ -1 +1 @@
-Subproject commit bed34d48c7e2a5e019af3a567d4de3b47702c4dc
+Subproject commit ea11d9f77beed2bf8145bbe490283c0830fa8a77
diff --git a/stm32components b/stm32components
index a3069a8..c329787 160000
--- a/stm32components
+++ b/stm32components
@@ -1 +1 @@
-Subproject commit a3069a8005dcb8277f95d0341551c145fac2a046
+Subproject commit c3297878099d6ab606c91c0cd29c37ebadcd035a
diff --git a/stm32halport b/stm32halport
index 6c550d6..a0107db 160000
--- a/stm32halport
+++ b/stm32halport
@@ -1 +1 @@
-Subproject commit 6c550d69902d048e8fdd782d11e3feba7120b740
+Subproject commit a0107dbac5d3ec2750b60b553097f5f7e1763ef7
diff --git a/ucomponents/hmp110/hmp110.hpp b/ucomponents/hmp110/hmp110.hpp
index 21a88b8..2aed003 100644
--- a/ucomponents/hmp110/hmp110.hpp
+++ b/ucomponents/hmp110/hmp110.hpp
@@ -31,15 +31,15 @@ class HMP110 {
ModbusBlockHost* m_modbusBlockHost = NULL;
int32_t m_id = 0;
- zmutex m_lock;
+ zmutex m_lock = {"HMP110:m_lock"};
hmp110_sensordata_t m_rdbuf;
hmp110_sensordata_t m_cachedata;
int32_t m_cache_errorcode = 0;
- zmutex m_cache_lock;
+ zmutex m_cache_lock = {"HMP110:m_cache_lock"};
- zmutex m_chlock;
+ zmutex m_chlock = {"HMP110:m_chlock"};
public:
/***********************************************************************************************************************
diff --git a/ucomponents/hpp272/hpp272.hpp b/ucomponents/hpp272/hpp272.hpp
index 7fdb0ec..63010ed 100644
--- a/ucomponents/hpp272/hpp272.hpp
+++ b/ucomponents/hpp272/hpp272.hpp
@@ -38,13 +38,13 @@ class HPP272 {
ModbusBlockHost* m_modbusBlockHost = NULL;
int32_t m_id = 0;
- zmutex m_lock;
+ zmutex m_lock = {"HPP272:m_lock"};
hpp272_data_t m_readbuf;
hpp272_data_t m_cachedata;
int32_t m_cache_errorcode = 0;
- zmutex m_cache_lock;
+ zmutex m_cache_lock={"HPP272:m_cache_lock"};
public:
/***********************************************************************************************************************
diff --git a/ucomponents/preportional_valve/preportional_valve_ctrl.cpp b/ucomponents/preportional_valve/preportional_valve_ctrl.cpp
index 8c72a34..9904fed 100644
--- a/ucomponents/preportional_valve/preportional_valve_ctrl.cpp
+++ b/ucomponents/preportional_valve/preportional_valve_ctrl.cpp
@@ -2,15 +2,15 @@
#include "transmit_disfection_protocol/transmit_disfection_protocol.hpp"
using namespace iflytop;
-using namespace zscanprotocol;
using namespace transmit_disfection_protocol;
+
#define WORK_STATE_REG 0x0000
#define CTRL_STATE_REG 0x0001
#define POS_STATE_REG 0x0013
#define OVERTIME 100
#define TAG "PreportionalValveCtrl"
-void PreportionalValveCtrl::initialize(UART_HandleTypeDef* huart) {//
+void PreportionalValveCtrl::initialize(UART_HandleTypeDef* huart) { //
m_modbusBlockHost.initialize(huart);
m_modbusBlockHost.enableDump(false);
}
diff --git a/ucomponents/pxx_pressure_sensor_driver/pxx_pressure_sensor_bus.hpp b/ucomponents/pxx_pressure_sensor_driver/pxx_pressure_sensor_bus.hpp
index 7cead01..87c5b50 100644
--- a/ucomponents/pxx_pressure_sensor_driver/pxx_pressure_sensor_bus.hpp
+++ b/ucomponents/pxx_pressure_sensor_driver/pxx_pressure_sensor_bus.hpp
@@ -45,7 +45,7 @@ class PXXPressureSensorBus {
ModbusBlockHost* m_modbusBlockHost;
bool initedEnd = false;
- zmutex m_lock;
+ zmutex m_lock={"PXXPressureSensorBus:m_lock"};
public:
sensor_t sensors[PXX_PRESSURE_SENSOR_NUM] = {0};
diff --git a/usrc/app_main.cpp b/usrc/app_main.cpp
index a363438..0f02d9f 100644
--- a/usrc/app_main.cpp
+++ b/usrc/app_main.cpp
@@ -85,7 +85,7 @@ void umain() {
idtable_init();
deviceInfo_init();
- config_init();
+ // config_init();
AppPeriodTaskMgr::ins()->initialize();
PublicBoard::ins()->initialize();
diff --git a/usrc/base/config_service.cpp b/usrc/base/config_service.cpp
index 590e81d..17ba97d 100644
--- a/usrc/base/config_service.cpp
+++ b/usrc/base/config_service.cpp
@@ -1,5 +1,5 @@
#include "config_service.hpp"
-
+#if 0
static config_t _config;
static config_t _default_val_config;
@@ -35,3 +35,4 @@ config_t *config_get(void) { return &_config; }
void config_flush(void) { zflash_flush(); }
void config_factory_reset(void) { zflash_factory_reset(); }
+#endif
\ No newline at end of file
diff --git a/usrc/base/config_service.hpp b/usrc/base/config_service.hpp
index c568cc3..f11ce6e 100644
--- a/usrc/base/config_service.hpp
+++ b/usrc/base/config_service.hpp
@@ -1,4 +1,5 @@
#pragma once
+#if 0
#include
#include "stm32basic/stm32basic.hpp"
@@ -14,4 +15,4 @@ void config_init(void);
config_t* config_get(void);
void config_flush(void);
void config_factory_reset(void);
-
+#endif
diff --git a/usrc/base/device_info.hpp b/usrc/base/device_info.hpp
index 95e6133..ec5313b 100644
--- a/usrc/base/device_info.hpp
+++ b/usrc/base/device_info.hpp
@@ -1,6 +1,7 @@
#pragma once
#include
#include
+#include
#include "project_configs.h"
#include "base/config_service.hpp"
diff --git a/usrc/base/protocol_processer_mgr.cpp b/usrc/base/protocol_processer_mgr.cpp
index 0de723b..b64b2b5 100644
--- a/usrc/base/protocol_processer_mgr.cpp
+++ b/usrc/base/protocol_processer_mgr.cpp
@@ -1,6 +1,5 @@
#include "protocol_processer_mgr.hpp"
using namespace iflytop;
-using namespace zscanprotocol;
using namespace transmit_disfection_protocol;
#define TAG "ProtocolProcesserMgr"
diff --git a/usrc/base/protocol_processer_utils.hpp b/usrc/base/protocol_processer_utils.hpp
index bae2c8c..d378f6a 100644
--- a/usrc/base/protocol_processer_utils.hpp
+++ b/usrc/base/protocol_processer_utils.hpp
@@ -11,7 +11,6 @@
namespace iflytop {
using namespace std;
-using namespace zscanprotocol;
using namespace transmit_disfection_protocol;
#define GET_PARAM(off) ((((int32_t*)(cxt->packet->params))[off]))
@@ -48,4 +47,4 @@ class CmdProcesser {
CmdProcesser(int cmd, cmdprocessfn_t fn) : cmd(cmd), fn(fn) {}
};
-} // namespace iflytop
\ No newline at end of file
+} // namespace iflytop
diff --git a/usrc/module/air_compressor_controller.hpp b/usrc/module/air_compressor_controller.hpp
index 4f09e8c..ee5ae70 100644
--- a/usrc/module/air_compressor_controller.hpp
+++ b/usrc/module/air_compressor_controller.hpp
@@ -2,7 +2,6 @@
#include "base/appdep.hpp"
namespace iflytop {
-using namespace zscanprotocol;
using namespace transmit_disfection_protocol;
class AirCompressorController {
diff --git a/usrc/module/pxxpsbus.hpp b/usrc/module/pxxpsbus.hpp
index fef4797..20bd042 100644
--- a/usrc/module/pxxpsbus.hpp
+++ b/usrc/module/pxxpsbus.hpp
@@ -3,8 +3,6 @@
namespace iflytop {
using namespace transmit_disfection_protocol;
-using namespace zscanprotocol;
-using namespace err;
class PXXPSBus {
PXXPressureSensorBus psbus;
bool m_isInitialized = false;
diff --git a/usrc/module/tmc_motor_group.cpp b/usrc/module/tmc_motor_group.cpp
index 2e47eb2..2dc26c3 100644
--- a/usrc/module/tmc_motor_group.cpp
+++ b/usrc/module/tmc_motor_group.cpp
@@ -2,15 +2,15 @@
using namespace iflytop;
#define TAG "TmcMotorGroup"
using namespace transmit_disfection_protocol;
-using namespace zscanprotocol;
-using namespace err;
+// using namespace zscanprotocol;
+// using namespace err;
/***********************************************************************************************************************
* 电机异常监控 *
***********************************************************************************************************************/
static osTimerId MotorMonitorTimerId; // 压力传感器数值上报
static bool motorErrorFlagCache[10]; // 电机异常状态上报标志位
-static zmutex motorErrorFlagCacheLock;
+static zmutex motorErrorFlagCacheLock = {"motorErrorFlagCacheLock"};
static TmcMotorGroup* tmcgroup_p;
static bool motorErrorFlag_get(int subindex) {
@@ -115,11 +115,11 @@ void TmcMotorGroup::initialize(Pin_t tmcPowerPin, TMC51X0Cfg cfg0, TMC51X0Cfg cf
m_tmc_power_pin.write(true);
// PB2
- m_motor[0].initialize(cfg0);
+ m_motor[0].initialize(0, cfg0);
m_motor[0].setIHOLD_IRUN(1, 20, 0);
m_motor[0].setMotorShaft(true);
- m_motor[1].initialize(cfg1);
+ m_motor[1].initialize(1, cfg1);
m_motor[1].setIHOLD_IRUN(1, 20, 0);
m_motor[1].setMotorShaft(true);
diff --git a/usrc/module/tmc_motor_group.hpp b/usrc/module/tmc_motor_group.hpp
index 6509d90..2669525 100644
--- a/usrc/module/tmc_motor_group.hpp
+++ b/usrc/module/tmc_motor_group.hpp
@@ -25,10 +25,12 @@ class TmcMotorGroup {
private:
void fn_pump_rotate(ProcessContext* cxt);
void fn_pump_stop(ProcessContext* cxt);
+
void fn_pump_set_ihold_irun_idelay(ProcessContext* cxt);
void fn_pump_set_acc(ProcessContext* cxt);
void fn_pump_set_ramp(ProcessContext* cxt);
void fn_pump_set_tzw(ProcessContext* cxt);
+
void fn_pump_set_subic_reg(ProcessContext* cxt);
void fn_pump_get_subic_reg(ProcessContext* cxt);
void fn_pump_ping(ProcessContext* cxt);
diff --git a/usrc/project_configs.h b/usrc/project_configs.h
index 25ddd3f..03b92b9 100644
--- a/usrc/project_configs.h
+++ b/usrc/project_configs.h
@@ -15,7 +15,7 @@
* @brief 基础配置
*
*/
-#define SOFTWARE_VERSION 105 // 软件版本
+#define SOFTWARE_VERSION 106 // 软件版本
#define HARDWARE_VERSION 1 // 硬件版本
#define PROJECT "transmit_disinfection_micro_re" // 工程名称
#define SN_HEADER "SN" // SN号前缀
diff --git a/usrc/protocol_processer_impl/public_cmd_processer.cpp b/usrc/protocol_processer_impl/public_cmd_processer.cpp
index 4990952..9f9ccdb 100644
--- a/usrc/protocol_processer_impl/public_cmd_processer.cpp
+++ b/usrc/protocol_processer_impl/public_cmd_processer.cpp
@@ -1,7 +1,6 @@
#include "public_cmd_processer.hpp"
using namespace iflytop;
-using namespace zscanprotocol;
using namespace transmit_disfection_protocol;
#define ThisClass PublicCmdProcesser
diff --git a/usrc/protocol_processer_impl/public_cmd_processer.hpp b/usrc/protocol_processer_impl/public_cmd_processer.hpp
index b7a9728..c04b9a6 100644
--- a/usrc/protocol_processer_impl/public_cmd_processer.hpp
+++ b/usrc/protocol_processer_impl/public_cmd_processer.hpp
@@ -4,7 +4,6 @@
namespace iflytop {
using namespace std;
-using namespace zscanprotocol;
using namespace transmit_disfection_protocol;
class PublicCmdProcesser {