fix TIMEOUT bug
This commit is contained in:
parent
b64f12b88e
commit
057a7706a7
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user