serialport parser

emitter data is one bit larger
required bytes is calculed on data variable and not on buffer variable.
Merge pull request #24 from MajorDOOM/patch-1

serialport parser change the way the residual buffer is calculated.