|
|
@ -146,12 +146,12 @@ int32_t PipetteModule::pipette_mlld(int32_t zdpos, int32_t c_threshold, int32_t |
|
|
|
int32_t PipetteModule::pipette_aspirate(int32_t ul) { |
|
|
|
ZLOGI(TAG, "pipette_aspirate %d", ul); |
|
|
|
if (creg.module_status == 1) return err::kdevice_is_busy; |
|
|
|
return do_pipette_aspirate(ul); |
|
|
|
return do_pipette_aspirate(ul, 0, 0); |
|
|
|
}; |
|
|
|
int32_t PipetteModule::pipette_distribut(int32_t ul) { |
|
|
|
ZLOGI(TAG, "pipette_distribut %d", ul); |
|
|
|
if (creg.module_status == 1) return err::kdevice_is_busy; |
|
|
|
return do_pipette_distribut(ul); |
|
|
|
return do_pipette_distribut(ul, 0, 0); |
|
|
|
}; |
|
|
|
int32_t PipetteModule::pipette_shake_up(int32_t ul, int32_t times) { |
|
|
|
ZLOGI(TAG, "pipette_shake_up %d %d", ul, times); |
|
|
@ -164,6 +164,21 @@ int32_t PipetteModule::pipette_lld_is_detect_liquid(int32_t *detect_liquid) { / |
|
|
|
return 0; |
|
|
|
} |
|
|
|
|
|
|
|
int32_t PipetteModule::pipette_aspirate_llf(int32_t ul, int32_t dpos, int32_t zmotor_v) { //
|
|
|
|
ZLOGI(TAG, "pipette_aspirate_llf %d %d %d", ul, dpos, zmotor_v); |
|
|
|
if (creg.module_status == 1) return err::kdevice_is_busy; |
|
|
|
return do_pipette_aspirate(ul, dpos, zmotor_v); |
|
|
|
} |
|
|
|
int32_t PipetteModule::pipette_distribut_llf(int32_t ul, int32_t dpos, int32_t zmotor_v) { //
|
|
|
|
ZLOGI(TAG, "pipette_distribut_llf %d %d %d", ul, dpos, zmotor_v); |
|
|
|
if (creg.module_status == 1) return err::kdevice_is_busy; |
|
|
|
return do_pipette_distribut(ul, dpos, zmotor_v); |
|
|
|
} |
|
|
|
int32_t PipetteModule::pipette_shake_up_llf(int32_t ul, int32_t dpos, int32_t zmotor_v, int32_t times) { //
|
|
|
|
ZLOGI(TAG, "pipette_shake_up_llf %d %d %d %d", ul, dpos, zmotor_v, times); |
|
|
|
return 0; |
|
|
|
} |
|
|
|
|
|
|
|
/***********************************************************************************************************************
|
|
|
|
* ACTION * |
|
|
|
***********************************************************************************************************************/ |
|
|
@ -467,7 +482,7 @@ int32_t PipetteModule::do_pipette_lld(lld_mode_t mode, int32_t zdpos, int32_t c_ |
|
|
|
); |
|
|
|
return 0; |
|
|
|
} |
|
|
|
int32_t PipetteModule::do_pipette_aspirate(int32_t ul) { |
|
|
|
int32_t PipetteModule::do_pipette_aspirate(int32_t ul, int32_t dpos, int32_t zmotor_v) { |
|
|
|
/**
|
|
|
|
* @brief |
|
|
|
*/ |
|
|
@ -481,8 +496,13 @@ int32_t PipetteModule::do_pipette_aspirate(int32_t ul) { |
|
|
|
m_thread.stop(); |
|
|
|
creg.module_status = 1; |
|
|
|
m_thread.start( |
|
|
|
[this, ul]() { //
|
|
|
|
[this, ul, dpos, zmotor_v]() { //
|
|
|
|
auto submotor = m_zmotor->getMotor(); |
|
|
|
|
|
|
|
DO_IN_THREAD(befor_run()); |
|
|
|
if (dpos != 0) { |
|
|
|
submotor->moveBy(dpos, zmotor_v); |
|
|
|
} |
|
|
|
DO_IN_THREAD(m_smtp2.pump_aspirate(m_config.aspirate_distribut_pump_vel, ul)); |
|
|
|
while (true) { |
|
|
|
if (!check_when_run()) break; |
|
|
@ -498,6 +518,7 @@ int32_t PipetteModule::do_pipette_aspirate(int32_t ul) { |
|
|
|
[this]() { // exit fn
|
|
|
|
after_run(); |
|
|
|
m_smtp2.pump_stop(); |
|
|
|
m_zmotor->getMotor()->stop(); |
|
|
|
m_state.load_val_ul = m_state.load_val_ul + m_state.dul; |
|
|
|
if (m_state.load_val_ul < 0) { |
|
|
|
m_state.load_val_ul = 0; |
|
|
@ -509,7 +530,7 @@ int32_t PipetteModule::do_pipette_aspirate(int32_t ul) { |
|
|
|
); |
|
|
|
return 0; |
|
|
|
} |
|
|
|
int32_t PipetteModule::do_pipette_distribut(int32_t ul) { |
|
|
|
int32_t PipetteModule::do_pipette_distribut(int32_t ul, int32_t dpos, int32_t zmotor_v) { |
|
|
|
/**
|
|
|
|
* @brief |
|
|
|
*/ |
|
|
@ -519,9 +540,13 @@ int32_t PipetteModule::do_pipette_distribut(int32_t ul) { |
|
|
|
m_thread.stop(); |
|
|
|
creg.module_status = 1; |
|
|
|
m_thread.start( |
|
|
|
[this, ul]() { //
|
|
|
|
[this, ul, dpos, zmotor_v]() { //
|
|
|
|
auto submotor = m_zmotor->getMotor(); |
|
|
|
DO_IN_THREAD(befor_run()); |
|
|
|
DO_IN_THREAD(m_smtp2.pump_distribut(m_config.aspirate_distribut_pump_vel, ul)); |
|
|
|
if (dpos != 0) { |
|
|
|
submotor->moveBy(-dpos, zmotor_v); |
|
|
|
} |
|
|
|
while (true) { |
|
|
|
if (!check_when_run()) break; |
|
|
|
if (m_thread.getExitFlag()) break; |
|
|
@ -536,6 +561,7 @@ int32_t PipetteModule::do_pipette_distribut(int32_t ul) { |
|
|
|
[this]() { // exit fn
|
|
|
|
after_run(); |
|
|
|
m_smtp2.pump_stop(); |
|
|
|
m_zmotor->getMotor()->stop(); |
|
|
|
|
|
|
|
m_state.load_val_ul = m_state.load_val_ul + m_state.dul; |
|
|
|
if (m_state.load_val_ul < 0) { |
|
|
|