From 5db72eca2ef5a12d4b143084e0a525d5df326716 Mon Sep 17 00:00:00 2001 From: zhaohe Date: Mon, 24 Jun 2024 10:20:03 +0800 Subject: [PATCH] update --- components/pipette_module/pipette_ctrl_module_v2.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/components/pipette_module/pipette_ctrl_module_v2.cpp b/components/pipette_module/pipette_ctrl_module_v2.cpp index 80f65a0..cd02ba0 100644 --- a/components/pipette_module/pipette_ctrl_module_v2.cpp +++ b/components/pipette_module/pipette_ctrl_module_v2.cpp @@ -589,11 +589,15 @@ int32_t PipetteModule::do_pipette_shake_up(int32_t ul, int32_t zmotor_v, int32_t return err::kpipette_error_pump_load_val_is_not_empty; } + if (ul > m_config.limit_ul) { + return err::kparam_out_of_range; + } + m_thread.stop(); creg.module_status = 1; m_thread.start( - [this, ul, zmotor_v,times]() { // + [this, ul, zmotor_v, times]() { // auto submotor = m_zmotor->getMotor(); pipette_enable_zmotor(1); DO_IN_THREAD(befor_run()); @@ -601,7 +605,7 @@ int32_t PipetteModule::do_pipette_shake_up(int32_t ul, int32_t zmotor_v, int32_t int32_t startpos = 0; int32_t endpos = 0; - int32_t dotimes = 0; + int32_t dotimes = 0; // 吸液 startpos = submotor->getXACTUAL();