From 207d5feedc87b28d56c32e5b26e0155c8f452f9d Mon Sep 17 00:00:00 2001 From: zhaohe Date: Thu, 13 Jun 2024 21:30:12 +0800 Subject: [PATCH] update --- .../pipette_module/pipette_ctrl_module_v2.cpp | 73 +++++++++++++--------- .../pipette_module/pipette_ctrl_module_v2.hpp | 10 ++- 2 files changed, 46 insertions(+), 37 deletions(-) diff --git a/components/pipette_module/pipette_ctrl_module_v2.cpp b/components/pipette_module/pipette_ctrl_module_v2.cpp index 724190c..79d5f7e 100644 --- a/components/pipette_module/pipette_ctrl_module_v2.cpp +++ b/components/pipette_module/pipette_ctrl_module_v2.cpp @@ -96,47 +96,56 @@ int32_t PipetteModule::module_active_cfg() { int32_t PipetteModule::pipette_ctrl_init_device() { ZLOGI(TAG, "pipette_ctrl_init_device"); - if (creg.m_module_status == 1) return err::kdevice_is_busy; - return do_pipette_ctrl_init_device(); + return 0; + // if (creg.m_module_status == 1) return err::kdevice_is_busy; + // return do_pipette_ctrl_init_device(); }; int32_t PipetteModule::pipette_ctrl_put_tip() { ZLOGI(TAG, "pipette_ctrl_put_tip"); - if (creg.m_module_status == 1) return err::kdevice_is_busy; - return do_pipette_ctrl_put_tip(); + return 0; + + // if (creg.m_module_status == 1) return err::kdevice_is_busy; + // return do_pipette_ctrl_put_tip(); }; // 兼容旧程序 int32_t PipetteModule::pipette_ctrl_move_to_ul(int32_t ul) { ZLOGI(TAG, "pipette_ctrl_move_to_ul %d", ul); - if (ul > m_config.limit_ul) { - return err::kparam_out_of_range; - } - if (creg.m_module_status == 1) return err::kdevice_is_busy; + return 0; + // if (ul > m_config.limit_ul) { + // return err::kparam_out_of_range; + // } + // if (creg.m_module_status == 1) return err::kdevice_is_busy; - return do_pipette_ctrl_move_to_ul(ul); + // return do_pipette_ctrl_move_to_ul(ul); }; -int32_t PipetteModule::pipette_clld_test(int32_t zdpos) { - ZLOGI(TAG, "pipette_clld_test %d", zdpos); - int32_t motor_status; - m_zmotor->module_get_status(&motor_status); - if (motor_status != 0) { - return err::kdevice_is_busy; - } - if (creg.m_module_status == 1) return err::kdevice_is_busy; - - return do_pipette_clld_test(zdpos); -} -int32_t PipetteModule::pipette_plld_test(int32_t zdpos) { - int32_t motor_status; - m_zmotor->module_get_status(&motor_status); - if (motor_status != 0) { - return err::kdevice_is_busy; - } - if (creg.m_module_status == 1) return err::kdevice_is_busy; - - return do_pipette_plld_test(zdpos); -} +// int32_t PipetteModule::pipette_clld_test(int32_t zdpos) { +// ZLOGI(TAG, "pipette_clld_test %d", zdpos); +// int32_t motor_status; +// m_zmotor->module_get_status(&motor_status); +// if (motor_status != 0) { +// return err::kdevice_is_busy; +// } +// if (creg.m_module_status == 1) return err::kdevice_is_busy; + +// return do_pipette_clld_test(zdpos); +// } +// int32_t PipetteModule::pipette_plld_test(int32_t zdpos) { +// int32_t motor_status; +// m_zmotor->module_get_status(&motor_status); +// if (motor_status != 0) { +// return err::kdevice_is_busy; +// } +// if (creg.m_module_status == 1) return err::kdevice_is_busy; + +// return do_pipette_plld_test(zdpos); +// } + +int32_t PipetteModule::pipette_lld_prepare() { return 0; }; +int32_t PipetteModule::pipette_lld(int32_t zdpos, int32_t c_threshold, int32_t p_threshold) { return 0; }; +int32_t PipetteModule::pipette_aspirate(int32_t ul) { return 0; }; +int32_t PipetteModule::pipette_distribut(int32_t ul) { return 0; }; /*********************************************************************************************************************** * ACTION * @@ -217,6 +226,7 @@ int32_t PipetteModule::do_pipette_ctrl_move_to_ul(int32_t ul) { ); return 0; } +#if 0 int32_t PipetteModule::do_pipette_clld_test(int32_t zdpos) { m_thread.stop(); creg.m_module_status = 1; @@ -268,6 +278,7 @@ int32_t PipetteModule::do_pipette_clld_test(int32_t zdpos) { return 0; } int32_t PipetteModule::do_pipette_plld_test(int32_t zdpos) { return 0; } +#endif int32_t PipetteModule::pipette_enable_zmotor(int32_t enable) { return m_zmotor->step_motor_enable(enable); } int32_t PipetteModule::pipette_get_sensor_sample_data(int32_t index, int32_t *motor_pos, int32_t *cval, int32_t *pval) { @@ -322,7 +333,7 @@ void PipetteModule::push_snesor_sample_data(int32_t motor_pos, int32_t cap_val, capturedata_buf[capturedata_num].pressure_val = pressure_val; capturedata_num++; } -//高试管800 +// 高试管800 /******************************************************************************* * PRIVATE * diff --git a/components/pipette_module/pipette_ctrl_module_v2.hpp b/components/pipette_module/pipette_ctrl_module_v2.hpp index 2ed9744..2f615ca 100644 --- a/components/pipette_module/pipette_ctrl_module_v2.hpp +++ b/components/pipette_module/pipette_ctrl_module_v2.hpp @@ -116,15 +116,13 @@ class PipetteModule : public ZIModule, public ZIPipetteCtrlModule { virtual int32_t pipette_get_sensor_sample_data_num(int32_t *num) override; private: - virtual int32_t do_pipette_lld(int32_t zdpos, int32_t c_threshold, int32_t p_threshold); - int32_t do_pipette_ctrl_init_device(); int32_t do_pipette_ctrl_put_tip(); int32_t do_pipette_ctrl_move_to_ul(int32_t ul); - int32_t do_pipette_lld_prepare(); - int32_t do_pipette_lld(int32_t zdpos, int32_t c_threshold, int32_t p_threshold); - int32_t do_pipette_aspirate(int32_t ul); - int32_t do_pipette_distribut(int32_t ul); + // int32_t do_pipette_lld_prepare(); + // int32_t do_pipette_lld(int32_t zdpos, int32_t c_threshold, int32_t p_threshold); + // int32_t do_pipette_aspirate(int32_t ul); + // int32_t do_pipette_distribut(int32_t ul); private: int32_t befor_run();