Browse Source

Update at_utils.c

如果打印格式为"%02X"的数据大于0x7F,打印的数据就会在前面多出6个'F',原因详见https://blog.csdn.net/zqxwce821/article/details/53011925。
现在通过强制转换成unsigned char后,在STM32(KEIL5+C99)已测试确认能修复该问题。
SNOWA 2 years ago
parent
commit
3400a79035
1 changed files with 1 additions and 1 deletions
  1. 1 1
      components/net/at/src/at_utils.c

+ 1 - 1
components/net/at/src/at_utils.c

@@ -36,7 +36,7 @@ void at_print_raw_cmd(const char *name, const char *buf, rt_size_t size)
         {
         {
             if (i + j < size)
             if (i + j < size)
             {
             {
-                rt_kprintf("%02X ", buf[i + j]);
+                rt_kprintf("%02X ", (unsigned char)buf[i + j]);
             }
             }
             else
             else
             {
             {