author | mickeyl <mickeyl> | 2004-02-15 18:54:55 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-02-15 18:54:55 (UTC) |
commit | ef7f95fa147c7675999b091c76b081029c415d19 (patch) (unidiff) | |
tree | 5563bb2697fa1764814adf28c276f310f069c05d /noncore/net | |
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 @@ | |||
1392 | </property> | 1392 | </property> |
1393 | <property stdset="1"> | 1393 | <property stdset="1"> |
1394 | <name>text</name> | 1394 | <name>text</name> |
1395 | <string>gpsd -p /dev/ttyS3 -s 57600</string> | 1395 | <string>gpsd -p /dev/ttyS3 -s 4800</string> |
1396 | </property> | 1396 | </property> |
1397 | </widget> | 1397 | </widget> |
1398 | <spacer> | 1398 | <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 | |||
57 | if ( numAvail ) | 57 | if ( numAvail ) |
58 | { | 58 | { |
59 | int numRead = _socket->readBlock( &buf[0], sizeof buf ); | 59 | int numRead = _socket->readBlock( &buf[0], sizeof buf ); |
60 | int numScan = sscanf( &buf[0], "GPSD,P=%lg %lg", &lat, &lon); | 60 | int numScan = ::sscanf( &buf[0], "GPSD,P=%lg %lg", &lat, &lon); |
61 | 61 | ||
62 | if ( numRead < 7 || numScan != 2 ) | 62 | if ( numRead < 7 || numScan != 2 ) |
63 | { | 63 | { |
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; | |||
48 | #include <qfiledialog.h> | 48 | #include <qfiledialog.h> |
49 | #endif | 49 | #endif |
50 | 50 | ||
51 | #include <unistd.h> | ||
52 | |||
51 | WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * name, WFlags f ) | 53 | WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * name, WFlags f ) |
52 | :QMainWindow( parent, name, f ) | 54 | :QMainWindow( parent, name, f ) |
53 | { | 55 | { |
@@ -134,7 +136,7 @@ WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * n | |||
134 | 136 | ||
135 | QPopupMenu* demo = new QPopupMenu( mb ); | 137 | QPopupMenu* demo = new QPopupMenu( mb ); |
136 | demo->insertItem( tr( "&Add something" ), this, SLOT( demoAddStations() ) ); | 138 | demo->insertItem( tr( "&Add something" ), this, SLOT( demoAddStations() ) ); |
137 | demo->insertItem( tr( "&Read from GPSd" ), this, SLOT( demoReadFromGps() ) ); | 139 | //demo->insertItem( tr( "&Read from GPSd" ), this, SLOT( demoReadFromGps() ) ); |
138 | 140 | ||
139 | id = mb->insertItem( tr( "&File" ), file ); | 141 | id = mb->insertItem( tr( "&File" ), file ); |
140 | //id = mb->insertItem( tr( "&View" ), view ); | 142 | //id = mb->insertItem( tr( "&View" ), view ); |
@@ -219,7 +221,7 @@ void WellenreiterMainWindow::changedSniffingState() | |||
219 | 221 | ||
220 | WellenreiterMainWindow::~WellenreiterMainWindow() | 222 | WellenreiterMainWindow::~WellenreiterMainWindow() |
221 | { | 223 | { |
222 | qDebug( "Wellenreiter:: bye." ); | 224 | qDebug( "Wellenreiter: bye." ); |
223 | }; | 225 | }; |
224 | 226 | ||
225 | 227 | ||
@@ -239,10 +241,11 @@ void WellenreiterMainWindow::demoReadFromGps() | |||
239 | { | 241 | { |
240 | WellenreiterConfigWindow* configwindow = WellenreiterConfigWindow::instance(); | 242 | WellenreiterConfigWindow* configwindow = WellenreiterConfigWindow::instance(); |
241 | GPS* gps = new GPS( this ); | 243 | GPS* gps = new GPS( this ); |
244 | qDebug( "Wellenreiter::demoReadFromGps(): url=gps://%s:%d/", (const char*) configwindow->gpsdHost->currentText(), configwindow->gpsdPort->value() ); | ||
242 | gps->open( configwindow->gpsdHost->currentText(), configwindow->gpsdPort->value() ); | 245 | gps->open( configwindow->gpsdHost->currentText(), configwindow->gpsdPort->value() ); |
243 | GpsLocation loc = gps->position(); | 246 | GpsLocation loc = gps->position(); |
244 | |||
245 | QMessageBox::information( this, "Wellenreiter/Opie", tr( "GPS said:\n%1" ).arg( loc.dmsPosition() ) ); | 247 | QMessageBox::information( this, "Wellenreiter/Opie", tr( "GPS said:\n%1" ).arg( loc.dmsPosition() ) ); |
248 | delete gps; | ||
246 | } | 249 | } |
247 | 250 | ||
248 | 251 | ||