steve wrote:At the time you've noticed that it starts going wrong, the data stream comes in a slightly different pattern. From what I remember of the protocol, it looks valid, it's just that MX isn't handling it. It's a 'history data available' packet, which shouldn't actually occur during 'live' running, but I know that the WMR200 does do this sometimes. Normally, MX copes with this, but the unusual situation is that the packet (actually just a single byte) is tacked on to the end of the previous packet. This is valid, but MX doesn't spot it and then gets out of sync and just keeps reading the data and stuffing it into a buffer - which eventually overflows, hence the 'outside the bounds of the array' error. It's presumably some kind of timing change which causes it to happen.
I'll have a look at the code with a view to fixing it, and possibly do a release with just this fix. I don't know when that will be, I'm a bit busy this week sorting out my retirement, and I'm in Manchester next week, actually retiring. But I'll see what I can do. It's actually good to have a real, definable bug to fix for a change.
Interestingly, I had an iTunes upgrade notification this morning (even though I had thought I'd turned off auto upgrades), and it hasn't thrown the system so, obviously not upgrades that cause the problem. Thanks for the work you are putting into this and from a fellow retiree, enjoy your retirement although I doubt you'll find you'll be less busy.
Also, while I remember, there is a small logic error in the charts.js file for temperature (same applies to the cumuluscharts.js file for the website). You have done the calculation for freezing but then when drawing the axis, use '0' to select blue or red for the labels rather than the variable 'freezing'.
Neil