2 ******************************************************************************
4 * @file antennatrackwidget.h
5 * @author Sami Korhonen & the OpenPilot team Copyright (C) 2010.
6 * @addtogroup GCSPlugins GCS Plugins
8 * @addtogroup AntennaTrackGadgetPlugin Antenna Track Gadget Plugin
10 * @brief A gadget that communicates with antenna tracker and enables basic configuration
11 *****************************************************************************/
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 3 of the License, or
16 * (at your option) any later version.
18 * This program is distributed in the hope that it will be useful, but
19 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
20 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
23 * You should have received a copy of the GNU General Public License along
24 * with this program; if not, write to the Free Software Foundation, Inc.,
25 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28 #ifndef ANTENNATRACKWIDGET_H_
29 #define ANTENNATRACKWIDGET_H_
31 #include "ui_antennatrackwidget.h"
32 #include "antennatrackgadgetconfiguration.h"
33 #include "uavobject.h"
34 #include <QGraphicsView>
35 #include <QtSvg/QSvgRenderer>
36 #include <QtSvg/QGraphicsSvgItem>
37 #include <QtSerialPort/QSerialPort>
40 class Ui_AntennaTrackWidget
;
42 typedef struct struct_TrackData
{
51 class AntennaTrackWidget
: public QWidget
, public Ui_AntennaTrackWidget
{
55 AntennaTrackWidget(QWidget
*parent
= 0);
56 ~AntennaTrackWidget();
57 TrackData_t TrackData
;
58 void setPort(QPointer
<QSerialPort
> portx
);
61 void setPosition(double, double, double);
62 void setHomePosition(double, double, double);
63 void dumpPacket(const QString
&packet
);
66 void calcAntennaPosition(void);
67 QGraphicsSvgItem
*marker
;
68 QPointer
<QSerialPort
> port
;
72 #endif /* ANTENNATRACKWIDGET_H_ */