serialport parser

emitter data is one bit larger
required bytes is calculed on data variable and not on buffer variable.