sankeysoft / nmea_dashboard

MIT License
4 stars 1 forks source link

Staleness feature per item rather than global #12

Open jonjonr6 opened 1 year ago

jonjonr6 commented 1 year ago

Great app, thank you. One snag for me is that Raymarine NMEA interface only sends Log/Trip sentence (VLW) when the instrument has seen a change of 0.1 NM. If you are moving slowly or stopped the value is not re-sent before the NMEA Dashboard blanks the items. I don't want an infinite staleness time for everything so it would be ideal to be able to select this time-out separately for each item (possibly just an option to over-rule the default) from zero to infinity. Thanks again . Jonathan. Android Pixel5

jodysankey commented 11 months ago

Hmmm. I would consider it a bug in the sender for the VLW to only be sent on change. For example, it means any newly connected or slow-to-boot displays wouldn't be able to display log until the boat moves. For what its worth I've used the app on a few different Raymarine boats (usually DST800 or iTC-5 for the log) which didn't have that behavior.

The way the app is architected there is a common data layer behind the user interface cells and staleness is handled at the data layer. It would not be possible to set staleness at the cell layer. It would be possible to set staleness for different data elements at the data layer, but currently there is no user interface for anything at that layer and I need to think carefully about how to introduce that in a way that's works on small screens and is not confusing.

I'm planning on working on alarms at some point in the coming year which would also be at the data layer, so I'll leave the bug open and see if there is an elegant way to address it when working on alarms.

jonjonr6 commented 11 months ago

I agree that it's not great behaviour by the sender. It's (quite old) Raymarine ST60 kit. The sentence is sent at switch-on and then only on change of value as described. I've worked around it by sticking a Python patch after the Franson splitter to "refresh" that particular sentence every few seconds before transmission over TCP. It seems to work OK. As far as I can see the NMEA standard doesn't specify any rules on maximum refresh times so I suppose the ST60 is compliant even though it's not sensible! Thanks for the response and for the App.