From 057a7706a7a9f6cc26d86ee28d84217660b0f9b5 Mon Sep 17 00:00:00 2001 From: "CSSC-WORK\\murmur" Date: Fri, 3 Jan 2025 08:18:53 +0800 Subject: [PATCH] fix TIMEOUT bug --- protocol.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/protocol.c b/protocol.c index bbcef03..73a9b40 100644 --- a/protocol.c +++ b/protocol.c @@ -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);