mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-27 16:54:15 +01:00
Minor tidying on GPS display
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1313 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
39a93a72fd
commit
85c335aa5d
@ -30,6 +30,15 @@
|
|||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
|
GpsDisplayThread::GpsDisplayThread(QObject *parent)
|
||||||
|
: QThread(parent)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
GpsDisplayThread::~GpsDisplayThread()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void GpsDisplayThread::setPort(QextSerialPort* port)
|
void GpsDisplayThread::setPort(QextSerialPort* port)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -35,12 +35,16 @@
|
|||||||
|
|
||||||
class GpsDisplayThread : public QThread
|
class GpsDisplayThread : public QThread
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
GpsDisplayThread(QObject *parent = 0);
|
||||||
|
~GpsDisplayThread();
|
||||||
|
|
||||||
QextSerialPort *port;
|
QextSerialPort *port;
|
||||||
NMEAParser *parser;
|
NMEAParser *parser;
|
||||||
void setPort(QextSerialPort* port);
|
void setPort(QextSerialPort* port);
|
||||||
void setParser(NMEAParser* parser);
|
void setParser(NMEAParser* parser);
|
||||||
void processInputStream();
|
|
||||||
void run();
|
void run();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -153,6 +153,12 @@ void GpsDisplayWidget::setPort(QextSerialPort* port)
|
|||||||
this->port=port;
|
this->port=port;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GpsDisplayWidget::setParser(NMEAParser* parser)
|
||||||
|
{
|
||||||
|
|
||||||
|
this->parser=parser;
|
||||||
|
}
|
||||||
|
|
||||||
void GpsDisplayWidget::connectButtonClicked() {
|
void GpsDisplayWidget::connectButtonClicked() {
|
||||||
GpsDisplayThread* gpsThread = new GpsDisplayThread();
|
GpsDisplayThread* gpsThread = new GpsDisplayThread();
|
||||||
widget->textBrowser->append(QString("Connecting to GPS ...\n"));
|
widget->textBrowser->append(QString("Connecting to GPS ...\n"));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user