-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
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
Fix handling of multiple responses in one read #152
Conversation
This comment has been minimized.
This comment has been minimized.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #152 +/- ##
==========================================
+ Coverage 80.15% 80.31% +0.16%
==========================================
Files 31 33 +2
Lines 1305 1326 +21
==========================================
+ Hits 1046 1065 +19
- Misses 259 261 +2 ☔ View full report in Codecov by Sentry. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
std::string line; | ||
while (std::getline(stream, line)) | ||
{ | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Continued lines must be processed on the next callback
[262] PASSED on noeticAll tests passed
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late review.
I am concerned that the readUntilEnd()
becomes a busy loop. Is it guaranteed that the readUntilEnd()
will not be called while the lidar sends its measurement data continuously?
@nhatao Even if the input buffer doesn't contains |
boost::asio::async_read_until
may return multiple blocks of data (separated by specified delimiter) when they are received shortly.Current implementation dropped second and later blocks.
Found during #151 development