|
From: <gb...@us...> - 2009-04-22 07:54:38
|
Revision: 395
http://gearbox.svn.sourceforge.net/gearbox/?rev=395&view=rev
Author: gbiggs
Date: 2009-04-22 07:54:31 +0000 (Wed, 22 Apr 2009)
Log Message:
-----------
Fixed mismatched and unsupported baud rates
Modified Paths:
--------------
gearbox/trunk/src/flexiport/serialport.cpp
gearbox/trunk/src/hokuyo_aist/hokuyo_aist.cpp
Modified: gearbox/trunk/src/flexiport/serialport.cpp
===================================================================
--- gearbox/trunk/src/flexiport/serialport.cpp 2009-04-17 02:08:40 UTC (rev 394)
+++ gearbox/trunk/src/flexiport/serialport.cpp 2009-04-22 07:54:31 UTC (rev 395)
@@ -143,8 +143,34 @@
return B57600;
case 115200:
return B115200;
+#if defined (__linux)
case 230400:
return B230400;
+ case 460800:
+ return B460800;
+ case 500000:
+ return B500000;
+ case 576000:
+ return B576000;
+ case 921600:
+ return B921600;
+ case 1000000:
+ return B1000000;
+ case 1152000:
+ return B1152000;
+ case 1500000:
+ return B1500000;
+ case 2000000:
+ return B2000000;
+ case 2500000:
+ return B2500000;
+ case 3000000:
+ return B3000000;
+ case 3500000:
+ return B3500000;
+ case 4000000:
+ return B4000000;
+#endif // __linux
#endif
default:
stringstream ss;
@@ -221,8 +247,34 @@
return 57600;
case B115200:
return 115200;
+#if defined (__linux)
case B230400:
return 230400;
+ case B460800:
+ return 460800;
+ case B500000:
+ return 500000;
+ case B576000:
+ return 576000;
+ case B921600:
+ return 921600;
+ case B1000000:
+ return 1000000;
+ case B1152000:
+ return 1152000;
+ case B1500000:
+ return 1500000;
+ case B2000000:
+ return 2000000;
+ case B2500000:
+ return 2500000;
+ case B3000000:
+ return 3000000;
+ case B3500000:
+ return 3500000;
+ case B4000000:
+ return 4000000;
+#endif // __linux
#endif
default:
stringstream ss;
Modified: gearbox/trunk/src/hokuyo_aist/hokuyo_aist.cpp
===================================================================
--- gearbox/trunk/src/hokuyo_aist/hokuyo_aist.cpp 2009-04-17 02:08:40 UTC (rev 394)
+++ gearbox/trunk/src/hokuyo_aist/hokuyo_aist.cpp 2009-04-22 07:54:31 UTC (rev 395)
@@ -968,7 +968,8 @@
if (_port->GetPortType () == "serial")
{
// Failed at the default baud rate, so try again at the other rates
- const unsigned int bauds[] = {750000, 500000, 250000, 115200, 57600, 38400, 19200};
+ // Note that a baud rate of 750000 or 250000 doesn't appear to be supported on any common OS
+ const unsigned int bauds[] = {500000, 115200, 57600, 38400, 19200};
const unsigned int numBauds = 7;
for (unsigned int ii = 0; ii < numBauds; ii++)
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|