Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
rgleason committed Apr 26, 2018
2 parents 9813557 + 49b751b commit b05ed48
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
11 changes: 6 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#---------------------------------------------------------------------------
# Author: Pavel Kalian
# Copyright: 2014
# License: GPLv2 License
# Author: Dirk Smits
# Copyright: 2018
# License: GPLv3 License
#---------------------------------------------------------------------------

#define minimum cmake version
CMAKE_MINIMUM_REQUIRED(VERSION 2.6.2)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

PROJECT(nmeaconverter_pi)

Expand All @@ -14,8 +15,8 @@ SET(VERBOSE_NAME NmeaConverter)
SET(TITLE_NAME NmeaConverter)
SET(CPACK_PACKAGE_CONTACT "RooieDirk")

SET(VERSION_MAJOR "0")
SET(VERSION_MINOR "9")
SET(VERSION_MAJOR "1")
SET(VERSION_MINOR "0")

#SET(CMAKE_BUILD_TYPE Debug)

Expand Down
10 changes: 8 additions & 2 deletions src/NmeaConverter_pi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,20 +101,26 @@ void NmeaConverter_pi::SetNMEASentence(wxString &sentence)
wxString s = sentence; //local copy of sentence
s.Trim(); // Removes white-space (space, tabs, form feed, newline and carriage return)
if ( b_CheckChecksum )
{
{
if ( nmeaIsValid( s ) )
{
//send to all objects
//for( objit = ObjectMap.begin(); objit != ObjectMap.end(); ++objit )
for ( auto const &ent1 : ObjectMap)
ent1.second->SetNMEASentence(s);
//objit->second->SetNMEASentence(s);
}
}
else
{
for ( auto const &ent1 : ObjectMap)
ent1.second->SetNMEASentence(s);
}

}

void NmeaConverter_pi::SendNMEASentence(wxString sentence)
{
sentence.Trim();
wxString Checksum = ComputeChecksum(sentence);
sentence = sentence.Append(wxT("*"));
sentence = sentence.Append(Checksum);
Expand Down

0 comments on commit b05ed48

Please sign in to comment.