diff --git a/components/pipette_module/pipette_ctrl_module_v2.cpp b/components/pipette_module/pipette_ctrl_module_v2.cpp index 2ddbc65..724190c 100644 --- a/components/pipette_module/pipette_ctrl_module_v2.cpp +++ b/components/pipette_module/pipette_ctrl_module_v2.cpp @@ -288,7 +288,7 @@ int32_t PipetteModule::pipette_write_cmd_direct(uint8_t *tx, int32_t len, uint8_ return err::ksubdevice_overtime; } m_smtp2.getack((char *)rx, rxlen); - ZLOGI(TAG, "rxlen = %d", *rxlen); + // ZLOGI(TAG, "rxlen = %d", *rxlen); return 0; } @@ -316,12 +316,13 @@ void PipetteModule::push_snesor_sample_data(int32_t motor_pos, int32_t cap_val, return; } - ZLOGI(TAG, "sample mpos:%d cap:%d pressure_val:%d", motor_pos, cap_val, pressure_val); + ZLOGI(TAG, "sample %2d mpos:%2d cap:%4d pressure_val:%4d", capturedata_num, motor_pos, cap_val, pressure_val); capturedata_buf[capturedata_num].motor_pos = motor_pos; capturedata_buf[capturedata_num].cap_val = cap_val; capturedata_buf[capturedata_num].pressure_val = pressure_val; capturedata_num++; } +//高试管800 /******************************************************************************* * PRIVATE * diff --git a/components/pipette_module/pipette_ctrl_module_v2.hpp b/components/pipette_module/pipette_ctrl_module_v2.hpp index 3fa4b2a..82eaca9 100644 --- a/components/pipette_module/pipette_ctrl_module_v2.hpp +++ b/components/pipette_module/pipette_ctrl_module_v2.hpp @@ -14,7 +14,7 @@ */ namespace iflytop { -#define PIPETTEMODULE_SAMPLE_BUF_SIZE 100 +#define PIPETTEMODULE_SAMPLE_BUF_SIZE 300 class PipetteModule : public ZIModule, public ZIPipetteCtrlModule { ENABLE_MODULE(PipetteModule, kpipette_ctrl_module, PC_VERSION); diff --git a/components/sensors/smtp2_v2/smtp2_v2.cpp b/components/sensors/smtp2_v2/smtp2_v2.cpp index e20083b..1d62b13 100644 --- a/components/sensors/smtp2_v2/smtp2_v2.cpp +++ b/components/sensors/smtp2_v2/smtp2_v2.cpp @@ -11,7 +11,7 @@ using namespace smtp2; #define TAG "SMTP2" #define OVERTIME 100 -#define DUMP_HEX 1 +#define DUMP_HEX 0 #define SEND_CMD(fmt, ...) sendcmd(true, "/1" fmt "R\r", ##__VA_ARGS__); #define SEND_CMD_NLOG(fmt, ...) sendcmd(false, "/1" fmt "R\r", ##__VA_ARGS__); @@ -42,7 +42,7 @@ int32_t SMTP2V2::pump_get_state(int32_t* isbusy) { } int32_t SMTP2V2::pump_get_state_as_int(int32_t state_index, int32_t* val) { size_t rxlen = 0; - int ret = SEND_CMD("/1?%d\r", state_index); + int ret = SEND_CMD("?%d\r", state_index); if (ret != 0) { return ret; } @@ -164,7 +164,7 @@ bool SMTP2V2::sendcmd_auto_retry(bool dump, const char* cmd) { bool SMTP2V2::_sendcmd(bool dump, const char* cmd) { m_rxNum = 0; -#ifdef DUMP_HEX +#if DUMP_HEX if (dump) { ZLOGI(TAG, "tx:%s", cmd); } @@ -172,7 +172,7 @@ bool SMTP2V2::_sendcmd(bool dump, const char* cmd) { bool ret = _sendcmd_dma(cmd); -#ifdef DUMP_HEX +#if DUMP_HEX if (dump) { ZLOGI(TAG, "rx:%s", m_rxbuf); } diff --git a/components/tmc/ic/ztmc5130.cpp b/components/tmc/ic/ztmc5130.cpp index 8d1ec2c..ee2adac 100644 --- a/components/tmc/ic/ztmc5130.cpp +++ b/components/tmc/ic/ztmc5130.cpp @@ -212,8 +212,10 @@ void TMC51X0::moveToEnd(int32_t direction, uint32_t velocityMax) { } void TMC51X0::moveBy(int32_t relativePosition, uint32_t velocityMax) { // determine actual position and add numbers of ticks to move - relativePosition += readInt(TMC5130_XACTUAL); - moveTo(relativePosition, velocityMax); + + int32_t pos = getXACTUAL(); + int32_t target = pos + relativePosition; + moveTo(target, velocityMax); } uint32_t TMC51X0::readXTARGET() { return readInt(TMC5130_XTARGET); } uint32_t TMC51X0::haspassedms(uint32_t now, uint32_t last) {