Closed rgleason closed 1 year ago
What are the exact failures in watchdog NMEA processing? With a clear list, I'll make PRs tonight to correct them in watchdog, without a wholesale upgrade of NMEA library.
Do you mean the errors found when building, when using the current WD version of nmea0183?
They're are none because it builds. However it does not appear that depth data is getting to the alarm. Why? because in the Depth Alarm Edit window, when I turn on "Alert if no data" The depth alarm immediately becomes red. When I turn it off it immediately goes black.
Also the Depth line always has "NA" after it. However in some rare situations I will see some depth and > sign flash up and then become NA.
Do you have a sample VDR file that shows the error?
depth-new-DPT.txt depth-old-DPT.txt
If you rename lib/nmea to lib/nmea-O and lib/nmea-old to lib/nmea you'll have the original set.
IN branch nmea-lib https://github.com/rgleason/watchdog_pi/tree/nmea-lib
N branch nmea-lib https://github.com/rgleason/watchdog_pi/tree/nmea-lib
Dave, thanks. ...while you are fixing it, can you get "feet" selection working? It always seems to go back to meters.
Rick... If you copy dpt.cpp from Dashboard to Watchdog I think the NMEA0183 version >= 3.0 will be covered as well. I my local case: Copy from Dashboard: C:\Builds...........\OpenCPN\plugins\dashboard_pi\src\nmea0183\dpt.cpp Paste to Watchdog: C:\Builds...........\watchdog_pi\libs\nmea0183\src\dpt.cpp
Thanks Hakan, I will keep that in mind. Dave has found some other sources of the problem and the short and long versions of dpt seem to be working right now. I should have thought of that, I tried taking nmea from OpenCPN, but O does not handle depth at all.....!!!
Of course that would have to change if we had a route checker for depth and obstructions....
PS, will be adding a new watchdog version 1.0.259.0 that Dave has fixed
It was not the nmea library at all. Closing
With the dpt.cpp from Dashboard I've successfully run the files you attached above. Also the dpt version 3 messages.
Humm, maybe I should just copy it over and build watchdog again? But perhaps Dave already did this? I will compare the dpt files. Dave recently told me the nmea files are a red herring....
dpt.cpp has a conditional for nmea 3 dpt.hpp is the same. dbt.cpp is the same. dbt.hpp matches.
Have done a winmerge compare and am finding that the differences are mostly small formatting. I have corrected a number of them so the upper half is matching. Will go through it tonight.
Hakan, After going through all of the files there are really only two files that are substantially different, the rest of the differences were largely very minor format issues such as an extra line or a line that is very slightly different with an extra space, etc. I am enclosing the watchdog versions of mda.cpp and mda.hpp
MDA.cpp Line 62 and 99 is different
Dashboard has Pressure = 0.0; UnitOfMeasurement.Empty(); AirTemp = 999.0; <----Line 62
Watchdog has Pressure = 0.0; UnitOfMeasurement.Empty(); RelativeHumidity = 0.0; <----Line 62
MDA.hpp
Dashboard has double Pressure, AirTemp; wxString UnitOfMeasurement; blank <---- Line 58
Watchdog has double Pressure, AirTemp; wxString UnitOfMeasurement; double RelativeHumidity; <---- Line 58
How would you suggest I handle these differences? See attached files from watchdog. I am trying to get this plugin compiled and out as I am leaving tomorrow. unfortunately.
The Watchdog nmea set was also missing xte.cpp so I just copied it as I could imagine there being a need for an xte alarm.
I've made a new branch "nmea-lib" which has in it an exact copy of what Opencpn uses now for the nmea library.
https://github.com/rgleason/watchdog_pi/tree/nmea-lib
I have tried to build it but it fails, and have traced the errors down in watchdog-new-errors-nmealib.txt. They are for the following parameters Mda Mta Dpt and Rsa
Would very much like to get this fixed so that redog can test it on Tuesday when he is on his boat. https://www.cruisersforum.com/forums/f134/opencpn-version-5-8-4-released-276788.html#post3808312 and Corsair can test depth https://www.cruisersforum.com/forums/f134/watchdog-plugin-150313.html
If anyone can help by advising how to fix these 4 errors or by making a PR, it would be much appreciated.
@bdbcat @jongough @transmitterdan @Hakansv