-
Notifications
You must be signed in to change notification settings - Fork 17
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
added partial decoding of serial communication to main.cpp #1
Conversation
please separate PR into two parts, one is just to change coding style, and the others is to change code logic. |
Thanks, Okada-sensei, Actually, I do not distinguish coding style and logic. Thank you,
2014-12-20 1:37 GMT+09:00 Kei Okada notifications@github.com:
中島慎介 Nakashima Shinsuke 東京大学 情報理工学系研究科 知能機械情報学専攻 7-3-1 Hongo, Bunkyo-ku, Tokyo 113-8656 Japan |
@@ -1,67 +1,89 @@ | |||
#include <ros/ros.h> | |||
#include <geometry_msgs/WrenchStamped.h> | |||
|
|||
#include <stdio.h> |
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.
+#include <stdio.h>
- #include <stdio.h>
in this change, you just changed the number of white space, and there are no change in logically.
@Qualot For the case like you who's attentive to coding style, I recommend to separate commits like in the following order; (1st commit) edit the style, (2nd and later) add the actual change you'd like. |
566c88c
to
12653a3
Compare
how about this pull request? |
+1 |
over : | ||
return (n); | ||
} | ||
return (n); |
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.
I think you still have diffs which is not related to the problem
I confirmed both #8 and #9 "runs" with the device. (If I'm asked, I can only follow the general rule of thumb to avoid using |
this is very common case when reading fixed byte from input stream, the read stream can take a number of bytes to read in its arguments, but it did not grantee that the |
This is just a code style difference, please choose either you prefer. ◉ Kei Okada On Mon, Mar 23, 2015 at 12:24 AM, Isaac I.Y. Saito <notifications@github.com
|
fix for #1, do while to read enough data
modified from read(...FULL LENGH) to read(...PARTIAL) to read serial data smoothly.