fix TIMEOUT bug

This commit is contained in:
CSSC-WORK\murmur 2025-01-03 08:18:53 +08:00
parent b64f12b88e
commit 057a7706a7

View File

@ -328,7 +328,7 @@ uint16_t ReadPump1Reg(uint8_t id, uint16_t reg) {
// 小端序填充
memcpy(&data[6], &crc, 2);
writeCMD(data, 8);
transDataToHost(data, 8);
uint8_t rxBuf[30] = {0};
uint16_t rxLen = 7;
uint8_t ret = readDataFromMotorValve(rxBuf, rxLen, READ_ACK_TIMEOUT);
@ -358,7 +358,7 @@ uint32_t ReadPump2Reg(uint8_t id, uint16_t reg) {
// 小端序填充
memcpy(&data[6], &crc, 2);
writeCMD(data, sizeof(data));
transDataToMotorValve(data, sizeof(data));
uint8_t rxBuf[30] = {0};
uint16_t rxLen = 9;
uint8_t ret = readDataFromMotorValve(rxBuf, rxLen, READ_ACK_TIMEOUT*10);