You can subscribe to this list here.
| 2008 |
Jan
|
Feb
(58) |
Mar
(15) |
Apr
(23) |
May
(8) |
Jun
(92) |
Jul
(66) |
Aug
(6) |
Sep
(9) |
Oct
(44) |
Nov
(8) |
Dec
(1) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2009 |
Jan
(10) |
Feb
(8) |
Mar
(2) |
Apr
(8) |
May
(19) |
Jun
(11) |
Jul
(8) |
Aug
(6) |
Sep
(5) |
Oct
(4) |
Nov
(26) |
Dec
(4) |
| 2010 |
Jan
(5) |
Feb
(3) |
Mar
(4) |
Apr
(3) |
May
(4) |
Jun
|
Jul
(1) |
Aug
(16) |
Sep
(7) |
Oct
(3) |
Nov
(7) |
Dec
|
| 2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <bo...@us...> - 2008-06-18 07:12:22
|
Revision: 182
http://gearbox.svn.sourceforge.net/gearbox/?rev=182&view=rev
Author: borax00
Date: 2008-06-18 00:12:28 -0700 (Wed, 18 Jun 2008)
Log Message:
-----------
Modified Paths:
--------------
gearbox/trunk/cmake/UseIceUtil.cmake
gearbox/trunk/src/gbxgarminacfr/driver.cpp
Modified: gearbox/trunk/cmake/UseIceUtil.cmake
===================================================================
--- gearbox/trunk/cmake/UseIceUtil.cmake 2008-06-16 01:47:54 UTC (rev 181)
+++ gearbox/trunk/cmake/UseIceUtil.cmake 2008-06-18 07:12:28 UTC (rev 182)
@@ -1,4 +1,4 @@
INCLUDE_DIRECTORIES( ${ICEUTIL_HOME}/include )
-LINK_DIRECTORIES( ${ICEUTIL_HOME}/lib )
+LINK_DIRECTORIES( ${ICEUTIL_HOME}/lib ${ICEUTIL_HOME}/lib64 )
LINK_LIBRARIES( IceUtil )
Modified: gearbox/trunk/src/gbxgarminacfr/driver.cpp
===================================================================
--- gearbox/trunk/src/gbxgarminacfr/driver.cpp 2008-06-16 01:47:54 UTC (rev 181)
+++ gearbox/trunk/src/gbxgarminacfr/driver.cpp 2008-06-18 07:12:28 UTC (rev 182)
@@ -8,11 +8,13 @@
*
*/
+#include <bitset>
#include <iostream>
#include <sstream>
#include <gbxutilacfr/gbxutilacfr.h>
#include "nmea.h"
#include <cstdlib>
+#include <cstring>
#include <sys/time.h>
#include <time.h>
#include <errno.h>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rus...@us...> - 2008-06-16 01:47:46
|
Revision: 181
http://gearbox.svn.sourceforge.net/gearbox/?rev=181&view=rev
Author: russo2503v
Date: 2008-06-15 18:47:54 -0700 (Sun, 15 Jun 2008)
Log Message:
-----------
not attempting to remove unexpected control char
Modified Paths:
--------------
gearbox/trunk/src/gbxgarminacfr/driver.cpp
Modified: gearbox/trunk/src/gbxgarminacfr/driver.cpp
===================================================================
--- gearbox/trunk/src/gbxgarminacfr/driver.cpp 2008-06-15 08:10:09 UTC (rev 180)
+++ gearbox/trunk/src/gbxgarminacfr/driver.cpp 2008-06-16 01:47:54 UTC (rev 181)
@@ -313,6 +313,7 @@
serialData.erase( serialData.end()-1 );
// dealing with unexplained cntrl characters in the message
+/*
for ( string::iterator it=serialData.begin(); it!=serialData.end(); ++it ) {
if ( iscntrl( *it ) ) {
// debug
@@ -322,7 +323,7 @@
cout<<now.tv_sec<<" "<<now.tv_usec<<" "<<" after='"<<serialData<<"'"<<endl;
}
}
-
+*/
//Put it into the message object and checksum the data
try {
// This throws if it cannot find the * to deliminate the checksum field
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bo...@us...> - 2008-06-15 08:10:15
|
Revision: 180
http://gearbox.svn.sourceforge.net/gearbox/?rev=180&view=rev
Author: borax00
Date: 2008-06-15 01:10:09 -0700 (Sun, 15 Jun 2008)
Log Message:
-----------
time check moved inside loop, so that if two messages arrive between reads they get non-identical timestamps.
Modified Paths:
--------------
gearbox/trunk/src/gbxsickacfr/gbxserialdeviceacfr/serialdevicehandler.cpp
gearbox/trunk/src/gbxsickacfr/gbxserialdeviceacfr/serialdevicehandler.h
Modified: gearbox/trunk/src/gbxsickacfr/gbxserialdeviceacfr/serialdevicehandler.cpp
===================================================================
--- gearbox/trunk/src/gbxsickacfr/gbxserialdeviceacfr/serialdevicehandler.cpp 2008-06-13 01:16:07 UTC (rev 179)
+++ gearbox/trunk/src/gbxsickacfr/gbxserialdeviceacfr/serialdevicehandler.cpp 2008-06-15 08:10:09 UTC (rev 180)
@@ -102,12 +102,9 @@
try {
if ( getDataFromSerial() )
{
- IceUtil::Time t = IceUtil::Time::now();
- int timeStampSec = (int)t.toSeconds();
- int timeStampUsec = (int)t.toMicroSeconds() - timeStampSec*1000000;
// Process it
try {
- bool statusOK = processBuffer( timeStampSec, timeStampUsec );
+ bool statusOK = processBuffer();
if ( statusOK )
subStatus_.ok();
}
@@ -186,7 +183,7 @@
}
bool
-SerialDeviceHandler::processBuffer( const int &timeStampSec, int &timeStampUsec )
+SerialDeviceHandler::processBuffer()
{
if ( SUPER_DEBUG )
{
@@ -200,6 +197,10 @@
// This loop is in case multiple messages arrived.
while ( true )
{
+ IceUtil::Time t = IceUtil::Time::now();
+ int timeStampSec = (int)t.toSeconds();
+ int timeStampUsec = (int)t.toMicroSeconds() - timeStampSec*1000000;
+
IResponsePtr response;
int numBytesParsed = 0;
bool gotMessage = false;
Modified: gearbox/trunk/src/gbxsickacfr/gbxserialdeviceacfr/serialdevicehandler.h
===================================================================
--- gearbox/trunk/src/gbxsickacfr/gbxserialdeviceacfr/serialdevicehandler.h 2008-06-13 01:16:07 UTC (rev 179)
+++ gearbox/trunk/src/gbxsickacfr/gbxserialdeviceacfr/serialdevicehandler.h 2008-06-15 08:10:09 UTC (rev 180)
@@ -122,7 +122,7 @@
// Returns: true if got data, false if timed out
bool getDataFromSerial();
// Returns: true if statusOK, false it something bad happened
- bool processBuffer( const int &timeStampSec, int &timeStampUsec );
+ bool processBuffer();
gbxserialacfr::Serial &serial_;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rus...@us...> - 2008-06-13 01:16:04
|
Revision: 179
http://gearbox.svn.sourceforge.net/gearbox/?rev=179&view=rev
Author: russo2503v
Date: 2008-06-12 18:16:07 -0700 (Thu, 12 Jun 2008)
Log Message:
-----------
handling default case for gps fix type
Modified Paths:
--------------
gearbox/trunk/src/gbxgarminacfr/driver.cpp
Modified: gearbox/trunk/src/gbxgarminacfr/driver.cpp
===================================================================
--- gearbox/trunk/src/gbxgarminacfr/driver.cpp 2008-06-09 10:49:06 UTC (rev 178)
+++ gearbox/trunk/src/gbxgarminacfr/driver.cpp 2008-06-13 01:16:07 UTC (rev 179)
@@ -62,6 +62,8 @@
case '2':
data->fixType = Differential;
break;
+ default :
+ throw gbxutilacfr::Exception( ERROR_INFO, "GGA sentence contains unknown GPS fix type: '"+msg.getDataToken(FixType)+"'" );
}
//position
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rus...@us...> - 2008-06-09 10:49:00
|
Revision: 178
http://gearbox.svn.sourceforge.net/gearbox/?rev=178&view=rev
Author: russo2503v
Date: 2008-06-09 03:49:06 -0700 (Mon, 09 Jun 2008)
Log Message:
-----------
stripping the traling \n properly
Modified Paths:
--------------
gearbox/trunk/src/gbxgarminacfr/driver.cpp
Modified: gearbox/trunk/src/gbxgarminacfr/driver.cpp
===================================================================
--- gearbox/trunk/src/gbxgarminacfr/driver.cpp 2008-06-09 10:47:43 UTC (rev 177)
+++ gearbox/trunk/src/gbxgarminacfr/driver.cpp 2008-06-09 10:49:06 UTC (rev 178)
@@ -307,8 +307,8 @@
tracer_.debug( serialData, 10 );
// remove the trailing new line character
- assert( *serialData.end() == '\n' && "Driver: Serial data did not end in '\n'" );
- serialData.erase( serialData.end() );
+ assert( *(serialData.end()-1) == '\n' && "Driver: Serial data did not end in '\n'" );
+ serialData.erase( serialData.end()-1 );
// dealing with unexplained cntrl characters in the message
for ( string::iterator it=serialData.begin(); it!=serialData.end(); ++it ) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rus...@us...> - 2008-06-09 10:47:35
|
Revision: 177
http://gearbox.svn.sourceforge.net/gearbox/?rev=177&view=rev
Author: russo2503v
Date: 2008-06-09 03:47:43 -0700 (Mon, 09 Jun 2008)
Log Message:
-----------
stripping the traling \n
Modified Paths:
--------------
gearbox/trunk/src/gbxgarminacfr/driver.cpp
gearbox/trunk/src/gbxgarminacfr/nmea.cpp
Modified: gearbox/trunk/src/gbxgarminacfr/driver.cpp
===================================================================
--- gearbox/trunk/src/gbxgarminacfr/driver.cpp 2008-06-09 10:29:55 UTC (rev 176)
+++ gearbox/trunk/src/gbxgarminacfr/driver.cpp 2008-06-09 10:47:43 UTC (rev 177)
@@ -305,10 +305,13 @@
// We successfully read something from the serial port
//
tracer_.debug( serialData, 10 );
+
+ // remove the trailing new line character
+ assert( *serialData.end() == '\n' && "Driver: Serial data did not end in '\n'" );
+ serialData.erase( serialData.end() );
// dealing with unexplained cntrl characters in the message
- // don't check the last 2 characters: they're \0 and \n
- for ( string::iterator it=serialData.begin(); it!=serialData.end()-2; ++it ) {
+ for ( string::iterator it=serialData.begin(); it!=serialData.end(); ++it ) {
if ( iscntrl( *it ) ) {
// debug
cout<<now.tv_sec<<" "<<now.tv_usec<<" "<<" before='"<<serialData<<"'"<<endl;
Modified: gearbox/trunk/src/gbxgarminacfr/nmea.cpp
===================================================================
--- gearbox/trunk/src/gbxgarminacfr/nmea.cpp 2008-06-09 10:29:55 UTC (rev 176)
+++ gearbox/trunk/src/gbxgarminacfr/nmea.cpp 2008-06-09 10:47:43 UTC (rev 177)
@@ -166,7 +166,7 @@
haveCheckSum_ = true;
//check that we have the '$' at the start
- if(sentence_[0]!= NMEAStartOfSentence) {
+ if ( sentence_[0]!= NMEAStartOfSentence ) {
throw NmeaException("cannot calculate checksum, missing leading '$'");
}
@@ -176,7 +176,7 @@
unsigned char nextChar;
// we start from 1 to skip the leading '$'
for( loopCount=1; loopCount<MAX_SENTENCE_LEN; ++loopCount )
- {
+ {
nextChar = static_cast<unsigned char>(sentence_[loopCount]);
// no delimiter uh oh
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rus...@us...> - 2008-06-09 10:29:50
|
Revision: 176
http://gearbox.svn.sourceforge.net/gearbox/?rev=176&view=rev
Author: russo2503v
Date: 2008-06-09 03:29:55 -0700 (Mon, 09 Jun 2008)
Log Message:
-----------
more debug 2
Modified Paths:
--------------
gearbox/trunk/src/gbxgarminacfr/doc.dox
gearbox/trunk/src/gbxgarminacfr/driver.cpp
Modified: gearbox/trunk/src/gbxgarminacfr/doc.dox
===================================================================
--- gearbox/trunk/src/gbxgarminacfr/doc.dox 2008-06-09 08:36:30 UTC (rev 175)
+++ gearbox/trunk/src/gbxgarminacfr/doc.dox 2008-06-09 10:29:55 UTC (rev 176)
@@ -59,6 +59,7 @@
- http://www.novatel.com/Documents/Manuals/GPS+Reference.pdf
- http://en.wikipedia.org/wiki/NMEA
- http://www.gpsinformation.org/dale/interface.htm
+- http://www.vanhuystee.com/faq_nmea183.html
@section gbx_library_gbxgarminacfr_epe What is EPE?
Modified: gearbox/trunk/src/gbxgarminacfr/driver.cpp
===================================================================
--- gearbox/trunk/src/gbxgarminacfr/driver.cpp 2008-06-09 08:36:30 UTC (rev 175)
+++ gearbox/trunk/src/gbxgarminacfr/driver.cpp 2008-06-09 10:29:55 UTC (rev 176)
@@ -334,6 +334,10 @@
throw gbxutilacfr::Exception( ERROR_INFO,ss.str());
}
nmeaExceptionCount = 0;
+
+ // debug
+ if ( nmeaFailChecksumCount>0 )
+ cout<<now.tv_sec<<" "<<now.tv_usec<<" "<<nmeaFailChecksumCount<<" the sentence AFTER, raw='"<<serialData<<"'"<<endl<<endl;
// Only populate the data structures if our message passes the checksum!
const int nmeaFailChecksumMaxCount = 10;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rus...@us...> - 2008-06-09 08:36:22
|
Revision: 175
http://gearbox.svn.sourceforge.net/gearbox/?rev=175&view=rev
Author: russo2503v
Date: 2008-06-09 01:36:30 -0700 (Mon, 09 Jun 2008)
Log Message:
-----------
more debug
Modified Paths:
--------------
gearbox/trunk/src/gbxgarminacfr/driver.cpp
Modified: gearbox/trunk/src/gbxgarminacfr/driver.cpp
===================================================================
--- gearbox/trunk/src/gbxgarminacfr/driver.cpp 2008-06-09 08:25:01 UTC (rev 174)
+++ gearbox/trunk/src/gbxgarminacfr/driver.cpp 2008-06-09 08:36:30 UTC (rev 175)
@@ -311,8 +311,10 @@
for ( string::iterator it=serialData.begin(); it!=serialData.end()-2; ++it ) {
if ( iscntrl( *it ) ) {
// debug
+ cout<<now.tv_sec<<" "<<now.tv_usec<<" "<<" before='"<<serialData<<"'"<<endl;
cout<<now.tv_sec<<" "<<now.tv_usec<<" removing control char="<<std::hex<<(unsigned int)*it<<std::dec<<endl;
it = serialData.erase( it );
+ cout<<now.tv_sec<<" "<<now.tv_usec<<" "<<" after='"<<serialData<<"'"<<endl;
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rus...@us...> - 2008-06-09 08:24:52
|
Revision: 174
http://gearbox.svn.sourceforge.net/gearbox/?rev=174&view=rev
Author: russo2503v
Date: 2008-06-09 01:25:01 -0700 (Mon, 09 Jun 2008)
Log Message:
-----------
resetting hex
Modified Paths:
--------------
gearbox/trunk/src/gbxgarminacfr/driver.cpp
gearbox/trunk/src/gbxgarminacfr/nmea.cpp
Modified: gearbox/trunk/src/gbxgarminacfr/driver.cpp
===================================================================
--- gearbox/trunk/src/gbxgarminacfr/driver.cpp 2008-06-09 08:22:40 UTC (rev 173)
+++ gearbox/trunk/src/gbxgarminacfr/driver.cpp 2008-06-09 08:25:01 UTC (rev 174)
@@ -311,7 +311,7 @@
for ( string::iterator it=serialData.begin(); it!=serialData.end()-2; ++it ) {
if ( iscntrl( *it ) ) {
// debug
- cout<<now.tv_sec<<" "<<now.tv_usec<<" removing control char="<<std::hex<<(unsigned int)*it<<endl;
+ cout<<now.tv_sec<<" "<<now.tv_usec<<" removing control char="<<std::hex<<(unsigned int)*it<<std::dec<<endl;
it = serialData.erase( it );
}
}
Modified: gearbox/trunk/src/gbxgarminacfr/nmea.cpp
===================================================================
--- gearbox/trunk/src/gbxgarminacfr/nmea.cpp 2008-06-09 08:22:40 UTC (rev 173)
+++ gearbox/trunk/src/gbxgarminacfr/nmea.cpp 2008-06-09 08:25:01 UTC (rev 174)
@@ -150,8 +150,8 @@
}
//failed the checksum!
- cout<<"device: '"<<chksum_HIB<<chksum_LOB <<"' ("<<std::hex<<(unsigned int)chksum_HIB<<","<<(unsigned int)chksum_LOB<<") "
- <<"driver: '"<<*ptr<<*(ptr+1)<<"'" <<"' ("<<std::hex<<(unsigned int)*ptr<<","<<(unsigned int)*(ptr+1)<<") "<<endl;
+ cout<<"device: '"<<chksum_HIB<<chksum_LOB <<"' ("<<std::hex<<(unsigned int)chksum_HIB<<","<<(unsigned int)chksum_LOB<<std::dec<<") "
+ <<"driver: '"<<*ptr<<*(ptr+1)<<"'" <<"' ("<<std::hex<<(unsigned int)*ptr<<","<<(unsigned int)*(ptr+1)<<std::dec<<") "<<endl;
return false;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rus...@us...> - 2008-06-09 08:22:37
|
Revision: 173
http://gearbox.svn.sourceforge.net/gearbox/?rev=173&view=rev
Author: russo2503v
Date: 2008-06-09 01:22:40 -0700 (Mon, 09 Jun 2008)
Log Message:
-----------
more output
Modified Paths:
--------------
gearbox/trunk/src/gbxgarminacfr/nmea.cpp
Modified: gearbox/trunk/src/gbxgarminacfr/nmea.cpp
===================================================================
--- gearbox/trunk/src/gbxgarminacfr/nmea.cpp 2008-06-09 08:10:35 UTC (rev 172)
+++ gearbox/trunk/src/gbxgarminacfr/nmea.cpp 2008-06-09 08:22:40 UTC (rev 173)
@@ -150,7 +150,8 @@
}
//failed the checksum!
- cout<<"device: "<<chksum_HIB<<chksum_LOB<<" driver: "<<*ptr<<*(ptr+1)<<endl;
+ cout<<"device: '"<<chksum_HIB<<chksum_LOB <<"' ("<<std::hex<<(unsigned int)chksum_HIB<<","<<(unsigned int)chksum_LOB<<") "
+ <<"driver: '"<<*ptr<<*(ptr+1)<<"'" <<"' ("<<std::hex<<(unsigned int)*ptr<<","<<(unsigned int)*(ptr+1)<<") "<<endl;
return false;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rus...@us...> - 2008-06-09 08:10:27
|
Revision: 172
http://gearbox.svn.sourceforge.net/gearbox/?rev=172&view=rev
Author: russo2503v
Date: 2008-06-09 01:10:35 -0700 (Mon, 09 Jun 2008)
Log Message:
-----------
removing ctrl char
Modified Paths:
--------------
gearbox/trunk/src/gbxgarminacfr/driver.cpp
Modified: gearbox/trunk/src/gbxgarminacfr/driver.cpp
===================================================================
--- gearbox/trunk/src/gbxgarminacfr/driver.cpp 2008-06-09 07:56:03 UTC (rev 171)
+++ gearbox/trunk/src/gbxgarminacfr/driver.cpp 2008-06-09 08:10:35 UTC (rev 172)
@@ -306,6 +306,16 @@
//
tracer_.debug( serialData, 10 );
+ // dealing with unexplained cntrl characters in the message
+ // don't check the last 2 characters: they're \0 and \n
+ for ( string::iterator it=serialData.begin(); it!=serialData.end()-2; ++it ) {
+ if ( iscntrl( *it ) ) {
+ // debug
+ cout<<now.tv_sec<<" "<<now.tv_usec<<" removing control char="<<std::hex<<(unsigned int)*it<<endl;
+ it = serialData.erase( it );
+ }
+ }
+
//Put it into the message object and checksum the data
try {
// This throws if it cannot find the * to deliminate the checksum field
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rus...@us...> - 2008-06-09 07:56:00
|
Revision: 171
http://gearbox.svn.sourceforge.net/gearbox/?rev=171&view=rev
Author: russo2503v
Date: 2008-06-09 00:56:03 -0700 (Mon, 09 Jun 2008)
Log Message:
-----------
cosmetic
Modified Paths:
--------------
gearbox/trunk/src/gbxgarminacfr/nmea.h
Modified: gearbox/trunk/src/gbxgarminacfr/nmea.h
===================================================================
--- gearbox/trunk/src/gbxgarminacfr/nmea.h 2008-06-09 06:34:23 UTC (rev 170)
+++ gearbox/trunk/src/gbxgarminacfr/nmea.h 2008-06-09 07:56:03 UTC (rev 171)
@@ -80,27 +80,28 @@
NmeaMessage();
NmeaMessage(const char *sentence, int testCheckSum=DontTestOrAddChecksum );
- // Set up the internal data for a sentence
+ // Set up the internal data for a sentence.
+ // May throw NmeaException if TestChecksum is specified.
void setSentence(const char *data, int testCheckSum=DontTestOrAddChecksum );
- // Do we only have the raw string ?
+ // Do we only have the raw string?
bool haveSentence() const { return haveSentence_; };
- // Have we parsed fields ?
+ // Do we have parsed fields?
bool haveTokens() const { return haveTokens_; };
- // have we a valid checksum ?
+ // Do we have a valid checksum?
bool haveValidChecksum() const { return checkSumOK_; };
- // have we checked the checksum?
+ // Have we checked the checksum?
bool haveTestedChecksum()const { return haveCheckSum_; };
// calculate the checksum from sentence
- // Note that this function may throw NMEA_Exception...
+ // May throw NmeaException.
bool testChecksumOk();
// Return the raw sentence string
- const char * sentence() { return sentence_; };
+ const char* sentence() { return sentence_; };
// Return a single data token as a string
std::string& getDataToken(int i) { return dataTokens_[i]; };
@@ -113,6 +114,7 @@
private:
void init();
+ // May throw NmeaException.
void addCheckSum();
// Do we only have the raw string ?
bool haveSentence_;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rus...@us...> - 2008-06-09 06:34:15
|
Revision: 170
http://gearbox.svn.sourceforge.net/gearbox/?rev=170&view=rev
Author: russo2503v
Date: 2008-06-08 23:34:23 -0700 (Sun, 08 Jun 2008)
Log Message:
-----------
more more mroe debug
Modified Paths:
--------------
gearbox/trunk/src/gbxgarminacfr/driver.cpp
gearbox/trunk/src/gbxgarminacfr/nmea.cpp
Modified: gearbox/trunk/src/gbxgarminacfr/driver.cpp
===================================================================
--- gearbox/trunk/src/gbxgarminacfr/driver.cpp 2008-06-09 05:52:41 UTC (rev 169)
+++ gearbox/trunk/src/gbxgarminacfr/driver.cpp 2008-06-09 06:34:23 UTC (rev 170)
@@ -285,7 +285,7 @@
// This will block up to the timeout
//
tracer_.debug( "Driver::read(): calling serial_->readLine()", 10 );
- int ret = serial_->readLine(serialData);
+ int ret = serial_->readLine( serialData );
// get time stamp right away (Linux only!)
timeval now;
@@ -330,7 +330,7 @@
if ( nmeaFailChecksumCount++ < nmeaFailChecksumMaxCount ) {
// tracer_.warning("Gps driver: Single message failed checksum. Not throwing an exception yet!" );
// debug
- cout<<now.tv_sec<<" "<<now.tv_usec<<" "<<nmeaFailChecksumCount<<" '"<<nmeaMessage.sentence()<<"'"<<endl;
+ cout<<now.tv_sec<<" "<<now.tv_usec<<" "<<nmeaFailChecksumCount<<" sentence='"<<nmeaMessage.sentence()<<"' raw='"<<serialData<<"'"<<endl;
continue;
}
else {
Modified: gearbox/trunk/src/gbxgarminacfr/nmea.cpp
===================================================================
--- gearbox/trunk/src/gbxgarminacfr/nmea.cpp 2008-06-09 05:52:41 UTC (rev 169)
+++ gearbox/trunk/src/gbxgarminacfr/nmea.cpp 2008-06-09 06:34:23 UTC (rev 170)
@@ -92,12 +92,13 @@
switch ( AddOrTestCheckSum )
{
case TestChecksum: {
- //This is for Rx'd data that we need to test for correct reception
+ // This is for Rx'd data that we need to test for correct reception
+ // (internally it will also call addCheckSum())
testChecksumOk();
break;
}
case AddChecksum: {
- //This is for Tx data that needs to checksummed before sending
+ // This is for Tx data that needs to checksummed before sending
addCheckSum();
checkSumOK_ = true;
break;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rus...@us...> - 2008-06-09 05:52:34
|
Revision: 169
http://gearbox.svn.sourceforge.net/gearbox/?rev=169&view=rev
Author: russo2503v
Date: 2008-06-08 22:52:41 -0700 (Sun, 08 Jun 2008)
Log Message:
-----------
more more debug
Modified Paths:
--------------
gearbox/trunk/src/gbxgarminacfr/nmea.cpp
Modified: gearbox/trunk/src/gbxgarminacfr/nmea.cpp
===================================================================
--- gearbox/trunk/src/gbxgarminacfr/nmea.cpp 2008-06-09 04:58:40 UTC (rev 168)
+++ gearbox/trunk/src/gbxgarminacfr/nmea.cpp 2008-06-09 05:52:41 UTC (rev 169)
@@ -89,16 +89,23 @@
sentence_[MAX_SENTENCE_LEN] = '\0';
haveSentence_ = true;
- switch(AddOrTestCheckSum)
+ switch ( AddOrTestCheckSum )
{
- case TestChecksum: //This is for Rx'd data that we need to test for correct reception
- testChecksumOk(); break;
- case AddChecksum: //This is for Tx data that needs to checksummed before sending
- addCheckSum(); checkSumOK_ = true; break;
- case DontTestOrAddChecksum:
- break;
- default:
- assert(true);
+ case TestChecksum: {
+ //This is for Rx'd data that we need to test for correct reception
+ testChecksumOk();
+ break;
+ }
+ case AddChecksum: {
+ //This is for Tx data that needs to checksummed before sending
+ addCheckSum();
+ checkSumOK_ = true;
+ break;
+ }
+ case DontTestOrAddChecksum:
+ break;
+ default:
+ assert( true && "unrecognized message option" );
}
}
@@ -115,7 +122,10 @@
//First save the existing two checksum chars from the message
//These are straight after the '*' character
ptr = strchr(sentence_, NMEAChecksumDelim);
- if(!ptr){return false;}
+ if ( !ptr ) {
+ cout<<"device: no checksum delimiter"<<endl;
+ return false;
+ }
//save the high and low bytes of the checksum
//Make sure they are in upper case!
@@ -149,13 +159,13 @@
void
NmeaMessage::addCheckSum()
{
- assert( haveSentence_ );
+ assert( haveSentence_ && "calling addCheckSum() without a sentence" );
haveCheckSum_ = true;
//check that we have the '$' at the start
if(sentence_[0]!= NMEAStartOfSentence) {
- return;
+ throw NmeaException("cannot calculate checksum, missing leading '$'");
}
unsigned char chkRunning = 0;
@@ -169,8 +179,7 @@
// no delimiter uh oh
if( (nextChar=='\r') || (nextChar=='\n') || (nextChar=='\0') ) {
- throw NmeaException("nmea: cannot calculate checksum, missing final '*'\n");
- return;
+ throw NmeaException("cannot calculate checksum, missing final '*'");
}
// goodie we found it (the '*' is not included into the checksum)
@@ -191,7 +200,7 @@
NmeaMessage::parseTokens()
{
//We should not attempt to be parsing a message twice...
- assert( numDataTokens()==0 );
+ assert( numDataTokens()==0 && "calling parseTokens() with tokens" );
//Split the message at the commas
//TODO cope with missing fields
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rus...@us...> - 2008-06-09 04:58:33
|
Revision: 168
http://gearbox.svn.sourceforge.net/gearbox/?rev=168&view=rev
Author: russo2503v
Date: 2008-06-08 21:58:40 -0700 (Sun, 08 Jun 2008)
Log Message:
-----------
more debug
Modified Paths:
--------------
gearbox/trunk/src/gbxgarminacfr/doc.dox
gearbox/trunk/src/gbxgarminacfr/nmea.cpp
Modified: gearbox/trunk/src/gbxgarminacfr/doc.dox
===================================================================
--- gearbox/trunk/src/gbxgarminacfr/doc.dox 2008-06-09 04:36:01 UTC (rev 167)
+++ gearbox/trunk/src/gbxgarminacfr/doc.dox 2008-06-09 04:58:40 UTC (rev 168)
@@ -211,8 +211,10 @@
http://www8.garmin.com/support/faqs/faq.jsp?faq=40
Q. How is the checksum calculated in NMEA 0183?
-A. The checksum is the 8-bit exclusive OR (no start or stop bits) of all characters in the sentence, including the "," delimiters, between -- but not including -- the "$" and "*" delimiters.
-The hexadecimal value of the most significant and least significant 4 bits of the result are converted to two ASCII characters (0-9, A-F) for transmission. The most significant character is transmitted first.
+A. The checksum is the 8-bit exclusive OR (no start or stop bits) of all characters in the sentence,
+including the "," delimiters, between -- but not including -- the "$" and "*" delimiters.
+The hexadecimal value of the most significant and least significant 4 bits of the result are converted
+to two ASCII characters (0-9, A-F) for transmission. The most significant character is transmitted first.
*/
Modified: gearbox/trunk/src/gbxgarminacfr/nmea.cpp
===================================================================
--- gearbox/trunk/src/gbxgarminacfr/nmea.cpp 2008-06-09 04:36:01 UTC (rev 167)
+++ gearbox/trunk/src/gbxgarminacfr/nmea.cpp 2008-06-09 04:58:40 UTC (rev 168)
@@ -49,14 +49,12 @@
const char NMEAChecksumDelim = '*';
-//*************************************************************
//The blank constructor
NmeaMessage::NmeaMessage()
{
init();
}
-//**************************************************************
void NmeaMessage::init()
{
haveSentence_ = false;
@@ -70,7 +68,6 @@
}
-//****************************************************************
NmeaMessage::NmeaMessage(const char *sentence, int testCheckSum)
{
init();
@@ -78,9 +75,9 @@
}
-//**********************************************************************
//Load the data as requested and test the checksum if we are asked to.
-void NmeaMessage::setSentence(const char *data, int AddOrTestCheckSum)
+void
+NmeaMessage::setSentence(const char *data, int AddOrTestCheckSum)
{
init();
@@ -105,9 +102,8 @@
}
}
-
-//*****************************************************************
-bool NmeaMessage::testChecksumOk()
+bool
+NmeaMessage::testChecksumOk()
{
haveCheckSum_ = true;
checkSumOK_ = false;
@@ -136,65 +132,66 @@
addCheckSum();
//Now compare our saved version with our new ones
- if((chksum_HIB == *ptr) && (chksum_LOB == *(ptr+1))){
+ if( (chksum_HIB == *ptr) && (chksum_LOB == *(ptr+1)) ) {
//all looked good!
checkSumOK_ = true;
return true;
}
//failed the checksum!
+ cout<<"device: "<<chksum_HIB<<chksum_LOB<<" driver: "<<*ptr<<*(ptr+1)<<endl;
return false;
}
-
-//*****************************************************
// Add the checksum chars to an existing message
// NOTE: this assumes that there is allready space in the message for
// the checksum, and that the checksum delimiter is there
-
-void NmeaMessage::addCheckSum(){
-
+void
+NmeaMessage::addCheckSum()
+{
assert( haveSentence_ );
haveCheckSum_ = true;
//check that we have the '$' at the start
- if(sentence_[0]!= NMEAStartOfSentence)
- {return;}
+ if(sentence_[0]!= NMEAStartOfSentence) {
+ return;
+ }
unsigned char chkRunning = 0;
int loopCount;
unsigned char nextChar;
- for( loopCount =1; loopCount < MAX_SENTENCE_LEN; loopCount++){
-
+ // we start from 1 to skip the leading '$'
+ for( loopCount=1; loopCount<MAX_SENTENCE_LEN; ++loopCount )
+ {
nextChar = static_cast<unsigned char>(sentence_[loopCount]);
// no delimiter uh oh
- if((nextChar=='\r')||(nextChar=='\n')||(nextChar=='\0')){
- throw NmeaException("nmea: cannot calculate checksum, missing '*'\n");
+ if( (nextChar=='\r') || (nextChar=='\n') || (nextChar=='\0') ) {
+ throw NmeaException("nmea: cannot calculate checksum, missing final '*'\n");
return;
}
- // goodie we found it
- if(nextChar==NMEAChecksumDelim)
- {break;}
+ // goodie we found it (the '*' is not included into the checksum)
+ if ( nextChar==NMEAChecksumDelim ) {
+ break;
+ }
- //Keep the running total going
+ // Keep the running XOR total
chkRunning ^= nextChar;
}
//Put the byte values as upper case HEX back into the message
- sprintf(sentence_ + loopCount + 1,"%02X",chkRunning);
+ sprintf( sentence_ + loopCount + 1,"%02X", chkRunning );
}
-
-//**********************************************************************
// Parse the data fields of our message...
-void NmeaMessage::parseTokens(){
-
+void
+NmeaMessage::parseTokens()
+{
//We should not attempt to be parsing a message twice...
- assert (numDataTokens() == 0);
+ assert( numDataTokens()==0 );
//Split the message at the commas
//TODO cope with missing fields
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rus...@us...> - 2008-06-09 04:35:56
|
Revision: 167
http://gearbox.svn.sourceforge.net/gearbox/?rev=167&view=rev
Author: russo2503v
Date: 2008-06-08 21:36:01 -0700 (Sun, 08 Jun 2008)
Log Message:
-----------
Modified Paths:
--------------
gearbox/trunk/src/gbxgarminacfr/driver.cpp
Modified: gearbox/trunk/src/gbxgarminacfr/driver.cpp
===================================================================
--- gearbox/trunk/src/gbxgarminacfr/driver.cpp 2008-06-09 04:33:27 UTC (rev 166)
+++ gearbox/trunk/src/gbxgarminacfr/driver.cpp 2008-06-09 04:36:01 UTC (rev 167)
@@ -330,7 +330,7 @@
if ( nmeaFailChecksumCount++ < nmeaFailChecksumMaxCount ) {
// tracer_.warning("Gps driver: Single message failed checksum. Not throwing an exception yet!" );
// debug
- cout<<now.tv_sec<<" "<<now.tv_usec<<" "<<nmeaFailChecksumCount<<<<" '"<<nmeaMessage.sentence()<<"'"<<endl;
+ cout<<now.tv_sec<<" "<<now.tv_usec<<" "<<nmeaFailChecksumCount<<" '"<<nmeaMessage.sentence()<<"'"<<endl;
continue;
}
else {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rus...@us...> - 2008-06-09 04:33:19
|
Revision: 166
http://gearbox.svn.sourceforge.net/gearbox/?rev=166&view=rev
Author: russo2503v
Date: 2008-06-08 21:33:27 -0700 (Sun, 08 Jun 2008)
Log Message:
-----------
keep debugging rare checksum problem
Modified Paths:
--------------
gearbox/trunk/src/gbxgarminacfr/driver.cpp
Modified: gearbox/trunk/src/gbxgarminacfr/driver.cpp
===================================================================
--- gearbox/trunk/src/gbxgarminacfr/driver.cpp 2008-06-09 04:25:52 UTC (rev 165)
+++ gearbox/trunk/src/gbxgarminacfr/driver.cpp 2008-06-09 04:33:27 UTC (rev 166)
@@ -330,7 +330,7 @@
if ( nmeaFailChecksumCount++ < nmeaFailChecksumMaxCount ) {
// tracer_.warning("Gps driver: Single message failed checksum. Not throwing an exception yet!" );
// debug
- cout<<now.tv_sec<<" "<<now.tv_usec<<" "<<nmeaFailChecksumCount<<endl;
+ cout<<now.tv_sec<<" "<<now.tv_usec<<" "<<nmeaFailChecksumCount<<<<" '"<<nmeaMessage.sentence()<<"'"<<endl;
continue;
}
else {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rus...@us...> - 2008-06-09 04:25:45
|
Revision: 165
http://gearbox.svn.sourceforge.net/gearbox/?rev=165&view=rev
Author: russo2503v
Date: 2008-06-08 21:25:52 -0700 (Sun, 08 Jun 2008)
Log Message:
-----------
accepted garmin driver
Modified Paths:
--------------
gearbox/trunk/src/CMakeLists.txt
gearbox/trunk/submitted/CMakeLists.txt
Added Paths:
-----------
gearbox/trunk/src/gbxgarminacfr/
Removed Paths:
-------------
gearbox/trunk/submitted/gbxgarminacfr/
Modified: gearbox/trunk/src/CMakeLists.txt
===================================================================
--- gearbox/trunk/src/CMakeLists.txt 2008-06-08 09:32:28 UTC (rev 164)
+++ gearbox/trunk/src/CMakeLists.txt 2008-06-09 04:25:52 UTC (rev 165)
@@ -9,5 +9,6 @@
ADD_SUBDIRECTORY( gbxadvancedexample )
ADD_SUBDIRECTORY( gbxserialacfr )
ADD_SUBDIRECTORY( gbxutilacfr )
+ADD_SUBDIRECTORY( gbxgarminacfr )
ADD_SUBDIRECTORY( gbxsickacfr )
ADD_SUBDIRECTORY( urg_nz )
Copied: gearbox/trunk/src/gbxgarminacfr (from rev 164, gearbox/trunk/submitted/gbxgarminacfr)
Modified: gearbox/trunk/submitted/CMakeLists.txt
===================================================================
--- gearbox/trunk/submitted/CMakeLists.txt 2008-06-08 09:32:28 UTC (rev 164)
+++ gearbox/trunk/submitted/CMakeLists.txt 2008-06-09 04:25:52 UTC (rev 165)
@@ -11,6 +11,5 @@
# Otherwise, maintain alphabetical order.
# E.g. ADD_SUBDIRECTORY( mydir )
- ADD_SUBDIRECTORY( gbxgarminacfr )
ENDIF( GBX_BUILD_SUBMITTED )
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rus...@us...> - 2008-06-08 09:32:25
|
Revision: 164
http://gearbox.svn.sourceforge.net/gearbox/?rev=164&view=rev
Author: russo2503v
Date: 2008-06-08 02:32:28 -0700 (Sun, 08 Jun 2008)
Log Message:
-----------
debugging instrumentation for failed rare checksums
Modified Paths:
--------------
gearbox/trunk/submitted/gbxgarminacfr/driver.cpp
Modified: gearbox/trunk/submitted/gbxgarminacfr/driver.cpp
===================================================================
--- gearbox/trunk/submitted/gbxgarminacfr/driver.cpp 2008-06-08 09:31:57 UTC (rev 163)
+++ gearbox/trunk/submitted/gbxgarminacfr/driver.cpp 2008-06-08 09:32:28 UTC (rev 164)
@@ -324,10 +324,13 @@
nmeaExceptionCount = 0;
// Only populate the data structures if our message passes the checksum!
+ const int nmeaFailChecksumMaxCount = 10;
if ( !nmeaMessage.haveValidChecksum() ) {
// Dont throw an exception on the first failed checksum.
- if ( nmeaFailChecksumCount++ < 3 ) {
- tracer_.warning("Gps driver: Single message failed checksum. Not throwing an exception yet!" );
+ if ( nmeaFailChecksumCount++ < nmeaFailChecksumMaxCount ) {
+// tracer_.warning("Gps driver: Single message failed checksum. Not throwing an exception yet!" );
+ // debug
+ cout<<now.tv_sec<<" "<<now.tv_usec<<" "<<nmeaFailChecksumCount<<endl;
continue;
}
else {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rus...@us...> - 2008-06-08 09:31:56
|
Revision: 163
http://gearbox.svn.sourceforge.net/gearbox/?rev=163&view=rev
Author: russo2503v
Date: 2008-06-08 02:31:57 -0700 (Sun, 08 Jun 2008)
Log Message:
-----------
added references
Modified Paths:
--------------
gearbox/trunk/submitted/gbxgarminacfr/doc.dox
Modified: gearbox/trunk/submitted/gbxgarminacfr/doc.dox
===================================================================
--- gearbox/trunk/submitted/gbxgarminacfr/doc.dox 2008-06-08 05:29:36 UTC (rev 162)
+++ gearbox/trunk/submitted/gbxgarminacfr/doc.dox 2008-06-08 09:31:57 UTC (rev 163)
@@ -60,7 +60,7 @@
- http://en.wikipedia.org/wiki/NMEA
- http://www.gpsinformation.org/dale/interface.htm
-@section gbx_library_gbxgarminacfr What is EPE?
+@section gbx_library_gbxgarminacfr_epe What is EPE?
Bits of information assembled by Duncan Mercer.
@@ -205,6 +205,15 @@
educational to observe.
@endverbatim
+@section gbx_library_gbxgarminacfr_checksum On message checksum
+
+from Garmin:
+http://www8.garmin.com/support/faqs/faq.jsp?faq=40
+
+Q. How is the checksum calculated in NMEA 0183?
+A. The checksum is the 8-bit exclusive OR (no start or stop bits) of all characters in the sentence, including the "," delimiters, between -- but not including -- the "$" and "*" delimiters.
+The hexadecimal value of the most significant and least significant 4 bits of the result are converted to two ASCII characters (0-9, A-F) for transmission. The most significant character is transmitted first.
+
*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rus...@us...> - 2008-06-08 05:29:29
|
Revision: 162
http://gearbox.svn.sourceforge.net/gearbox/?rev=162&view=rev
Author: russo2503v
Date: 2008-06-07 22:29:36 -0700 (Sat, 07 Jun 2008)
Log Message:
-----------
Modified Paths:
--------------
gearbox/trunk/submitted/gbxgarminacfr/doc.dox
Modified: gearbox/trunk/submitted/gbxgarminacfr/doc.dox
===================================================================
--- gearbox/trunk/submitted/gbxgarminacfr/doc.dox 2008-06-08 05:29:09 UTC (rev 161)
+++ gearbox/trunk/submitted/gbxgarminacfr/doc.dox 2008-06-08 05:29:36 UTC (rev 162)
@@ -56,7 +56,7 @@
@par References
-
-- http://www.novatel.com/Documents/Manuals/GPS+Reference.pdf>
+- http://www.novatel.com/Documents/Manuals/GPS+Reference.pdf
- http://en.wikipedia.org/wiki/NMEA
- http://www.gpsinformation.org/dale/interface.htm
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rus...@us...> - 2008-06-08 05:29:03
|
Revision: 161
http://gearbox.svn.sourceforge.net/gearbox/?rev=161&view=rev
Author: russo2503v
Date: 2008-06-07 22:29:09 -0700 (Sat, 07 Jun 2008)
Log Message:
-----------
added refs
Modified Paths:
--------------
gearbox/trunk/submitted/gbxgarminacfr/doc.dox
Modified: gearbox/trunk/submitted/gbxgarminacfr/doc.dox
===================================================================
--- gearbox/trunk/submitted/gbxgarminacfr/doc.dox 2008-06-06 01:34:27 UTC (rev 160)
+++ gearbox/trunk/submitted/gbxgarminacfr/doc.dox 2008-06-08 05:29:09 UTC (rev 161)
@@ -54,6 +54,12 @@
The test program reports back all messages received from the driver and prints out a few data fields for each message. When the fix type is reported as 0 ("Invalid"), only the number of satellites and the time stamp are meaningful.
+@par References
+-
+- http://www.novatel.com/Documents/Manuals/GPS+Reference.pdf>
+- http://en.wikipedia.org/wiki/NMEA
+- http://www.gpsinformation.org/dale/interface.htm
+
@section gbx_library_gbxgarminacfr What is EPE?
Bits of information assembled by Duncan Mercer.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rus...@us...> - 2008-06-06 02:41:53
|
Revision: 160
http://gearbox.svn.sourceforge.net/gearbox/?rev=160&view=rev
Author: russo2503v
Date: 2008-06-05 18:34:27 -0700 (Thu, 05 Jun 2008)
Log Message:
-----------
Modified Paths:
--------------
gearbox/trunk/doc/todo.dox
Modified: gearbox/trunk/doc/todo.dox
===================================================================
--- gearbox/trunk/doc/todo.dox 2008-06-06 01:33:29 UTC (rev 159)
+++ gearbox/trunk/doc/todo.dox 2008-06-06 01:34:27 UTC (rev 160)
@@ -33,6 +33,9 @@
@par Updated libraries
+- libGbxSickAcfr
+ - using 'size_t' instead of 'uint' to improve compatibility.
+
@par Removed libraries
@section gbx_doc_history_001 Changes in Release 0.0.1
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rus...@us...> - 2008-06-06 01:41:00
|
Revision: 159
http://gearbox.svn.sourceforge.net/gearbox/?rev=159&view=rev
Author: russo2503v
Date: 2008-06-05 18:33:29 -0700 (Thu, 05 Jun 2008)
Log Message:
-----------
using size_t instead of uint
Modified Paths:
--------------
gearbox/trunk/src/gbxserialacfr/test/serialloopbacktest.cpp
gearbox/trunk/src/gbxsickacfr/driver.cpp
gearbox/trunk/src/gbxsickacfr/messages.cpp
Modified: gearbox/trunk/src/gbxserialacfr/test/serialloopbacktest.cpp
===================================================================
--- gearbox/trunk/src/gbxserialacfr/test/serialloopbacktest.cpp 2008-06-05 08:38:13 UTC (rev 158)
+++ gearbox/trunk/src/gbxserialacfr/test/serialloopbacktest.cpp 2008-06-06 01:33:29 UTC (rev 159)
@@ -41,9 +41,9 @@
gbxserialacfr::Serial serial( argv[1], atoi(argv[2]), gbxserialacfr::Serial::Timeout(1,0) );
- const uint NUM_CHARS = 1000;
+ const int NUM_CHARS = 1000;
std::vector<std::string> stringList = getStringList();
- for ( uint i=0; i < NUM_CHARS; i++ )
+ for ( int i=0; i < NUM_CHARS; i++ )
{
int stringI = i % (stringList.size());
std::string sendString = stringList[stringI]+"\n";
Modified: gearbox/trunk/src/gbxsickacfr/driver.cpp
===================================================================
--- gearbox/trunk/src/gbxsickacfr/driver.cpp 2008-06-05 08:38:13 UTC (rev 158)
+++ gearbox/trunk/src/gbxsickacfr/driver.cpp 2008-06-06 01:33:29 UTC (rev 159)
@@ -379,7 +379,7 @@
if ( config_.baudRate != 38400 ) baudRates.push_back( 38400 );
if ( config_.baudRate != 500000 ) baudRates.push_back( 500000 );
- for ( uint baudRateI=0; baudRateI < baudRates.size(); baudRateI++ )
+ for ( size_t baudRateI=0; baudRateI < baudRates.size(); baudRateI++ )
{
stringstream ss;
ss << "Driver: Trying to connect at " << baudRates[baudRateI] << " baud.";
Modified: gearbox/trunk/src/gbxsickacfr/messages.cpp
===================================================================
--- gearbox/trunk/src/gbxsickacfr/messages.cpp 2008-06-05 08:38:13 UTC (rev 158)
+++ gearbox/trunk/src/gbxsickacfr/messages.cpp 2008-06-06 01:33:29 UTC (rev 159)
@@ -608,7 +608,7 @@
e->errorTypes.resize( len/2 );
e->errorCodes.resize( len/2 );
- for ( uint i=0; i < e->errorTypes.size(); i++ )
+ for ( size_t i=0; i < e->errorTypes.size(); i++ )
{
e->errorTypes[i] = buf[pos++];
e->errorCodes[i] = buf[pos++];
@@ -624,7 +624,7 @@
stringstream ss;
ss << "num errors: " << errorTypes.size() << endl;
- for ( uint i=0; i < errorTypes.size(); i++ )
+ for ( size_t i=0; i < errorTypes.size(); i++ )
{
ss << " " << i << ": " << errorTypeToString(errorTypes[i]) << ": " << errorCodeToString(errorCodes[i]) << endl;
}
@@ -636,7 +636,7 @@
{
assert( errorTypes.size() == errorCodes.size() );
- for ( uint i=0; i < errorTypes.size(); i++ )
+ for ( size_t i=0; i < errorTypes.size(); i++ )
{
// Check for still-relevant errors
if ( ! (errorTypes[i] & ERROR_TYPE_NO_LONGER_RELEVANT_MASK) )
@@ -654,7 +654,7 @@
{
assert( errorTypes.size() == errorCodes.size() );
- for ( uint i=0; i < errorTypes.size(); i++ )
+ for ( size_t i=0; i < errorTypes.size(); i++ )
{
// Check for still-relevant errors
if ( ! (errorTypes[i] & ERROR_TYPE_NO_LONGER_RELEVANT_MASK) )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rus...@us...> - 2008-06-05 08:38:18
|
Revision: 158
http://gearbox.svn.sourceforge.net/gearbox/?rev=158&view=rev
Author: russo2503v
Date: 2008-06-05 01:38:13 -0700 (Thu, 05 Jun 2008)
Log Message:
-----------
added an config option to ignore unknown messages
Modified Paths:
--------------
gearbox/trunk/submitted/gbxgarminacfr/driver.cpp
gearbox/trunk/submitted/gbxgarminacfr/driver.h
gearbox/trunk/submitted/gbxgarminacfr/test/test.cpp
Modified: gearbox/trunk/submitted/gbxgarminacfr/driver.cpp
===================================================================
--- gearbox/trunk/submitted/gbxgarminacfr/driver.cpp 2008-06-05 05:31:00 UTC (rev 157)
+++ gearbox/trunk/submitted/gbxgarminacfr/driver.cpp 2008-06-05 08:38:13 UTC (rev 158)
@@ -377,10 +377,12 @@
continue;
}
else {
+ stringstream ss; ss << "Message type unknown " << MsgType <<endl;
// if we get here the msg is unknown
- stringstream ErrMsg;
- ErrMsg << "Message type unknown " << MsgType <<endl;
- throw gbxutilacfr::Exception( ERROR_INFO, ErrMsg.str() );
+ if ( config_.ignoreUnknown )
+ tracer_.debug( ss.str() );
+ else
+ throw gbxutilacfr::Exception( ERROR_INFO, ss.str() );
}
}
Modified: gearbox/trunk/submitted/gbxgarminacfr/driver.h
===================================================================
--- gearbox/trunk/submitted/gbxgarminacfr/driver.h 2008-06-05 05:31:00 UTC (rev 157)
+++ gearbox/trunk/submitted/gbxgarminacfr/driver.h 2008-06-05 08:38:13 UTC (rev 158)
@@ -25,7 +25,8 @@
Config() :
readGga(true),
readVtg(true),
- readRme(true) {};
+ readRme(true),
+ ignoreUnknown(false) {};
//! Returns true if the configuration is sane. Checks include:
//! - a non-empty device name
@@ -44,6 +45,11 @@
bool readVtg;
//! Read PGRME sentence
bool readRme;
+
+ //! Ignore unknown messages. This driver tries to turn off all messages and then explicitely enables
+ //! the ones it understands. But with some devices this does not work and many messages types are received.
+ //! When ignoreUnknown is set to TRUE the driver quietly ignores the messages it does not understand.
+ bool ignoreUnknown;
};
//! Possible types GenericData can contain
Modified: gearbox/trunk/submitted/gbxgarminacfr/test/test.cpp
===================================================================
--- gearbox/trunk/submitted/gbxgarminacfr/test/test.cpp 2008-06-05 05:31:00 UTC (rev 157)
+++ gearbox/trunk/submitted/gbxgarminacfr/test/test.cpp 2008-06-05 08:38:13 UTC (rev 158)
@@ -53,6 +53,7 @@
config.readGga = true;
config.readVtg = true;
config.readRme = true;
+ config.ignoreUnknown = false;
if ( !config.isValid() ) {
cout << "Test: Invalid device configuration structure: " << config.toString() << endl;
exit(1);
@@ -60,7 +61,7 @@
cout << "Using configuration: " << config.toString() << endl;
// Instantiate objects to handle messages from the driver
- const bool debug = false;
+ const bool debug = true;
gbxutilacfr::TrivialTracer tracer( debug );
gbxutilacfr::TrivialStatus status( tracer );
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|