feat: 增加命令执行日志输出
This commit is contained in:
@@ -146,7 +146,7 @@ int by_frame_parse(uint8_t *cmd, uint32_t *data_array)
|
||||
uint16_t crc_cal = crc16_check(frame_buff, BY_FRANE_LEN - 2);
|
||||
|
||||
if (crc_val == crc_cal) {
|
||||
log_info("received successful");
|
||||
log_debug("received successful");
|
||||
// 丢掉当前帧头,下次解析时就不从该帧头开始
|
||||
by_frame_queue_drop(&queue_recv, 1);
|
||||
// TODO 复制数据
|
||||
@@ -154,8 +154,8 @@ int by_frame_parse(uint8_t *cmd, uint32_t *data_array)
|
||||
memcpy(data_array, &frame_buff[2], BY_FRANE_DATA_LEN);
|
||||
return 0;
|
||||
} else {
|
||||
log_warn("receive failed");
|
||||
log_warn("cal crc 0x%04X, but got 0x%04X", crc_cal, crc_val);
|
||||
log_debug("receive failed");
|
||||
log_debug("cal crc 0x%04X, but got 0x%04X", crc_cal, crc_val);
|
||||
// 丢掉当前帧头,下次解析时就不从该帧头开始
|
||||
by_frame_queue_drop(&queue_recv, 1);
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user