if (rt_mq_recv(&mq, &buf, sizeof(buf), RT_WAITING_FOREVER) > 0)
```
### 解决方法
修改为:
```
if (rt_mq_recv(&mq, &buf, sizeof(buf), RT_WAITING_FOREVER) == RT_EOK)
```
新值
### 问题描述
原代码不当,需注意rt_mq_recv()函数的返回值:
Return the operation status. When the return value is RT_EOK, the operation is successful.If the return value is any other values, it means that the mailbox release failed.
```
if (rt_mq_recv(&mq, &buf, sizeof(buf), RT_WAITING_FOREVER) > 0)
```
### 解决方法
修改为:
```
if (rt_mq_recv(&mq, &buf, sizeof(buf), RT_WAITING_FOREVER) == RT_EOK)