Skip to content

Commit

Permalink
Update to v1.3006
Browse files Browse the repository at this point in the history
Changed the option volume check test to only test for the upper case first character of the volume text.
  • Loading branch information
ptulp committed Jun 20, 2018
1 parent 605d261 commit 0d7b1a0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
4 changes: 2 additions & 2 deletions VERSION.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SET(PLUGIN_VERSION_MAJOR "1")
SET(PLUGIN_VERSION_MINOR "3")
SET(PLUGIN_VERSION_PATCH "005")
SET(PLUGIN_VERSION_DATE "2018-06-16")
SET(PLUGIN_VERSION_PATCH "006")
SET(PLUGIN_VERSION_DATE "2018-06-20")
15 changes: 9 additions & 6 deletions src/Logbook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,9 @@ void Logbook::SetSentence( wxString &sentence )
*/

if (m_NMEA0183.Parse()) {
double xdrdata;
double xdrdata;
wxString tempopt;

for (int i = 0; i<m_NMEA0183.Xdr.TransducerCnt; i++) {
wimdaSentence = true;
dtWimda = wxDateTime::Now();
Expand All @@ -631,22 +633,23 @@ void Logbook::SetSentence( wxString &sentence )
sHumidity = wxString::Format( _T( "%3.1f " ),xdrdata );
}
// XDR Volume
if (m_NMEA0183.Xdr.TransducerInfo[i].TransducerType == _T("V")) {
if (m_NMEA0183.Xdr.TransducerInfo[i].TransducerType == _T("V")) {
tempopt = opt->vol.SubString( 0,0 ).Upper();
if (m_NMEA0183.Xdr.TransducerInfo[i].UnitOfMeasurement == _T("M")) {
xdrdata *= 1000;
if ( opt->vol == _T( "gal" ))
if ( tempopt == _T( "G" ))
xdrdata = xdrdata * 0.264172;
}
if (m_NMEA0183.Xdr.TransducerInfo[i].UnitOfMeasurement == _T("L")) {
if ( opt->vol == _T( "gal" ))
if ( tempopt == _T( "G" ))
xdrdata = xdrdata * 0.264172;
}
if (m_NMEA0183.Xdr.TransducerInfo[i].UnitOfMeasurement == _T("G")) {
if ( opt->vol == _T( "liter" ))
if ( tempopt == _T( "L" ))
xdrdata = xdrdata * 3.7854;
}
dVolume += xdrdata;
sVolume = wxString::Format( _T( "%3.1f " ),dVolume );
sVolume = wxString::Format( _T( "%4.2f " ),dVolume );
}
}
}
Expand Down

0 comments on commit 0d7b1a0

Please sign in to comment.