Closed Qualot closed 9 years ago
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. Could you tell me that or show me an example or reference?
Thank you,
Shinsuke
2014-12-20 1:37 GMT+09:00 Kei Okada notifications@github.com:
please separate PR into two parts, one is just to change coding style, and the others is to change code logic.
— Reply to this email directly or view it on GitHub https://github.com/tork-a/dynpick_driver/pull/1#issuecomment-67662019.
中島慎介 Nakashima Shinsuke
東京大学 情報理工学系研究科 知能機械情報学専攻 情報システム工学研究室 Graduate School of Information Science and Technology The University of Tokyo Mechano-Informatics JSK Laboratory
7-3-1 Hongo, Bunkyo-ku, Tokyo 113-8656 Japan Tel: 03-5841-7416 / Fax: 03-5841-6285 Email: snakashima@jsk.imi.i.u-tokyo.ac.jp
@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.
how about this pull request?
+1
ok, i created new PR #7 for typo and #8, #9 for read data
I confirmed both #8 and #9 "runs" with the device. Since I still don't understand the problem this PR tries to address, I have no idea to pick either PR. @Qualot ?
(If I'm asked, I can only follow the general rule of thumb to avoid using goto
so pick #9 that keeps away from goto. But I'm no C expert).
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 read
reads the given bytes, it reads possible bytes and returns the byte.
read()
attempts to read up to count bytes from file descriptor fd into the buffer starting at buf.
Please choose either #8 or #9. I've tested with the real device, both ran but had no idea how I can verify the accuracy.
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
wrote:
Please choose either #8 https://github.com/tork-a/dynpick_driver/pull/8 or #9 https://github.com/tork-a/dynpick_driver/pull/9. I've tested with the real device, both ran but had no idea how I can verify the accuracy.
— Reply to this email directly or view it on GitHub https://github.com/tork-a/dynpick_driver/pull/1#issuecomment-84630959.
modified from read(...FULL LENGH) to read(...PARTIAL) to read serial data smoothly.