We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
if (at_parse_status == AT_PARSE_STATUS_EXPECT) { at_echo->status = AT_ECHO_STATUS_EXPECT; if (at_echo->__is_expecting) { tos_sem_post(&at_echo->__expect_notify); } } else if (at_parse_status == AT_PARSE_STATUS_OK) { if (!at_echo->__is_expecting) { at_echo->status = AT_ECHO_STATUS_OK; tos_sem_post(&at_echo->__status_set_notify); } } else if (at_parse_status == AT_PARSE_STATUS_FAIL) { at_echo->status = AT_ECHO_STATUS_FAIL; if (!at_echo->__is_expecting) { tos_sem_post(&at_echo->__status_set_notify); } } else if (at_parse_status == AT_PARSE_STATUS_ERROR) { at_echo->status = AT_ECHO_STATUS_ERROR; if (!at_echo->__is_expecting) { tos_sem_post(&at_echo->__status_set_notify); } }
The text was updated successfully, but these errors were encountered:
if (!at_echo->__is_expecting) {
这里是!,__is_expecting=1时,不会进入到at_echo->status = AT_ECHO_STATUS_OK的逻辑,您是在实际使用时碰到了这个异常情况吗?
!
Sorry, something went wrong.
接收的消息同时含有期望的字符串和“OK”时,at_echo->__expect_notify还没来得及获取,at_echo->status = AT_ECHO_STATUS_EXPECT;就立马有被任务“at_parser”更新成at_echo->status = AT_ECHO_STATUS_OK;这样等tos_sem_pend (&at_echo->__expect_notify);时已经变了,直接跳过了。实际遇到的。
建议在得到状态后,找个合适的地方清除 recv_cache
No branches or pull requests
The text was updated successfully, but these errors were encountered: