From 741d7ebd75fce1df3a0bb1a11bf5774071b95566 Mon Sep 17 00:00:00 2001 From: zhaohe Date: Thu, 19 Sep 2024 16:13:34 +0800 Subject: [PATCH] update --- a8000_subboard.launch | 29 ++++---------- .../pipette_module/pipette_ctrl_module_v2.cpp | 13 +++++++ usrc/main.cpp | 2 + .../subboard80_cliptip/subboard80_cliptip.cpp | 44 +++++++++++----------- 4 files changed, 44 insertions(+), 44 deletions(-) diff --git a/a8000_subboard.launch b/a8000_subboard.launch index ead704b..a42d881 100644 --- a/a8000_subboard.launch +++ b/a8000_subboard.launch @@ -5,7 +5,7 @@ - + @@ -24,22 +24,7 @@ - - - - - - - - - - - - - - - - + @@ -47,20 +32,20 @@ - + - + - + - + @@ -93,6 +78,6 @@ - + diff --git a/sdk/components/pipette_module/pipette_ctrl_module_v2.cpp b/sdk/components/pipette_module/pipette_ctrl_module_v2.cpp index 0e25952..a71fa29 100644 --- a/sdk/components/pipette_module/pipette_ctrl_module_v2.cpp +++ b/sdk/components/pipette_module/pipette_ctrl_module_v2.cpp @@ -769,6 +769,17 @@ void PipetteModuleV2::push_snesor_sample_data(int32_t motor_pos, int32_t cap_val capturedata_num++; } +int32_t PipetteModuleV2::pipette_get_sensor_sample_data(int32_t index, int32_t *motor_pos, int32_t *cval, int32_t *pval) { + if (index > capturedata_num) return err::kparam_out_of_range; + *motor_pos = capturedata_buf[index].motor_pos; + *cval = capturedata_buf[index].cap_val; + *pval = capturedata_buf[index].pressure_val; + return 0; +} +int32_t PipetteModuleV2::pipette_get_sensor_sample_data_num(int32_t *num) { + *num = capturedata_num; + return 0; +} /*********************************************************************************************************************** * SLICE * ***********************************************************************************************************************/ @@ -799,6 +810,8 @@ int32_t PipetteModuleV2::bfcall(int32_t cmdid, uint8_t *param, int32_t len) { if (cmdid == kpipette_aspirate_infer_pressure) goto check; if (cmdid == kpipette_aspirate_infer_eigen_time) goto check; + return 0; + check: if (!m_state.enable) { return err::kstep_motor_not_enable; diff --git a/usrc/main.cpp b/usrc/main.cpp index 1d5a458..784643c 100644 --- a/usrc/main.cpp +++ b/usrc/main.cpp @@ -41,6 +41,8 @@ void StartDefaultTask(void const* argument) { umain(); } int32_t deviceId = 0; + + static void board_init() { switch (deviceId) { case 10: diff --git a/usrc/subboards/subboard80_cliptip/subboard80_cliptip.cpp b/usrc/subboards/subboard80_cliptip/subboard80_cliptip.cpp index 4e909c5..10bbad9 100644 --- a/usrc/subboards/subboard80_cliptip/subboard80_cliptip.cpp +++ b/usrc/subboards/subboard80_cliptip/subboard80_cliptip.cpp @@ -66,28 +66,28 @@ void Subboard80Cliptip::initialize() { input[1].initAsInput(MOTOR1_REFR, ZGPIO::kMode_nopull, ZGPIO::kIRQ_noIrq, MOTOR1_REFR_MIRROR); PipetteModuleV2::config_t cfg = {0}; PipetteModuleV2::create_default_cfg(&cfg); - cfg.motor_shaft = MOTOR1_MOTOR_SHAFT; - cfg.motor_one_circle_pulse = MOTOR1_MOTOR_ONE_CIRCLE_PULSE; - cfg.motor_one_circle_pulse_denominator = MOTOR1_MOTOR_ONE_CIRCLE_PULSE_DENOMINATOR; - cfg.motor_ihold = MOTOR1_STEPMOTOR_IHOLD; - cfg.motor_irun = MOTOR1_STEPMOTOR_IRUN; - cfg.motor_iholddelay = MOTOR1_STEPMOTOR_IHOLDDELAY; - cfg.motor_iglobalscaler = MOTOR1_STEPMOTOR_IGLOBALSCALER; - cfg.motor_default_velocity = MOTOR1_MOTOR_DEFAULT_VELOCITY; - cfg.motor_min_d = MOTOR1_MIN_D; - cfg.motor_max_d = MOTOR1_MAX_D; - cfg.motor_run_to_zero_speed = MOTOR1_MOTOR_RUN_TO_ZERO_SPEED; - cfg.motor_look_zero_edge_speed = MOTOR1_MOTOR_LOOK_ZERO_EDGE_SPEED; - cfg.motor_vstart = MOTOR1_MOTOR_VSTART; - cfg.motor_a1 = MOTOR1_MOTOR_A1; - cfg.motor_amax = MOTOR1_MOTOR_AMAX; - cfg.motor_v1 = MOTOR1_MOTOR_V1; - cfg.motor_dmax = MOTOR1_MOTOR_DMAX; - cfg.motor_d1 = MOTOR1_MOTOR_D1; - cfg.motor_vstop = MOTOR1_MOTOR_VSTOP; - cfg.motor_tzerowait = MOTOR1_MOTOR_TZEROWAIT; - cfg.motor_enc_resolution = MOTOR1_ENC_RESOLUTION; - cfg.motor_enable_enc = MOTOR1_ENABLE_ENC_RESOLUTION; + cfg.zm_shaft = MOTOR1_MOTOR_SHAFT; + cfg.zm_one_circle_pulse = MOTOR1_MOTOR_ONE_CIRCLE_PULSE; + cfg.zm_one_circle_pulse_denominator = MOTOR1_MOTOR_ONE_CIRCLE_PULSE_DENOMINATOR; + cfg.zm_ihold = MOTOR1_STEPMOTOR_IHOLD; + cfg.zm_irun = MOTOR1_STEPMOTOR_IRUN; + cfg.zm_iholddelay = MOTOR1_STEPMOTOR_IHOLDDELAY; + cfg.zm_iglobalscaler = MOTOR1_STEPMOTOR_IGLOBALSCALER; + cfg.zm_default_velocity = MOTOR1_MOTOR_DEFAULT_VELOCITY; + cfg.zm_min_d = MOTOR1_MIN_D; + cfg.zm_max_d = MOTOR1_MAX_D; + cfg.zm_run_to_zero_speed = MOTOR1_MOTOR_RUN_TO_ZERO_SPEED; + cfg.zm_look_zero_edge_speed = MOTOR1_MOTOR_LOOK_ZERO_EDGE_SPEED; + cfg.zm_vstart = MOTOR1_MOTOR_VSTART; + cfg.zm_a1 = MOTOR1_MOTOR_A1; + cfg.zm_amax = MOTOR1_MOTOR_AMAX; + cfg.zm_v1 = MOTOR1_MOTOR_V1; + cfg.zm_dmax = MOTOR1_MOTOR_DMAX; + cfg.zm_d1 = MOTOR1_MOTOR_D1; + cfg.zm_vstop = MOTOR1_MOTOR_VSTOP; + cfg.zm_tzerowait = MOTOR1_MOTOR_TZEROWAIT; + cfg.zm_enc_resolution = MOTOR1_ENC_RESOLUTION; + cfg.zm_enable_enc = MOTOR1_ENABLE_ENC_RESOLUTION; // cfg.limit_ul = 30;