ccutrer / balboa_worldwide_app

Ruby library for communication with Balboa Water Group's WiFi module or RS-485
99 stars 27 forks source link

Enhance parsing #27

Closed kw217 closed 3 years ago

kw217 commented 3 years ago

NOTE This is a single commit on top of https://github.com/ccutrer/balboa_worldwide_app/pull/26 .

In theory it's possible we could have only part of a message in the buffer. Currently we throw that away; this fix changes it so we wait to see if the rest of the message will arrive. We also limit messages to less than 0x7e bytes, which seems reasonable. Finally, we add some comments to the parser.

ccutrer commented 3 years ago

Merged via cherry-pick (to skip the intermediate commit that hasn't been approved yet)