diff --git a/sdk/components/pipette_module/base/pipette_cfg.hpp b/sdk/components/pipette_module/base/pipette_cfg.hpp index c36d463..6b9bee3 100644 --- a/sdk/components/pipette_module/base/pipette_cfg.hpp +++ b/sdk/components/pipette_module/base/pipette_cfg.hpp @@ -34,6 +34,8 @@ typedef struct { */ int32_t tip_type; int32_t tip_length; // tip长度 + + int32_t mark; // 结构体最后一个数值,设置9973,用于保证单片机端和java端均正确更新了枚举 } platinfo_t; typedef enum { @@ -45,6 +47,7 @@ typedef enum { kplatinfo_transform_pos, kplatinfo_tip_type, kplatinfo_tip_length, + kplatinfo_mark, } platinfo_index_t; /*********************************************************************************************************************** @@ -67,6 +70,7 @@ typedef struct { int32_t io_trigger_append_distance; // int32_t pos_devi_tolerance; // int32_t mres; // + int32_t mark; // 结构体最后一个数值,设置9973,用于保证单片机端和java端均正确更新了枚举 } zm_bcfg_t; typedef enum { @@ -86,6 +90,7 @@ typedef enum { kzm_bcfg_io_trigger_append_distance, kzm_bcfg_pos_devi_tolerance, kzm_bcfg_mres, + kzm_bcfg_mark, } zm_bcfg_index_t; /*********************************************************************************************************************** @@ -93,9 +98,11 @@ typedef enum { ***********************************************************************************************************************/ typedef struct { int32_t pad; + int32_t mark; // 结构体最后一个数值,设置9973,用于保证单片机端和java端均正确更新了枚举 } pump_bcfg_t; typedef enum { kpm_bcfg_pad, + kpm_bcfg_mark, } pm_bcfg_index_t; /*********************************************************************************************************************** @@ -110,6 +117,7 @@ typedef struct { int32_t d1; int32_t vstop; int32_t vmax; + int32_t mark; // 结构体最后一个数值,设置9973,用于保证单片机端和java端均正确更新了枚举 } zm_vcfg_t; typedef enum { @@ -121,6 +129,7 @@ typedef enum { kzm_vcfg_d1, kzm_vcfg_vstop, kzm_vcfg_vmax, + kzm_vcfg_mark, } zm_vcfg_index_t; /*********************************************************************************************************************** @@ -132,6 +141,7 @@ typedef struct { int32_t vstart; int32_t vstop; int32_t vmax; + int32_t mark; // 结构体最后一个数值,设置9973,用于保证单片机端和java端均正确更新了枚举 } pm_vcfg_t; typedef enum { @@ -140,6 +150,7 @@ typedef enum { kpm_vcfg_vstart, // 启动速度 ul/s (0...319) kpm_vcfg_vstop, // 停止速度 ul/s (0...319) kpm_vcfg_vmax, // 最大速度 ul/s (0...2552) + kpm_vcfg_mark, // 结构体最后一个数值,设置9973,用于保证单片机端和java端均正确更新了枚举 } pm_vcfg_index_t; /*********************************************************************************************************************** @@ -158,6 +169,7 @@ typedef struct { int32_t fix_aspiration_depth; // 固定吸液深度((0.1mm),当lld失能时,移液枪先移动到这个位置,然后开始吸液 int32_t llf_vconvert_coneff; // 液面跟随转换系数 0.0001 llf_zm_vel = aspiration_pm_vel * llf_vconvert_coneff * 0.0001 int32_t pierce_depth; // 穿刺深度(0.1mm),用于刺破容器防尘膜 + int32_t mark; // 结构体最后一个数值,设置9973,用于保证单片机端和java端均正确更新了枚举 } container_info_t; typedef enum { @@ -173,6 +185,7 @@ typedef enum { kcontainer_info_fix_aspiration_depth, kcontainer_info_llf_vconvert_coneff, kcontainer_info_pierce_depth, + kcontainer_info_mark, } container_info_index_t; /*********************************************************************************************************************** @@ -261,6 +274,7 @@ typedef struct { // 混匀pm速率 // int32_t mix_pm_vindex; // 混匀时泵机速率配置 + int32_t mark; // 结构体最后一个数值,设置9973,用于保证单片机端和java端均正确更新了枚举 } liquid_info_t; typedef enum { @@ -281,5 +295,5 @@ typedef enum { kliquid_info_transport_volume, kliquid_info_transport_volume_pm_vindex, kliquid_info_mix_pm_vindex, - + kliquid_info_mark, } liquid_info_index_t; \ No newline at end of file diff --git a/sdk/components/pipette_module/pipette_ctrl_module.cpp b/sdk/components/pipette_module/pipette_ctrl_module.cpp index 211629c..453c86f 100644 --- a/sdk/components/pipette_module/pipette_ctrl_module.cpp +++ b/sdk/components/pipette_module/pipette_ctrl_module.cpp @@ -114,6 +114,8 @@ int32_t PipetteModule::pipette_set_zmbcfg(zm_bcfg_index_t index, int32_t val) { SET_CFG(kzm_bcfg_io_trigger_append_distance, zmbcfg.io_trigger_append_distance, val); SET_CFG(kzm_bcfg_pos_devi_tolerance, zmbcfg.pos_devi_tolerance, val); SET_CFG(kzm_bcfg_mres, zmbcfg.mres, val); + SET_CFG(kzm_bcfg_mark, zmbcfg.mark, val); + default: { ZLOGE(TAG, "pipette_set_zmbcfg index %d out of range", index); return err::kparam_out_of_range; @@ -140,6 +142,7 @@ int32_t PipetteModule::pipette_get_zmbcfg(zm_bcfg_index_t index, int32_t *val) { GET_CFG(kzm_bcfg_io_trigger_append_distance, zmbcfg.io_trigger_append_distance, val); GET_CFG(kzm_bcfg_pos_devi_tolerance, zmbcfg.pos_devi_tolerance, val); GET_CFG(kzm_bcfg_mres, zmbcfg.mres, val); + GET_CFG(kzm_bcfg_mark, zmbcfg.mark, val); default: { ZLOGE(TAG, "pipette_get_zmbcfg index %d out of range", index); return err::kparam_out_of_range; @@ -150,6 +153,7 @@ int32_t PipetteModule::pipette_get_zmbcfg(zm_bcfg_index_t index, int32_t *val) { int32_t PipetteModule::pipette_set_pmbcfg(pm_bcfg_index_t index, int32_t val) { switch (index) { SET_CFG(kpm_bcfg_pad, pm_base_cfg.pad, val); + SET_CFG(kpm_bcfg_mark, pm_base_cfg.mark, val); default: { ZLOGE(TAG, "pipette_set_pmbcfg index %d out of range", index); return err::kparam_out_of_range; @@ -160,6 +164,7 @@ int32_t PipetteModule::pipette_set_pmbcfg(pm_bcfg_index_t index, int32_t val) { int32_t PipetteModule::pipette_get_pmbcfg(pm_bcfg_index_t index, int32_t *val) { switch (index) { GET_CFG(kpm_bcfg_pad, pm_base_cfg.pad, val); + GET_CFG(kpm_bcfg_mark, pm_base_cfg.mark, val); default: { ZLOGE(TAG, "pipette_get_pmbcfg index %d out of range", index); return err::kparam_out_of_range; @@ -184,6 +189,7 @@ int32_t PipetteModule::pipette_set_platinfo(int32_t cpyid, platinfo_index_t inde SET_CFG(kplatinfo_transform_pos, platinfo->transform_pos, val); SET_CFG(kplatinfo_tip_type, platinfo->tip_type, val); SET_CFG(kplatinfo_tip_length, platinfo->tip_length, val); + SET_CFG(kplatinfo_mark, platinfo->mark, val); default: { ZLOGE(TAG, "pipette_set_platinfo index %d out of range", index); return err::kparam_out_of_range; @@ -202,10 +208,12 @@ int32_t PipetteModule::pipette_get_platinfo(int32_t cpyid, platinfo_index_t inde GET_CFG(kplatinfo_work_ref_pos, platinfo->work_ref_pos, val); GET_CFG(kplatinfo_tip_picking_pos, platinfo->tip_picking_pos, val); GET_CFG(kplatinfo_tip_picking_search_range, platinfo->tip_picking_search_range, val); + GET_CFG(kplatinfo_tip_picking_append_distance, platinfo->tip_picking_append_distance, val); GET_CFG(kplatinfo_tip_deposit_pos, platinfo->tip_deposit_pos, val); GET_CFG(kplatinfo_transform_pos, platinfo->transform_pos, val); GET_CFG(kplatinfo_tip_type, platinfo->tip_type, val); GET_CFG(kplatinfo_tip_length, platinfo->tip_length, val); + GET_CFG(kplatinfo_mark, platinfo->mark, val); default: { ZLOGE(TAG, "pipette_get_platinfo index %d out of range", index); return err::kparam_out_of_range; @@ -229,6 +237,7 @@ int32_t PipetteModule::pipette_set_zmvcfg(int32_t cpyid, zm_vcfg_index_t index, SET_CFG(kzm_vcfg_d1, cfg->d1, val); SET_CFG(kzm_vcfg_vstop, cfg->vstop, val); SET_CFG(kzm_vcfg_vmax, cfg->vmax, val); + SET_CFG(kzm_vcfg_mark, cfg->mark, val); default: { ZLOGE(TAG, "pipette_set_zmvcfg index %d out of range", index); return err::kparam_out_of_range; @@ -251,6 +260,7 @@ int32_t PipetteModule::pipette_get_zmvcfg(int32_t cpyid, zm_vcfg_index_t index, GET_CFG(kzm_vcfg_d1, cfg->d1, val); GET_CFG(kzm_vcfg_vstop, cfg->vstop, val); GET_CFG(kzm_vcfg_vmax, cfg->vmax, val); + GET_CFG(kzm_vcfg_mark, cfg->mark, val); default: { ZLOGE(TAG, "pipette_get_zmvcfg index %d out of range", index); return err::kparam_out_of_range; @@ -271,6 +281,7 @@ int32_t PipetteModule::pipette_set_pmvcfg(int32_t cpyid, pm_vcfg_index_t index, SET_CFG(kpm_vcfg_vstart, cfg->vstart, val); SET_CFG(kpm_vcfg_vstop, cfg->vstop, val); SET_CFG(kpm_vcfg_vmax, cfg->vmax, val); + SET_CFG(kpm_vcfg_mark, cfg->mark, val); default: { ZLOGE(TAG, "pipette_set_pmvcfg index %d out of range", index); return err::kparam_out_of_range; @@ -290,6 +301,7 @@ int32_t PipetteModule::pipette_get_pmvcfg(int32_t cpyid, pm_vcfg_index_t index, GET_CFG(kpm_vcfg_vstart, cfg->vstart, val); GET_CFG(kpm_vcfg_vstop, cfg->vstop, val); GET_CFG(kpm_vcfg_vmax, cfg->vmax, val); + GET_CFG(kpm_vcfg_mark, cfg->mark, val); default: { ZLOGE(TAG, "pipette_get_pmvcfg index %d out of range", index); return err::kparam_out_of_range; @@ -317,6 +329,7 @@ int32_t PipetteModule::pipette_set_container_info(int32_t cpyid, container_info_ SET_CFG(kcontainer_info_fix_aspiration_depth, cfg->fix_aspiration_depth, val); SET_CFG(kcontainer_info_llf_vconvert_coneff, cfg->llf_vconvert_coneff, val); SET_CFG(kcontainer_info_pierce_depth, cfg->pierce_depth, val); + SET_CFG(kcontainer_info_mark, cfg->mark, val); default: { ZLOGE(TAG, "pipette_set_container_info index %d out of range", index); @@ -345,6 +358,7 @@ int32_t PipetteModule::pipette_get_container_info(int32_t cpyid, container_info_ GET_CFG(kcontainer_info_fix_aspiration_depth, cfg->fix_aspiration_depth, val); GET_CFG(kcontainer_info_llf_vconvert_coneff, cfg->llf_vconvert_coneff, val); GET_CFG(kcontainer_info_pierce_depth, cfg->pierce_depth, val); + GET_CFG(kcontainer_info_mark, cfg->mark, val); default: { ZLOGE(TAG, "pipette_get_container_info index %d out of range", index); return err::kparam_out_of_range; @@ -377,6 +391,7 @@ int32_t PipetteModule::pipette_set_liquid_info(int32_t cpyid, liquid_info_index_ SET_CFG(kliquid_info_transport_volume, cfg->transport_volume, val); SET_CFG(kliquid_info_transport_volume_pm_vindex, cfg->transport_volume_pm_vindex, val); SET_CFG(kliquid_info_mix_pm_vindex, cfg->mix_pm_vindex, val); + SET_CFG(kliquid_info_mark, cfg->mark, val); default: { ZLOGE(TAG, "pipette_set_liquid_info index %d out of range", index); @@ -410,7 +425,7 @@ int32_t PipetteModule::pipette_get_liquid_info(int32_t cpyid, liquid_info_index_ GET_CFG(kliquid_info_transport_volume, cfg->transport_volume, val); GET_CFG(kliquid_info_transport_volume_pm_vindex, cfg->transport_volume_pm_vindex, val); GET_CFG(kliquid_info_mix_pm_vindex, cfg->mix_pm_vindex, val); - + GET_CFG(kliquid_info_mark, cfg->mark, val); default: { ZLOGE(TAG, "pipette_get_liquid_info index %d out of range", index); return err::kparam_out_of_range; @@ -1512,22 +1527,23 @@ void PipetteModule::parameter_init() { /*********************************************************************************************************************** * zmbcfg * ***********************************************************************************************************************/ - zmbcfg.shaft = 0; // Z轴电机运动方向调整 - zmbcfg.one_circle_pulse = 80; // 电子齿轮比-分子 - zmbcfg.one_circle_pulse_denominator = 1; // 电子齿轮比-分母 - zmbcfg.ihold = 7; // - zmbcfg.irun = 7; // - zmbcfg.iholddelay = 10; // - zmbcfg.iglobalscaler = 0; // - zmbcfg.min_d = 0; // - zmbcfg.max_d = 0; // - zmbcfg.tzerowait = 0; // - zmbcfg.enc_resolution = 0; // - zmbcfg.enable_enc = 0; // - zmbcfg.dzero = 92; // - zmbcfg.io_trigger_append_distance = 20; // - zmbcfg.pos_devi_tolerance = 20; // - zmbcfg.mres = 0; // + zmbcfg.shaft = 0; // Z轴电机运动方向调整 + zmbcfg.one_circle_pulse = 80; // 电子齿轮比-分子 + zmbcfg.one_circle_pulse_denominator = 1; // 电子齿轮比-分母 + zmbcfg.ihold = 7; // + zmbcfg.irun = 7; // + zmbcfg.iholddelay = 10; // + zmbcfg.iglobalscaler = 0; // + zmbcfg.min_d = 0; // + zmbcfg.max_d = 0; // + zmbcfg.tzerowait = 0; // + zmbcfg.enc_resolution = 0; // + zmbcfg.enable_enc = 0; // + zmbcfg.dzero = 92; // + zmbcfg.io_trigger_append_distance = 20; // + zmbcfg.pos_devi_tolerance = 20; // + zmbcfg.mres = 0; // + zmbcfg.mark = 9973; // /*********************************************************************************************************************** * pm_base_cfg * ***********************************************************************************************************************/ @@ -1538,13 +1554,9 @@ void PipetteModule::parameter_init() { ***********************************************************************************************************************/ memset_int32_t((int32_t *)&m_platinfo[0], -1, sizeof(m_platinfo) / 4); memset_int32_t((int32_t *)&m_platinfo[0], 0, sizeof(m_platinfo[0]) / 4); - m_platinfo[0].work_ref_pos = 0; - m_platinfo[0].tip_picking_pos = 0; - m_platinfo[0].tip_picking_search_range = 0; - m_platinfo[0].tip_deposit_pos = 0; - // m_platinfo[0].transform_pos = 0; // m_platinfo[0].tip_type = smtp2::TS200UL; - m_platinfo[0].tip_length = 500; // 50mm + m_platinfo[0].tip_length = 500; // 50mm + m_platinfo[0].mark = 9973; // /*********************************************************************************************************************** * m_zm_vcfg * @@ -1559,6 +1571,7 @@ void PipetteModule::parameter_init() { m_zm_vcfg[kzm_v_default].d1 = 200; m_zm_vcfg[kzm_v_default].vstop = 400; m_zm_vcfg[kzm_v_default].vmax = 1200; + m_zm_vcfg[kzm_v_default].mark = 9973; m_zm_vcfg[kzm_v_move_to_zero].vmax = 600; m_zm_vcfg[kzm_v_look_zero_edge].vmax = 100; @@ -1576,8 +1589,9 @@ void PipetteModule::parameter_init() { m_pm_vcfg[kpm_v_default].dec = 1; m_pm_vcfg[kpm_v_default].vstart = 100; m_pm_vcfg[kpm_v_default].vstop = 50; - m_pm_vcfg[kpm_v_default].vmax = 2500; + m_pm_vcfg[kpm_v_default].mark = 9973; + // m_pm_vcfg[kpm_v_default].vmax = 2500; m_pm_vcfg[kpm_v_slow_lv1].vmax = 5; m_pm_vcfg[kpm_v_slow_lv2].vmax = 10; @@ -1593,6 +1607,7 @@ void PipetteModule::parameter_init() { memset_int32_t((int32_t *)&m_container_info[0], -1, sizeof(m_container_info) / 4); memset_int32_t((int32_t *)&m_container_info[0], 0, sizeof(m_container_info[0]) / 4); m_container_info[0].leaving_height = 150; + m_container_info[0].mark = 9973; /*********************************************************************************************************************** * m_liquid_info * @@ -1618,4 +1633,5 @@ void PipetteModule::parameter_init() { m_liquid_info[0].transport_volume = 50; // 50(x100nl) == 5ul m_liquid_info[0].transport_volume_pm_vindex = kpm_v_slow_lv2; m_liquid_info[0].mix_pm_vindex = kpm_v_max; + m_liquid_info[0].mark = 9973; }