netmindz / balboa_GL_ML_spa_control

Control protocol between GL2000 controller and ML series compatibile top panel
16 stars 8 forks source link

handleBytes - buggy #46

Closed netmindz closed 8 months ago

netmindz commented 11 months ago

This method appears to have a few issues, which I think explains why sometimes the sensor doesn't appear to be reading and when it is, the timing of the FA messages seems a bit sporadic

  1. if tub.available returns anything other than 2 bytes after pin5 first goes low, then we fail to get the right msgLength so we just ignore any data until we do happen to hit the magic 2 bytes. Think handleBytes result.length() == 2 should be >=2
  2. Similarly if for some reason we read more than expected, then we ignore the message, might be better to look for result.length() >= msgLength
netmindz commented 11 months ago

Fixes https://github.com/netmindz/balboa_GL_ML_spa_control/pull/47

netmindz commented 8 months ago

On different hardware setups, sometimes the > 2 is better, but then others report that it's worse

netmindz commented 8 months ago

Looks like the latest code from @fherbert has made it much better