added partial decoding of serial communication to main.cpp

modified from read(...FULL LENGH) to read(...PARTIAL) to read serial data smoothly.
Thanks, Okada-sensei,

I got your point, and it is coding style that do not change the result of
compile, isn't it?
Then I will follow your advice. In other words,
the first thing I should do is to fix "read at once" problem without
changing the style such as indent, and
the next is that adding offset part on another PR with the same way.

Thank you very much!

                                             Shinsuke,

2014-12-22 17:46 GMT+09:00 Kei Okada <notifications@github.com>:

> In src/main.cpp
> <https://github.com/tork-a/dynpick_driver/pull/1#discussion-diff-22158057>
> :
>
> >          write(fdc, "R", 1);
> >
> >          // Obtain single data
> > -        c = read(fdc, str, 27);
> > -        if (c < 27)
> > -            {
> > -                ROS_WARN("=== error reciving data ... n = %d ===", c);
> > -            }
> > +        static int ct;
> > +
> > +#if 1
> > +        int len = 0, len_max = DATA_LENGTH;
>
> this is what we need for this PR.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/tork-a/dynpick_driver/pull/1/files#r22158057>.
>



-- 



--
**************************************************************
中島慎介 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
**************************************************************