reset timeout

This commit is contained in:
murmur 2025-01-04 16:22:36 +08:00
parent 8238a11758
commit 3953957df5

View File

@ -365,7 +365,7 @@ uint32_t ReadPump2Reg(uint8_t id, uint16_t reg) {
uint8_t rxBuf[30] = {0};
uint16_t rxLen = 9;
uint8_t ret = readDataFromMotorValve(rxBuf, rxLen, READ_ACK_TIMEOUT*10);
uint8_t ret = readDataFromMotorValve(rxBuf, rxLen, READ_ACK_TIMEOUT);
if(memcmp(rxBuf,data,2) != 0) {
elog_hexdump("writeCMD", 16, data, sizeof(data));
log_e("READ ACK ERROR:[%s]", ackError[ret]);
@ -904,7 +904,7 @@ uint32_t ReadValve2InputReg(uint8_t id, uint16_t reg)
uint8_t rxBuf[30] = {0};
uint16_t rxLen = 9;
uint8_t hrst = readDataFromMotorValve(rxBuf, rxLen, READ_ACK_TIMEOUT*2);
uint8_t hrst = readDataFromMotorValve(rxBuf, rxLen, READ_ACK_TIMEOUT);
if(memcmp(rxBuf, data, 2) != 0) {
elog_hexdump("writeCMD", 16, data, sizeof(data));
log_e("READ ACK ERROR:[%s]", ackError[hrst]);
@ -1409,7 +1409,7 @@ void updateSystemStatus(void)
updateVPInfo();
updatePumpStatus();
updateValveStatus();
// dumpSystemStatus();
dumpSystemStatus();
}
/**
@ -1503,6 +1503,7 @@ static uint8_t HandleInit(void) {
// 3.协议要求内容为2个三通阀步进电机堵转找原点重复至少2次。
initBubbleSensor();
systemStatus.ds->initStatus = INIT_IN_PROGRESS;
systemStatus.rst = 0;
@ -1686,6 +1687,7 @@ static uint8_t HandlePumpStepControl(uint8_t *Buff, uint8_t len) {
uint8_t rst = systemStatus.rst;
int32_t step = (Buff[index*4]<<24) | (Buff[index*4+1]<<16) | (Buff[index*4+2]<<8) | Buff[index*4+3];
log_d("泵步进设置: %d[%d], %d",index, dp.pump[index].id, step);
StopPump(index);
SetPumpStepTarget(index, step);
StartPumpRelativeMove(index);
if(rst != systemStatus.rst) {