-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 @@ -1389,13 +1389,13 @@ <property stdset="1"> <name>enabled</name> <bool>false</bool> </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> <property> <name>name</name> <cstring>Spacer4_2</cstring> 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 @@ -54,13 +54,13 @@ GpsLocation GPS::position() const { int numAvail = _socket->bytesAvailable(); qDebug( "GPS write succeeded, %d bytes available for reading...", numAvail ); 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 ) { qDebug( "GPS read %d bytes succeeded, invalid response: '%s'", numRead, &buf[0] ); return GpsLocation( -111, -111 ); } 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 @@ -45,12 +45,14 @@ using namespace Opie; #else #include "resource.h" #include <qapplication.h> #include <qfiledialog.h> #endif +#include <unistd.h> + WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * name, WFlags f ) :QMainWindow( parent, name, f ) { cw = new WellenreiterConfigWindow( this ); mw = new Wellenreiter( this ); mw->setConfigWindow( cw ); @@ -131,13 +133,13 @@ WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * n sniffer->setItemEnabled( startID, false ); stopID = sniffer->insertItem( tr( "Sto&p" ), mw, SLOT( stopClicked() ) ); sniffer->setItemEnabled( stopID, false ); 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 ); //mb->setItemEnabled( id, false ); id = mb->insertItem( tr( "&Sniffer" ), sniffer ); @@ -216,13 +218,13 @@ void WellenreiterMainWindow::changedSniffingState() } } WellenreiterMainWindow::~WellenreiterMainWindow() { - qDebug( "Wellenreiter:: bye." ); + qDebug( "Wellenreiter: bye." ); }; void WellenreiterMainWindow::demoAddStations() { //mw = 0; // test SIGSEGV handling @@ -236,16 +238,17 @@ void WellenreiterMainWindow::demoAddStations() 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; } QString WellenreiterMainWindow::getFileName( bool save ) { QMap<QString, QStringList> map; |