Browse Source

弹出tip会检查tip是否弹出成功

master
zhaohe 1 year ago
parent
commit
04dac1a9c1
  1. 8
      sdk/components/pipette_module/pipette_ctrl_module_v2.cpp
  2. 2
      sdk/components/sensors/smtp2_v2/smtp2_v2.cpp
  3. 4
      usrc/subboards/subboard10_hbot_v2/subboard10_hbot_v2.cpp

8
sdk/components/pipette_module/pipette_ctrl_module_v2.cpp

@ -218,11 +218,13 @@ int32_t PipetteModule::do_pipette_ctrl_init_device() {
}
int32_t PipetteModule::do_pipette_ctrl_put_tip() {
m_thread.stop();
creg.module_status = 1;
creg.module_status = 1;
creg.module_errorcode = 0;
m_thread.start(
[this]() { //
DO_IN_THREAD(do_put_tip_before_run());
DO_IN_THREAD(m_smtp2.pump_put_tip());
ZLOGI(TAG,"put tip");
while (true) {
if (!check_when_run()) break;
if (m_thread.getExitFlag()) break;
@ -242,8 +244,9 @@ int32_t PipetteModule::do_pipette_ctrl_put_tip() {
if (isbusy == 0) break;
m_thread.sleep(10);
m_thread.sleep(50);
}
ZLOGI(TAG,"put tip end");
},
[this]() { // exit fn
@ -734,6 +737,7 @@ int32_t PipetteModule::do_put_tip_before_run() {
creg.module_status = 1;
creg.module_errorcode = 0;
m_state.dul = 0;
return 0;
}
int32_t PipetteModule::after_run() {

2
sdk/components/sensors/smtp2_v2/smtp2_v2.cpp

@ -71,7 +71,7 @@ int32_t SMTP2V2::pump_set_vmax(int32_t vel) { return setstate(true, "/1N2V%dR\r"
int32_t SMTP2V2::pump_set_acc_and_dec(int32_t acc, int32_t dec) { return setstate(true, "/1L%d,%dR\r", acc, dec); }
int32_t SMTP2V2::pump_set_plld_start_delay(int32_t delay_ms) { return setstate(true, "/1T%dR\r", delay_ms); }
int32_t SMTP2V2::pump_put_tip() { return runaction(true, "/1E1R\r"); }
int32_t SMTP2V2::pump_put_tip() { return runaction(true, "/1E0R\r"); }
int32_t SMTP2V2::pump_init(int32_t v) { return runaction(true, "/1N2V%dZR\r", v * 319); }
int32_t SMTP2V2::pump_reset() {
_sendcmd(true, "/1!0R\r"); // 复位指令没有回执,所以这里只能使用方法_sendcmd

4
usrc/subboards/subboard10_hbot_v2/subboard10_hbot_v2.cpp

@ -92,8 +92,8 @@ void Subboard10HbotV2::initialize() {
#define LEVEL1_A 5
#define LEVEL2_A 15
#define START_AND_STOP_V 30
#define V1 200
#define START_AND_STOP_V 1
#define V1 100
xy_defaultcfg.robot_type = XYRobotCtrlModule::khbot;
xy_defaultcfg.one_circle_pulse = 7200;

Loading…
Cancel
Save