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);