Pre Merge pull request !10 from AiYangSky/Serial-port-optimization

This commit is contained in:
AiYangSky 2023-07-20 09:46:48 +00:00 committed by Gitee
commit c9c3eb29d0
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 1 additions and 2 deletions

View File

@ -39,9 +39,8 @@ public:
virtual bool inPutByte(IN uint8_t *byte)
{
if (ser->available() > 0)
if (ser->read(byte, 1))
{
ser->read(byte, 1);
return true;
}
return false;