author | mickeyl <mickeyl> | 2004-02-15 18:54:55 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-02-15 18:54:55 (UTC) |
commit | ef7f95fa147c7675999b091c76b081029c415d19 (patch) (side-by-side diff) | |
tree | 5563bb2697fa1764814adf28c276f310f069c05d /noncore | |
parent | 842923f72761677ea132c16a23091c5ee3a35780 (diff) | |
download | opie-ef7f95fa147c7675999b091c76b081029c415d19.zip opie-ef7f95fa147c7675999b091c76b081029c415d19.tar.gz opie-ef7f95fa147c7675999b091c76b081029c415d19.tar.bz2 |
default gps speed now 4800 - seems to be more compatible
-rw-r--r-- | noncore/net/wellenreiter/gui/configbase.ui | 2 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/gps.cpp | 2 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/mainwindow.cpp | 9 |
3 files changed, 8 insertions, 5 deletions
diff --git a/noncore/net/wellenreiter/gui/configbase.ui b/noncore/net/wellenreiter/gui/configbase.ui index de6abfc..469effe 100644 --- a/noncore/net/wellenreiter/gui/configbase.ui +++ b/noncore/net/wellenreiter/gui/configbase.ui @@ -1392,7 +1392,7 @@ </property> <property stdset="1"> <name>text</name> - <string>gpsd -p /dev/ttyS3 -s 57600</string> + <string>gpsd -p /dev/ttyS3 -s 4800</string> </property> </widget> <spacer> diff --git a/noncore/net/wellenreiter/gui/gps.cpp b/noncore/net/wellenreiter/gui/gps.cpp index 5b1b4a4..b845aa1 100644 --- a/noncore/net/wellenreiter/gui/gps.cpp +++ b/noncore/net/wellenreiter/gui/gps.cpp @@ -57,7 +57,7 @@ GpsLocation GPS::position() const if ( numAvail ) { int numRead = _socket->readBlock( &buf[0], sizeof buf ); - int numScan = sscanf( &buf[0], "GPSD,P=%lg %lg", &lat, &lon); + int numScan = ::sscanf( &buf[0], "GPSD,P=%lg %lg", &lat, &lon); if ( numRead < 7 || numScan != 2 ) { diff --git a/noncore/net/wellenreiter/gui/mainwindow.cpp b/noncore/net/wellenreiter/gui/mainwindow.cpp index 72624f7..3729ed0 100644 --- a/noncore/net/wellenreiter/gui/mainwindow.cpp +++ b/noncore/net/wellenreiter/gui/mainwindow.cpp @@ -48,6 +48,8 @@ using namespace Opie; #include <qfiledialog.h> #endif +#include <unistd.h> + WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * name, WFlags f ) :QMainWindow( parent, name, f ) { @@ -134,7 +136,7 @@ WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * n QPopupMenu* demo = new QPopupMenu( mb ); demo->insertItem( tr( "&Add something" ), this, SLOT( demoAddStations() ) ); - demo->insertItem( tr( "&Read from GPSd" ), this, SLOT( demoReadFromGps() ) ); + //demo->insertItem( tr( "&Read from GPSd" ), this, SLOT( demoReadFromGps() ) ); id = mb->insertItem( tr( "&File" ), file ); //id = mb->insertItem( tr( "&View" ), view ); @@ -219,7 +221,7 @@ void WellenreiterMainWindow::changedSniffingState() WellenreiterMainWindow::~WellenreiterMainWindow() { - qDebug( "Wellenreiter:: bye." ); + qDebug( "Wellenreiter: bye." ); }; @@ -239,10 +241,11 @@ void WellenreiterMainWindow::demoReadFromGps() { WellenreiterConfigWindow* configwindow = WellenreiterConfigWindow::instance(); GPS* gps = new GPS( this ); + qDebug( "Wellenreiter::demoReadFromGps(): url=gps://%s:%d/", (const char*) configwindow->gpsdHost->currentText(), configwindow->gpsdPort->value() ); gps->open( configwindow->gpsdHost->currentText(), configwindow->gpsdPort->value() ); GpsLocation loc = gps->position(); - QMessageBox::information( this, "Wellenreiter/Opie", tr( "GPS said:\n%1" ).arg( loc.dmsPosition() ) ); + delete gps; } |