diff --git a/sdk/components/pipette_module/pipette_ctrl_module.cpp b/sdk/components/pipette_module/pipette_ctrl_module.cpp index bcb3b3b..474f7e2 100644 --- a/sdk/components/pipette_module/pipette_ctrl_module.cpp +++ b/sdk/components/pipette_module/pipette_ctrl_module.cpp @@ -438,7 +438,7 @@ void PipetteModule::_do_lld(int32_t container_pos, platinfo_t *platform_info, co // 移动到转移位置 ZLOGI(TAG, "-->zm move to transform pos"); - zm_move_to_block(0, kpm_v_max, 0); + zm_move_to_block(0, kzm_v_default, 0); // 清空tip ZLOGI(TAG, "-->empty tip before lld"); pump_move_to_x100nl_block(0, liquidinfo->empty_tip_pm_vcpyid); diff --git a/sdk/components/pipette_module/pipette_ctrl_module_pm_ctrl.cpp b/sdk/components/pipette_module/pipette_ctrl_module_pm_ctrl.cpp index 5bcf62b..5b10cc9 100644 --- a/sdk/components/pipette_module/pipette_ctrl_module_pm_ctrl.cpp +++ b/sdk/components/pipette_module/pipette_ctrl_module_pm_ctrl.cpp @@ -75,6 +75,7 @@ void PipetteModule::_pump_move_to_x100nl_block(bool accurate, double x100nl, int int32_t pressure_uuid = 0; int32_t pressure_uuid_is_change = 0; int32_t pressure_uuid_is_change_cnt = 0; + int32_t pressure_lost_packet_num = 0; int32_t isbusy; while (true) { if (!smtpPressureStreamProcesser.isReady()) { @@ -82,12 +83,13 @@ void PipetteModule::_pump_move_to_x100nl_block(bool accurate, double x100nl, int continue; } - smtpPressureStreamProcesser.getPressure(&pressure, &pressure_uuid, &pressure_uuid_is_change); + smtpPressureStreamProcesser.getPressure(&pressure, &pressure_uuid, &pressure_lost_packet_num, &pressure_uuid_is_change); if (pressure_uuid_is_change) { pressure_uuid_is_change_cnt = 0; ZLOGI(TAG, "pressure:%d (%d)", pressure, pressure_uuid); if (accurate && i == 0) { push_aspiration_pressure_sample_data(pressure); + for (int j = 0; j < pressure_lost_packet_num; j++) push_aspiration_pressure_sample_data(pressure); } } else { pressure_uuid_is_change_cnt++; @@ -102,7 +104,6 @@ void PipetteModule::_pump_move_to_x100nl_block(bool accurate, double x100nl, int m_thread.sleep(5); if (m_thread.getExitFlag()) throw zapp_thread_stoped_exception(); } - push_aspiration_pressure_sample_data(-1); // 结束标志 int32_t targetpos = x100nl * 100; int32_t after_pos = pump_read_pos_nl(); diff --git a/sdk/components/pipette_module/pipette_ctrl_module_test.cpp b/sdk/components/pipette_module/pipette_ctrl_module_test.cpp index 1214732..0f6458e 100644 --- a/sdk/components/pipette_module/pipette_ctrl_module_test.cpp +++ b/sdk/components/pipette_module/pipette_ctrl_module_test.cpp @@ -23,7 +23,7 @@ int32_t PipetteModule::pipette_test_pump_move_to_x100nl(int32_t x100nl, int32_t DO_IN_THREAD(m_smtp2.pump_set_back_clearance(0)); // 设置背隙为0 DO_IN_THREAD(m_smtp2.pump_set_io1_mode(0)); // lld输入高 - pump_move_by_x100nl_accurate_block(x100nl, vcfgcpyid); // + pump_move_to_x100nl_accurate_block(x100nl, vcfgcpyid); // m_state.asynchronous_result0 = m_last_pump_operation_diff_val; }); return 0; diff --git a/sdk/components/pipette_module/pipette_ctrl_module_utils.cpp b/sdk/components/pipette_module/pipette_ctrl_module_utils.cpp index a014de5..40cf313 100644 --- a/sdk/components/pipette_module/pipette_ctrl_module_utils.cpp +++ b/sdk/components/pipette_module/pipette_ctrl_module_utils.cpp @@ -120,6 +120,7 @@ void PipetteModule::push_aspiration_pressure_sample_data(int32_t pressure_val) { return; } // ZLOGI(TAG, "sample %2d pressure_val:%4d", aspiration_pressure_record_buf_num, pressure_val); + asp_pressure_cache[asp_pressure_cache_num] = pressure_val; asp_pressure_cache_num++; } diff --git a/sdk/components/sensors/smtp2_v2/smtp2_v2.cpp b/sdk/components/sensors/smtp2_v2/smtp2_v2.cpp index c42f0b6..1b4270a 100644 --- a/sdk/components/sensors/smtp2_v2/smtp2_v2.cpp +++ b/sdk/components/sensors/smtp2_v2/smtp2_v2.cpp @@ -260,9 +260,11 @@ int32_t SMTP2V2::pump_aspirate_plld(int32_t pressure_threshold, VelCfg* vcfg) { return ret; } - return runaction(true, "/1N2L%d,%dv%dc%dV%df1t%d,1f0R\r", // + // return runaction(true, "/1N2L%d,%dv%dc%dV%df1t%d,1f0R\r", // + // vcfg->acc, vcfg->dec, vcfg->vstart * 1000, vcfg->vstop * 1000, vcfg->vmax * 1000, // + // pressure_threshold); + return runaction(true, "/1N2L%d,%dv%dc%dV%dt%d,1R\r", // vcfg->acc, vcfg->dec, vcfg->vstart * 1000, vcfg->vstop * 1000, vcfg->vmax * 1000, // - // pressure_threshold); } int32_t SMTP2V2::pump_aspirate_plld_get_state(int32_t* detected) { diff --git a/sdk/components/sensors/smtp2_v2/smtp_pressure_stream_processer.hpp b/sdk/components/sensors/smtp2_v2/smtp_pressure_stream_processer.hpp index dc1e91b..8fdda79 100644 --- a/sdk/components/sensors/smtp2_v2/smtp_pressure_stream_processer.hpp +++ b/sdk/components/sensors/smtp2_v2/smtp_pressure_stream_processer.hpp @@ -37,15 +37,16 @@ class SmtpPressureStreamProcesser { m_is_ready_flag = true; } } - void getPressure(int32_t *pressure, int32_t *pressureuuid, int32_t *uuidIsChange) const { + void getPressure(int32_t *pressure, int32_t *pressureuuid, int32_t *lostpacket, int32_t *uuidIsChange) const { __disable_irq(); if (pressure) *pressure = m_pressure; if (pressureuuid) { if (*pressureuuid != m_pressure_uuid) { - if (uuidIsChange) *uuidIsChange = 1; + *uuidIsChange = 1; + *lostpacket = m_pressure_uuid - *pressureuuid - 1; *pressureuuid = m_pressure_uuid; } else { - if (uuidIsChange) *uuidIsChange = 0; + *uuidIsChange = 0; } } __enable_irq();