2010-06-23 03:59:12 +02:00
|
|
|
/**
|
|
|
|
******************************************************************************
|
|
|
|
*
|
|
|
|
* @file gpsdisplaywidget.h
|
|
|
|
* @author Edouard Lafargue Copyright (C) 2010.
|
2010-07-16 12:33:27 +02:00
|
|
|
* @addtogroup GCSPlugins GCS Plugins
|
2010-06-23 03:59:12 +02:00
|
|
|
* @{
|
2010-07-16 12:33:27 +02:00
|
|
|
* @addtogroup GPSGadgetPlugin GPS Gadget Plugin
|
|
|
|
* @{
|
|
|
|
* @brief A gadget that displays GPS status and enables basic configuration
|
2010-06-23 03:59:12 +02:00
|
|
|
*****************************************************************************/
|
|
|
|
/*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
|
|
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
* for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef GPSDISPLAYWIDGET_H_
|
|
|
|
#define GPSDISPLAYWIDGET_H_
|
|
|
|
|
|
|
|
#include "gpsdisplaygadgetconfiguration.h"
|
|
|
|
#include "uavobjects/uavobject.h"
|
|
|
|
#include <QGraphicsView>
|
|
|
|
#include <QtSvg/QSvgRenderer>
|
|
|
|
#include <QtSvg/QGraphicsSvgItem>
|
|
|
|
|
|
|
|
#include <QFile>
|
|
|
|
#include <QTimer>
|
2010-08-07 11:33:12 +02:00
|
|
|
#include "nmeaparser.h"
|
2010-06-23 03:59:12 +02:00
|
|
|
|
|
|
|
class Ui_GpsDisplayWidget;
|
|
|
|
|
|
|
|
class GpsDisplayWidget : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
GpsDisplayWidget(QWidget *parent = 0);
|
|
|
|
~GpsDisplayWidget();
|
|
|
|
|
|
|
|
// void setMode(QString mode); // Either UAVTalk or serial port
|
2010-08-05 21:19:41 +02:00
|
|
|
void setPort(QextSerialPort* port);
|
2010-08-07 11:33:12 +02:00
|
|
|
void setParser(NMEAParser *parser);
|
2010-06-23 03:59:12 +02:00
|
|
|
|
|
|
|
private slots:
|
|
|
|
void connectButtonClicked();
|
2010-08-29 23:20:32 +02:00
|
|
|
void disconnectButtonClicked();
|
|
|
|
void onDataAvailable();
|
2010-08-07 11:33:12 +02:00
|
|
|
void setSVs(int);
|
|
|
|
void setPosition(double, double, double);
|
2010-08-09 08:41:10 +02:00
|
|
|
void setDateTime(double, double);
|
|
|
|
void setSpeedHeading(double, double);
|
2010-08-12 00:58:40 +02:00
|
|
|
void dumpPacket(char*);
|
2010-06-23 03:59:12 +02:00
|
|
|
|
|
|
|
private:
|
2010-08-29 23:20:32 +02:00
|
|
|
void processNewSerialData(QByteArray serialData);
|
2010-06-23 03:59:12 +02:00
|
|
|
Ui_GpsDisplayWidget* widget;
|
2010-08-05 21:19:41 +02:00
|
|
|
QextSerialPort *port;
|
2010-08-07 11:33:12 +02:00
|
|
|
NMEAParser *parser;
|
2010-06-23 03:59:12 +02:00
|
|
|
bool connected;
|
|
|
|
|
|
|
|
};
|
|
|
|
#endif /* GPSDISPLAYWIDGET_H_ */
|