2 ******************************************************************************
4 * @file uavtalkplugin.cpp
5 * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
6 * @addtogroup GCSPlugins GCS Plugins
8 * @addtogroup UAVTalkPlugin UAVTalk Plugin
10 * @brief The UAVTalk protocol plugin
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
27 #include "uavtalkplugin.h"
29 #include <coreplugin/icore.h>
30 #include <coreplugin/connectionmanager.h>
32 UAVTalkPlugin::UAVTalkPlugin()
35 UAVTalkPlugin::~UAVTalkPlugin()
38 * Called once all the plugins which depend on us have been loaded
40 void UAVTalkPlugin::extensionsInitialized()
44 * Called at startup, before any plugin which depends on us is initialized
46 bool UAVTalkPlugin::initialize(const QStringList
& arguments
, QString
*errorString
)
50 Q_UNUSED(errorString
);
52 // Create TelemetryManager
53 telMngr
= new TelemetryManager();
54 addAutoReleasedObject(telMngr
);
56 // Connect to connection manager so we get notified when the user connect to his device
57 Core::ConnectionManager
*cm
= Core::ICore::instance()->connectionManager();
58 QObject::connect(cm
, SIGNAL(deviceConnected(QIODevice
*)),
59 this, SLOT(onDeviceConnect(QIODevice
*)));
60 QObject::connect(cm
, SIGNAL(deviceAboutToDisconnect()),
61 this, SLOT(onDeviceDisconnect()));
65 void UAVTalkPlugin::shutdown()
68 void UAVTalkPlugin::onDeviceConnect(QIODevice
*dev
)
73 void UAVTalkPlugin::onDeviceDisconnect()