You are reading a single comment by @countxerox and its replies. Click here to read the full conversation.
  • Hi, I'm writing a module to interface with a radio control receiver, the receiver has a serial interface which is like the Futaba SBUS protocol.

    I'm piping the serial data, which comes in frames of 25 bytes, to an object with a write method so I've set the chunksize option to 25 but when I console.log the data being written to the object I see randomly sized chucks of 2-8 bytes?

    So the module is kind of working now but I want to make some further refinements, I tried using the 'end' and 'complete' options but nothing seems to happen, is it the 'end' of the chunk or something else? I've tried reducing the chunksize. What indicates when the pipe activity is complete or the when source has finished? Are the end/complete functions written like 'function end() {...}' or should they be functions of the object, how would I go about that?

About

Avatar for countxerox @countxerox started