Commit 19e8d0ea authored by lm's avatar lm

Merge branch 'experimental' of github.com:pixhawk/qgroundcontrol into experimental

parents 7bb6dc15 b9863c56
......@@ -368,11 +368,13 @@ namespace qmapcontrol
layermanager->zoomIn();
update();
}
void MapControl::zoomOut()
{
layermanager->zoomOut();
update();
}
void MapControl::setZoom(int zoomlevel)
{
layermanager->setZoom(zoomlevel);
......
#include "SlugsMavUnitTest.h"
SlugsMavUnitTest::SlugsMavUnitTest()
{
}
void SlugsMavUnitTest::initTestCase()
{
}
void SlugsMavUnitTest::cleanupTestCase()
{
}
void SlugsMavUnitTest::first_test()
{
QCOMPARE(1,2);
}
#include "SlugsMavUnitTest.h"
SlugsMavUnitTest::SlugsMavUnitTest()
{
}
void SlugsMavUnitTest::initTestCase()
{
mav = new MAVLinkProtocol();
slugsMav = new SlugsMAV(mav, UASID);
}
void SlugsMavUnitTest::cleanupTestCase()
{
delete slugsMav;
delete mav;
}
void SlugsMavUnitTest::first_test()
{
QCOMPARE(1,1);
}
void SlugsMavUnitTest::getPwmCommands_test()
{
mavlink_pwm_commands_t* k = slugsMav->getPwmCommands();
k->aux1=80;
mavlink_pwm_commands_t* k2 = slugsMav->getPwmCommands();
k2->aux1=81;
QCOMPARE(k->aux1, k2->aux1);
}
#ifndef SLUGSMAVUNITTEST_H
#define SLUGSMAVUNITTEST_H
#include <QObject>
#include <QtCore/QString>
#include <QtTest/QtTest>
#include "UAS.h"
#include "MAVLinkProtocol.h"
#include "UASInterface.h"
#include "AutoTest.h"
class SlugsMavUnitTest : public QObject
{
Q_OBJECT
public:
SlugsMavUnitTest();
signals:
private slots:
void initTestCase();
void cleanupTestCase();
void first_test();
};
DECLARE_TEST(SlugsMavUnitTest)
#endif // SLUGSMAVUNITTEST_H
#ifndef SLUGSMAVUNITTEST_H
#define SLUGSMAVUNITTEST_H
#include <QObject>
#include <QtCore/QString>
#include <QtTest/QtTest>
#include "UAS.h"
#include "MAVLinkProtocol.h"
#include "UASInterface.h"
#include "AutoTest.h"
#include "SlugsMAV.h"
class SlugsMavUnitTest : public QObject
{
Q_OBJECT
public:
#define UASID 5
MAVLinkProtocol* mav;
SlugsMAV* slugsMav;
SlugsMavUnitTest();
signals:
private slots:
void initTestCase();
void cleanupTestCase();
void first_test();
void getPwmCommands_test();
};
DECLARE_TEST(SlugsMavUnitTest)
#endif // SLUGSMAVUNITTEST_H
This diff is collapsed.
......@@ -4,51 +4,63 @@
#include <QObject>
#include <QtCore/QString>
#include <QtTest/QtTest>
#include <QApplication>
#include "UAS.h"
#include "MAVLinkProtocol.h"
#include "SerialLink.h"
#include "UASInterface.h"
#include "AutoTest.h"
#include "LinkManager.h"
#include "UASWaypointManager.h"
#include "SerialLink.h"
#include "LinkInterface.h"
class UASUnitTest : public QObject
{
Q_OBJECT
public:
#define UASID 50
MAVLinkProtocol* mav;
UAS* uas;
SerialLink* link;
UASUnitTest();
#define UASID 100
MAVLinkProtocol* mav;
UAS* uas;
UASUnitTest();
signals:
private slots:
void initTestCase();
void cleanupTestCase();
void getUASID_test();
void getUASName_test();
void getUpTime_test();
void getCommunicationStatus_test();
void filterVoltage_test();
void getAutopilotType_test();
void setAutopilotType_test();
void getStatusForCode_test();
void getLocalX_test();
void getLocalY_test();
void getLocalZ_test();
void getLatitude_test();
void getLongitude_test();
void getAltitude_test();
void getRoll_test();
void getPitch_test();
void getYaw_test();
void attitudeLimitsZero_test();
void attitudeLimitsPi_test();
void attitudeLimitsMinusPi_test();
void attitudeLimitsTwoPi_test();
void attitudeLimitsMinusTwoPi_test();
void attitudeLimitsTwoPiOne_test();
void attitudeLimitsMinusTwoPiOne_test();
void initTestCase();
void cleanupTestCase();
void getUASID_test();
void getUASName_test();
void getUpTime_test();
void getCommunicationStatus_test();
void filterVoltage_test();
void getAutopilotType_test();
void setAutopilotType_test();
void getStatusForCode_test();
void getLocalX_test();
void getLocalY_test();
void getLocalZ_test();
void getLatitude_test();
void getLongitude_test();
void getAltitude_test();
void getRoll_test();
void getPitch_test();
void getYaw_test();
void getSelected_test();
void getSystemType_test();
void getAirframe_test();
void getWaypointList_test();
void getWaypoint_test();
void signalWayPoint_test();
void signalUASLink_test();
void signalIdUASLink_test();
protected:
UAS *prueba;
......
......@@ -395,7 +395,8 @@ win32-g++ {
message(Building for Windows Platform (32bit))
# Special settings for debug
#CONFIG += CONSOLE
CONFIG += CONSOLE
OUTPUT += CONSOLE
INCLUDEPATH += $$BASEDIR/lib/sdl/include \
$$BASEDIR/lib/opal/include #\ #\
......
......@@ -146,8 +146,6 @@ FORMS += src/ui/MainWindow.ui \
src/ui/map3D/QGCGoogleEarthView.ui \
src/ui/SlugsDataSensorView.ui \
src/ui/SlugsHilSim.ui \
src/ui/SlugsPIDControl.ui \
src/ui/SlugsVideoCamControl.ui \
src/ui/SlugsPadCameraControl.ui \
src/ui/uas/QGCUnconnectedInfoWidget.ui \
src/ui/designer/QGCToolWidget.ui \
......@@ -159,6 +157,7 @@ FORMS += src/ui/MainWindow.ui \
src/ui/mission/QGCCustomWaypointAction.ui \
src/ui/QGCUDPLinkConfiguration.ui \
src/ui/QGCSettingsWidget.ui \
src/ui/UASControlParameters.ui \
src/ui/mission/QGCMissionDoWidget.ui \
src/ui/mission/QGCMissionConditionWidget.ui
......@@ -256,8 +255,6 @@ HEADERS += src/MG.h \
src/ui/map3D/QGCWebPage.h \
src/ui/SlugsDataSensorView.h \
src/ui/SlugsHilSim.h \
src/ui/SlugsPIDControl.h \
src/ui/SlugsVideoCamControl.h \
src/ui/SlugsPadCameraControl.h \
src/ui/QGCMainWindowAPConfigurator.h \
src/comm/MAVLinkSwarmSimulationLink.h \
......@@ -274,6 +271,7 @@ HEADERS += src/MG.h \
src/ui/QGCWaypointListMulti.h \
src/ui/QGCUDPLinkConfiguration.h \
src/ui/QGCSettingsWidget.h \
src/ui/uas/UASControlParameters.h \
src/ui/mission/QGCMissionDoWidget.h \
src/ui/mission/QGCMissionConditionWidget.h \
src/uas/QGCUASParamManager.h
......@@ -387,8 +385,6 @@ SOURCES += src/main.cc \
src/ui/map3D/QGCWebPage.cc \
src/ui/SlugsDataSensorView.cc \
src/ui/SlugsHilSim.cc \
src/ui/SlugsPIDControl.cpp \
src/ui/SlugsVideoCamControl.cpp \
src/ui/SlugsPadCameraControl.cpp \
src/ui/QGCMainWindowAPConfigurator.cc \
src/comm/MAVLinkSwarmSimulationLink.cc \
......@@ -405,6 +401,7 @@ SOURCES += src/main.cc \
src/ui/QGCWaypointListMulti.cc \
src/ui/QGCUDPLinkConfiguration.cc \
src/ui/QGCSettingsWidget.cc \
src/ui/uas/UASControlParameters.cpp \
src/ui/mission/QGCMissionDoWidget.cc \
src/ui/mission/QGCMissionConditionWidget.cc \
src/uas/QGCUASParamManager.cc
......@@ -469,3 +466,6 @@ win32:exists(src/lib/opalrt/OpalApi.h):exists(C:/OPAL-RT/RT-LAB7.2.4/Common/bin)
FORMS += src/ui/OpalLinkSettings.ui
DEFINES += OPAL_RT
}
TRANSLATIONS += es-MX.ts \
en-US.ts
......@@ -65,8 +65,11 @@ This file is part of the QGROUNDCONTROL project
* @param argv The string array of parameters
**/
Core::Core(int &argc, char* argv[]) : QApplication(argc, argv)
{
// Set application name
this->setApplicationName(QGC_APPLICATION_NAME);
this->setApplicationVersion(QGC_APPLICATION_VERSION);
......
......@@ -324,6 +324,7 @@ void MAVLinkProtocol::receiveBytes(LinkInterface* link, QByteArray b)
currLossCounter = 0;
currReceiveCounter = 0;
emit receiveLossChanged(message.sysid, receiveLoss);
//qDebug() << "LOSSCHANGED" << message.sysid<<" "<<receiveLoss;
}
// The packet is emitted as a whole, as it is only 255 - 261 bytes short
......
......@@ -161,7 +161,7 @@ void UDPLink::writeBytes(const char* data, qint64 size)
unsigned char v =data[i];
qDebug("%02x ", v);
}
qDebug("\n");
qDebug() <<"Sent to " << currentHost.toString() << ":" << currentPort;
socket->writeDatagram(data, size, currentHost, currentPort);
}
......
......@@ -39,6 +39,21 @@ This file is part of the QGROUNDCONTROL project
#undef main
#endif
// Install a message handler so you do not need
// the MSFT debug tools installed to se
// qDebug(), qWarning(), qCritical and qAbort
#ifdef Q_OS_WIN
void msgHandler( QtMsgType type, const char* msg )
{
const char symbols[] = { 'I', 'E', '!', 'X' };
QString output = QString("[%1] %2").arg( symbols[type] ).arg( msg );
std::cerr << output.toStdString() << std::endl;
if( type == QtFatalMsg ) abort();
}
#endif
/**
* @brief Starts the application
*
......@@ -46,9 +61,15 @@ This file is part of the QGROUNDCONTROL project
* @param argv Commandline arguments
* @return exit code, 0 for normal exit and !=0 for error cases
*/
int main(int argc, char *argv[])
{
// install the message handler
#ifdef Q_OS_WIN
qInstallMsgHandler( msgHandler );
#endif
Core core(argc, argv);
return core.exec();
}
This diff is collapsed.
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009, 2010 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL 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.
QGROUNDCONTROL 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 QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
#ifndef SLUGSMAV_H
#define SLUGSMAV_H
#include "UAS.h"
#include "mavlink.h"
#include <QTimer>
#define SLUGS_UPDATE_RATE 100 // in ms
class SlugsMAV : public UAS
{
Q_OBJECT
Q_INTERFACES(UASInterface)
public:
SlugsMAV(MAVLinkProtocol* mavlink, int id = 0);
public slots:
/** @brief Receive a MAVLink message from this MAV */
void receiveMessage(LinkInterface* link, mavlink_message_t message);
void emitSignals (void);
#ifdef MAVLINK_ENABLED_SLUGS
mavlink_pwm_commands_t* getPwmCommands();
#endif
signals:
void slugsRawImu(int uasId, const mavlink_raw_imu_t& rawData);
void slugsGPSCogSog(int uasId, double cog, double sog);
#ifdef MAVLINK_ENABLED_SLUGS
void slugsCPULoad(int systemId, const mavlink_cpu_load_t& cpuLoad);
void slugsAirData(int systemId, const mavlink_air_data_t& airData);
void slugsSensorBias(int systemId, const mavlink_sensor_bias_t& sensorBias);
void slugsDiagnostic(int systemId, const mavlink_diagnostic_t& diagnostic);
void slugsPilotConsolePWM(int systemId, const mavlink_pilot_console_t& pilotConsole);
void slugsPWM(int systemId, const mavlink_pwm_commands_t& pwmCommands);
void slugsNavegation(int systemId, const mavlink_slugs_navigation_t& slugsNavigation);
void slugsDataLog(int systemId, const mavlink_data_log_t& dataLog);
void slugsFilteredData(int systemId, const mavlink_filtered_data_t& filteredData);
void slugsGPSDateTime(int systemId, const mavlink_gps_date_time_t& gpsDateTime);
void slugsActionAck(int systemId, const mavlink_action_ack_t& actionAck);
void slugsPidValues(int systemId, const mavlink_pid_t& pidValues);
void slugsBootMsg(int uasId, mavlink_boot_t& boot);
void slugsAttitude(int uasId, mavlink_attitude_t& attitude);
#endif
protected:
typedef struct _mavlink_pid_values_t {
float P[11];
float I[11];
float D[11];
}mavlink_pid_values_t;
unsigned char updateRoundRobin;
QTimer* widgetTimer;
mavlink_raw_imu_t mlRawImuData;
#ifdef MAVLINK_ENABLED_SLUGS
mavlink_gps_raw_t mlGpsData;
mavlink_attitude_t mlAttitude;
mavlink_cpu_load_t mlCpuLoadData;
mavlink_air_data_t mlAirData;
mavlink_sensor_bias_t mlSensorBiasData;
mavlink_diagnostic_t mlDiagnosticData;
mavlink_pilot_console_t mlPilotConsoleData;
mavlink_filtered_data_t mlFilteredData;
mavlink_boot_t mlBoot;
mavlink_gps_date_time_t mlGpsDateTime;
mavlink_mid_lvl_cmds_t mlMidLevelCommands;
mavlink_set_mode_t mlApMode;
mavlink_pwm_commands_t mlPwmCommands;
mavlink_pid_values_t mlPidValues;
mavlink_pid_t mlSinglePid;
mavlink_slugs_navigation_t mlNavigation;
mavlink_data_log_t mlDataLog;
mavlink_ctrl_srfc_pt_t mlPassthrough;
mavlink_action_ack_t mlActionAck;
mavlink_slugs_action_t mlAction;
// Standart messages MAVLINK used by SLUGS
private:
void emitGpsSignals (void);
void emitPidSignal(void);
int uasId;
#endif // if SLUGS
};
#endif // SLUGSMAV_H
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009, 2010 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL 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.
QGROUNDCONTROL 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 QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
#ifndef SLUGSMAV_H
#define SLUGSMAV_H
#include "UAS.h"
#include "mavlink.h"
#include <QTimer>
#define SLUGS_UPDATE_RATE 200 // in ms
class SlugsMAV : public UAS
{
Q_OBJECT
Q_INTERFACES(UASInterface)
enum SLUGS_ACTION {
SLUGS_ACTION_NONE,
SLUGS_ACTION_SUCCESS,
SLUGS_ACTION_FAIL,
SLUGS_ACTION_EEPROM,
SLUGS_ACTION_MODE_CHANGE,
SLUGS_ACTION_MODE_REPORT,
SLUGS_ACTION_PT_CHANGE,
SLUGS_ACTION_PT_REPORT,
SLUGS_ACTION_PID_CHANGE,
SLUGS_ACTION_PID_REPORT,
SLUGS_ACTION_WP_CHANGE,
SLUGS_ACTION_WP_REPORT,
SLUGS_ACTION_MLC_CHANGE,
SLUGS_ACTION_MLC_REPORT
};
public:
SlugsMAV(MAVLinkProtocol* mavlink, int id = 0);
public slots:
/** @brief Receive a MAVLink message from this MAV */
void receiveMessage(LinkInterface* link, mavlink_message_t message);
void emitSignals (void);
signals:
void slugsRawImu(int uasId, const mavlink_raw_imu_t& rawData);
void slugsGPSCogSog(int uasId, double cog, double sog);
#ifdef MAVLINK_ENABLED_SLUGS
void slugsCPULoad(int systemId, const mavlink_cpu_load_t& cpuLoad);
void slugsAirData(int systemId, const mavlink_air_data_t& airData);
void slugsSensorBias(int systemId, const mavlink_sensor_bias_t& sensorBias);
void slugsDiagnostic(int systemId, const mavlink_diagnostic_t& diagnostic);
void slugsNavegation(int systemId, const mavlink_slugs_navigation_t& slugsNavigation);
void slugsDataLog(int systemId, const mavlink_data_log_t& dataLog);
void slugsGPSDateTime(int systemId, const mavlink_gps_date_time_t& gpsDateTime);
void slugsActionAck(int systemId, const mavlink_action_ack_t& actionAck);
void slugsBootMsg(int uasId, mavlink_boot_t& boot);
void slugsAttitude(int uasId, mavlink_attitude_t& attitude);
void slugsScaled(int uasId, const mavlink_scaled_imu_t& scaled);
void slugsServo(int uasId, const mavlink_servo_output_raw_t& servo);
void slugsChannels(int uasId, const mavlink_rc_channels_raw_t& channels);
#endif
protected:
unsigned char updateRoundRobin;
QTimer* widgetTimer;
mavlink_raw_imu_t mlRawImuData;
#ifdef MAVLINK_ENABLED_SLUGS
mavlink_gps_raw_t mlGpsData;
mavlink_attitude_t mlAttitude;
mavlink_cpu_load_t mlCpuLoadData;
mavlink_air_data_t mlAirData;
mavlink_sensor_bias_t mlSensorBiasData;
mavlink_diagnostic_t mlDiagnosticData;
mavlink_boot_t mlBoot;
mavlink_gps_date_time_t mlGpsDateTime;
mavlink_mid_lvl_cmds_t mlMidLevelCommands;
mavlink_set_mode_t mlApMode;
mavlink_slugs_navigation_t mlNavigation;
mavlink_data_log_t mlDataLog;
mavlink_ctrl_srfc_pt_t mlPassthrough;
mavlink_action_ack_t mlActionAck;
mavlink_slugs_action_t mlAction;
mavlink_scaled_imu_t mlScaled;
mavlink_servo_output_raw_t mlServo;
mavlink_rc_channels_raw_t mlChannels;
// Standart messages MAVLINK used by SLUGS
private:
void emitGpsSignals (void);
void emitPidSignal(void);
int uasId;
#endif // if SLUGS
};
#endif // SLUGSMAV_H
This diff is collapsed.
......@@ -233,6 +233,13 @@ public slots:
void home();
void halt();
void go();
/** @brief Places the UAV in Hardware-in-the-Loop simulation status **/
void startHil();
/** @brief Stops the UAV's Hardware-in-the-Loop simulation status **/
void stopHil();
/** @brief Stops the robot system. If it is an MAV, the robot starts the emergency landing procedure **/
void emergencySTOP();
......@@ -365,6 +372,9 @@ protected slots:
// MESSAGE RECEPTION
/** @brief Receive a named value message */
void receiveMessageNamedValue(const mavlink_message_t& message);
private:
// unsigned int mode; ///< The current mode of the MAV
};
......
......@@ -138,7 +138,7 @@ void UASWaypointManager::handleWaypoint(quint8 systemId, quint8 compId, mavlink_
if(wp->seq == current_wp_id)
{
//qDebug() << "Got WP: " << wp->seq << wp->x << wp->y << wp->z << wp->param4 << "auto:" << wp->autocontinue << "curr:" << wp->current << wp->param1 << wp->param2 << (MAV_FRAME) wp->frame << (MAV_CMD) wp->command;
//qDebug() << "Got WP: " << wp->seq << wp->x << wp->y << wp->z << wp->param4 << "auto:" << wp->autocontinue << "curr:" << wp->current << wp->param1 << wp->param2 << "Frame:"<< (MAV_FRAME) wp->frame << "Command:" << (MAV_CMD) wp->command;
Waypoint *lwp = new Waypoint(wp->seq, wp->x, wp->y, wp->z, wp->param1, wp->param2, wp->param3, wp->param4, wp->autocontinue, wp->current, (MAV_FRAME) wp->frame, (MAV_CMD) wp->command);
addWaypoint(lwp, false);
......@@ -351,6 +351,7 @@ int UASWaypointManager::removeWaypoint(quint16 seq)
{
waypoints[i]->setId(i);
}
emit waypointListChanged();
emit waypointListChanged(uas.getUASID());
return 0;
......
......@@ -393,29 +393,13 @@ void MainWindow::buildCommonWidgets()
addToCentralWidgetsMenu (protocolWidget, "Mavlink Generator", SLOT(showCentralWidget()),CENTRAL_PROTOCOL);
}
#ifdef MAVLINK_ENABLED_SLUGS
//TODO temporaly debug
if (!slugsHilSimWidget)
{
slugsHilSimWidget = new QDockWidget(tr("Slugs Hil Sim"), this);
slugsHilSimWidget->setWidget( new SlugsHilSim(this));
addToToolsMenu (slugsHilSimWidget, tr("HIL Sim Configuration"), SLOT(showToolWidget(bool)), MENU_SLUGS_HIL, Qt::LeftDockWidgetArea);
}
//TODO temporaly debug
if (!slugsCamControlWidget)
{
slugsCamControlWidget = new QDockWidget(tr("Slugs Video Camera Control"), this);
slugsCamControlWidget->setWidget(new SlugsVideoCamControl(this));
addToToolsMenu (slugsCamControlWidget, tr("Camera Control"), SLOT(showToolWidget(bool)), MENU_SLUGS_CAMERA, Qt::BottomDockWidgetArea);
}
#endif
if (!dataplotWidget)
{
dataplotWidget = new QGCDataPlot2D(this);
addToCentralWidgetsMenu (dataplotWidget, "Logfile Plot", SLOT(showCentralWidget()),CENTRAL_DATA_PLOT);
}
}
......@@ -615,6 +599,15 @@ void MainWindow::buildSlugsWidgets()
addToToolsMenu (rcViewDockWidget, tr("Radio Control"), SLOT(showToolWidget(bool)), MENU_RC_VIEW, Qt::BottomDockWidgetArea);
}
#if (defined _MSC_VER) | (defined Q_OS_MAC)
if (!gEarthWidget)
{
gEarthWidget = new QGCGoogleEarthView(this);
addToCentralWidgetsMenu(gEarthWidget, tr("Google Earth"), SLOT(showCentralWidget()), CENTRAL_GOOGLE_EARTH);
}
#endif
if (!slugsDataWidget)
{
// Dialog widgets
......@@ -624,13 +617,6 @@ void MainWindow::buildSlugsWidgets()
addToToolsMenu (slugsDataWidget, tr("Telemetry Data"), SLOT(showToolWidget(bool)), MENU_SLUGS_DATA, Qt::RightDockWidgetArea);
}
if (!slugsPIDControlWidget)
{
slugsPIDControlWidget = new QDockWidget(tr("Slugs PID Control"), this);
slugsPIDControlWidget->setWidget(new SlugsPIDControl(this));
slugsPIDControlWidget->setObjectName("SLUGS_PID_CONTROL_DOCK_WIDGET");
addToToolsMenu (slugsPIDControlWidget, tr("PID Configuration"), SLOT(showToolWidget(bool)), MENU_SLUGS_PID, Qt::LeftDockWidgetArea);
}
if (!slugsHilSimWidget)
{
......@@ -640,13 +626,29 @@ void MainWindow::buildSlugsWidgets()
addToToolsMenu (slugsHilSimWidget, tr("HIL Sim Configuration"), SLOT(showToolWidget(bool)), MENU_SLUGS_HIL, Qt::LeftDockWidgetArea);
}
if (!controlParameterWidget){
controlParameterWidget = new QDockWidget(tr("Control Parameters"), this);
controlParameterWidget->setObjectName("UNMANNED_SYSTEM_CONTROL_PARAMETERWIDGET");
controlParameterWidget->setWidget( new UASControlParameters(this) );
addToToolsMenu (controlParameterWidget, tr("Control Parameters"), SLOT(showToolWidget(bool)), MENU_UAS_CONTROL_PARAM, Qt::LeftDockWidgetArea);
}
if (!parametersDockWidget)
{
parametersDockWidget = new QDockWidget(tr("Calibration and Onboard Parameters"), this);
parametersDockWidget->setWidget( new ParameterInterface(this) );
parametersDockWidget->setObjectName("PARAMETER_INTERFACE_DOCKWIDGET");
addToToolsMenu (parametersDockWidget, tr("Calibration and Parameters"), SLOT(showToolWidget(bool)), MENU_PARAMETERS, Qt::RightDockWidgetArea);
}
if (!slugsCamControlWidget)
{
slugsCamControlWidget = new QDockWidget(tr("Slugs Video Camera Control"), this);
slugsCamControlWidget->setWidget(new SlugsVideoCamControl(this));
slugsCamControlWidget = new QDockWidget(tr("Camera Control"), this);
slugsCamControlWidget->setWidget(new SlugsPadCameraControl(this));
slugsCamControlWidget->setObjectName("SLUGS_CAM_CONTROL_DOCK_WIDGET");
addToToolsMenu (slugsCamControlWidget, tr("Camera Control"), SLOT(showToolWidget(bool)), MENU_SLUGS_CAMERA, Qt::BottomDockWidgetArea);
}
}
......@@ -1013,6 +1015,7 @@ void MainWindow::updateLocationSettings (Qt::DockWidgetArea location)
}
}
/**
* Connect the signals and slots of the common window widgets
*/
......@@ -1027,6 +1030,8 @@ void MainWindow::connectCommonWidgets()
if (mapWidget && waypointsDockWidget->widget())
{
//
connect(waypointsDockWidget->widget(), SIGNAL(changePointList()), mapWidget, SLOT(clearWaypoints()));
}
//TODO temporaly debug
......@@ -1034,6 +1039,8 @@ void MainWindow::connectCommonWidgets()
connect(UASManager::instance(), SIGNAL(activeUASSet(UASInterface*)),
slugsHilSimWidget->widget(), SLOT(activeUasSet(UASInterface*)));
}
}
void MainWindow::createCustomWidget()
......@@ -1049,6 +1056,7 @@ void MainWindow::createCustomWidget()
QDockWidget* dock = new QDockWidget("Unnamed Tool", this);
connect(tool, SIGNAL(destroyed()), dock, SLOT(deleteLater()));
dock->setWidget(tool);
QAction* showAction = new QAction("Show Unnamed Tool", this);
showAction->setCheckable(true);
connect(dock, SIGNAL(visibilityChanged(bool)), showAction, SLOT(setChecked(bool)));
......@@ -1076,7 +1084,15 @@ void MainWindow::connectSlugsWidgets()
slugsDataWidget->widget(), SLOT(setActiveUAS(UASInterface*)));
}
if (controlParameterWidget && controlParameterWidget->widget()){
connect(UASManager::instance(), SIGNAL(activeUASSet(UASInterface*)),
controlParameterWidget->widget(), SLOT(activeUasSet(UASInterface*)));
}
if(controlDockWidget && controlParameterWidget)
{
connect(controlDockWidget->widget(), SIGNAL(changedMode(int)), controlParameterWidget->widget(), SLOT(changedMode(int)));
}
}
void MainWindow::arrangeCommonCenterStack()
......@@ -1128,6 +1144,10 @@ void MainWindow::arrangeSlugsCenterStack()
if (linechartWidget && (centerStack->indexOf(linechartWidget) == -1)) centerStack->addWidget(linechartWidget);
if (hudWidget && (centerStack->indexOf(hudWidget) == -1)) centerStack->addWidget(hudWidget);
#if (defined _MSC_VER) | (defined Q_OS_MAC)
if (gEarthWidget && (centerStack->indexOf(gEarthWidget) == -1)) centerStack->addWidget(gEarthWidget);
#endif
}
void MainWindow::loadSettings()
......@@ -1706,18 +1726,27 @@ void MainWindow::UASCreated(UASInterface* uas)
// Connect Slugs Actions
connectSlugsActions();
// if(slugsDataWidget)
// {
// SlugsDataSensorView *mm = dynamic_cast<SlugsDataSensorView*>(slugsDataWidget->widget());
// if(mm)
// {
// mm->addUAS(uas);
// }
// }
// FIXME: This type checking might be redundant
// if (slugsDataWidget) {
// SlugsDataSensorView* dataWidget = dynamic_cast<SlugsDataSensorView*>(slugsDataWidget->widget());
// if (dataWidget) {
// SlugsMAV* mav2 = dynamic_cast<SlugsMAV*>(uas);
// if (mav2) {
(dynamic_cast<SlugsDataSensorView*>(slugsDataWidget->widget()))->addUAS(uas);
// //loadSlugsView();
// loadGlobalOperatorView();
// }
// }
// }
// // if (slugsDataWidget) {
// // SlugsDataSensorView* dataWidget = dynamic_cast<SlugsDataSensorView*>(slugsDataWidget->widget());
// // if (dataWidget) {
// // SlugsMAV* mav2 = dynamic_cast<SlugsMAV*>(uas);
// // if (mav2) {
// (dynamic_cast<SlugsDataSensorView*>(slugsDataWidget->widget()))->addUAS(uas);
// // //loadSlugsView();
// // loadGlobalOperatorView();
// // }
// // }
// // }
}
break;
......@@ -1931,6 +1960,8 @@ void MainWindow::presentView()
// UAS CONTROL
showTheWidget(MENU_UAS_CONTROL, currentView);
showTheWidget(MENU_UAS_CONTROL_PARAM, currentView);
// UAS LIST
showTheWidget(MENU_UAS_LIST, currentView);
......
......@@ -70,12 +70,10 @@ This file is part of the QGROUNDCONTROL project
#include "SlugsDataSensorView.h"
#include "LogCompressor.h"
#include "SlugsPIDControl.h"
#include "SlugsHilSim.h"
#include "SlugsVideoCamControl.h"
#include "SlugsPadCameraControl.h"
#include "UASControlParameters.h"
/**
* @brief Main Application Window
......@@ -121,6 +119,7 @@ public slots:
void configure();
/** @brief Set the currently controlled UAS */
void setActiveUAS(UASInterface* uas);
/** @brief Add a new UAS */
void UASCreated(UASInterface* uas);
/** @brief Update system specs of a UAS */
......@@ -211,6 +210,7 @@ protected:
// FIXME: DO NOT PUT CUSTOM VALUES IN THIS ENUM since it is iterated over
// this will be fixed in a future release.
typedef enum _TOOLS_WIDGET_NAMES {
MENU_UAS_CONTROL_PARAM,
MENU_UAS_CONTROL,
MENU_UAS_INFO,
MENU_CAMERA,
......@@ -380,6 +380,7 @@ protected:
#endif
// Dock widgets
QPointer<QDockWidget> controlDockWidget;
QPointer<QDockWidget> controlParameterWidget;
QPointer<QDockWidget> infoDockWidget;
QPointer<QDockWidget> cameraDockWidget;
QPointer<QDockWidget> listDockWidget;
......@@ -400,7 +401,6 @@ protected:
QPointer<QDockWidget> rcViewDockWidget;
QPointer<QDockWidget> hudDockWidget;
QPointer<QDockWidget> slugsDataWidget;
QPointer<QDockWidget> slugsPIDControlWidget;
QPointer<QDockWidget> slugsHilSimWidget;
QPointer<QDockWidget> slugsCamControlWidget;
......
This diff is collapsed.
......@@ -40,8 +40,7 @@ This file is part of the QGROUNDCONTROL project
#include "QPointF"
#include <qmath.h>
#include <QSettings>
class QMenu;
class Waypoint;
......@@ -76,8 +75,8 @@ public slots:
void updateAttitude(UASInterface* uas, double roll, double pitch, double yaw, quint64 usec);
void updateGlobalPosition(UASInterface* uas, double lat, double lon, double alt, quint64 usec);
void updatePosition(float time, double lat, double lon);
void updateCameraPosition(double distance, double bearing, QString dir);
QPointF getPointxBearing_Range(double lat1, double lon1, double bearing, double distance);
//void updateCameraPosition(double distance, double bearing, QString dir);
//QPointF getPointxBearing_Range(double lat1, double lon1, double bearing, double distance);
/** @brief Clear the waypoints overlay layer */
void clearWaypoints(int uas=0);
......@@ -93,7 +92,7 @@ public slots:
void updateWaypoint(int uas, Waypoint* wp);
void updateWaypoint(int uas, Waypoint* wp, bool updateView);
void drawBorderCamAtMap(bool status);
//void drawBorderCamAtMap(bool status);
/** @brief Bring up dialog to go to a specific location */
void goTo();
......@@ -118,6 +117,7 @@ protected:
QPushButton* followgps;
QPushButton* createPath;
QPushButton* clearTracking;
QPushButton* setHome;
QLabel* gpsposition;
QMenu* mapMenu;
QPushButton* mapButton;
......@@ -128,9 +128,7 @@ protected:
qmapcontrol::Layer* overlay; ///< Street overlay (foreground)
qmapcontrol::Layer* tracks; ///< Layer for UAV tracks
qmapcontrol::GeometryLayer* geomLayer; ///< Layer for waypoints
//only for experiment
qmapcontrol::GeometryLayer* camLayer; ///< Layer for camera indicator
qmapcontrol::GeometryLayer* homePosition; ///< Layer for station control
int zoomLevel;
int detailZoom; ///< Steps zoomed in further than qMapControl allows
......@@ -142,8 +140,6 @@ protected:
QMap<int, qmapcontrol::Point*> uasIcons;
QMap<int, qmapcontrol::LineString*> uasTrails;
QMap<int, QPen*> mavPens;
//QMap<int, QList<qmapcontrol::Point*> > mavWps;
//QMap<int, qmapcontrol::LineString*> waypointPaths;
UASInterface* mav;
quint64 lastUpdate;
bool initialized;
......@@ -157,20 +153,23 @@ protected:
void captureGeometryDrag(Geometry* geom, QPointF coordinate);
void captureGeometryEndDrag(Geometry* geom, QPointF coordinate);
void captureGeometryDragHome(Geometry* geom, QPointF coordinate);
void createPathButtonClicked(bool checked);
/** @brief Create the graphic representation of the waypoint */
void createWaypointGraphAtMap(int id, const QPointF coordinate);
void mapproviderSelected(QAction* action);
void createHomePosition(const QMouseEvent* event, const QPointF coordinate);
void createHomePosition(const QPointF coordinate);
void createHomePositionClick(bool click);
void loadSettingsMap(int8_t index);
signals:
//void movePoint(QPointF newCoord);
//void captureMapCoordinateClick(const QPointF coordinate); //ROCA
//void createGlobalWP(bool value, QPointF centerCoordinate);
void waypointCreated(Waypoint* wp);
void sendGeometryEndDrag(const QPointF coordinate, const int index);
private:
Ui::MapWidget *m_ui;
QList<qmapcontrol::Point*> wps;
......@@ -180,14 +179,8 @@ private:
QPen* pointPen;
int wpExists(const QPointF coordinate);
bool waypointIsDrag;
qmapcontrol::LineString* camLine;
QList<qmapcontrol::Point*> camPoints;
QPointF lastCamBorderPos;
bool drawCamBorder;
int radioCamera;
QPointF homeCoordinate;
int8_t index;
};
#endif // MAPWIDGET_H
......@@ -43,33 +43,17 @@ QGCRemoteControlView::QGCRemoteControlView(QWidget *parent) :
uasId(-1),
rssi(0.0f),
updated(false),
channelLayout(new QVBoxLayout()),
ui(new Ui::QGCRemoteControlView)
channelLayout(new QVBoxLayout())//,
//ui(new Ui::QGCRemoteControlView)
{
//ui->setupUi(this);
ui->setupUi(this);
QGridLayout* layout = new QGridLayout(this);
layout->addLayout(channelLayout, 1, 0, 1, 2);
// Name label
nameLabel = new QLabel(this);
nameLabel->setText("No MAV selected yet..");
layout->addWidget(nameLabel, 0, 0, 1, 2);
// RSSI bar
// Create new layout
QHBoxLayout* rssiLayout = new QHBoxLayout();
rssiLayout->setSpacing(5);
// Add content
rssiLayout->addWidget(new QLabel(tr("Signal"), this));
// Append raw label
// Append progress bar
rssiBar = new QProgressBar(this);
rssiBar->setMinimum(0);
rssiBar->setMaximum(100);
rssiBar->setValue(0);
rssiLayout->addWidget(rssiBar);
layout->addItem(rssiLayout, 2, 0, 1, 2);
setVisible(false);
this->setVisible(false);
//setVisible(false);
calibrate = new QPushButton(tr("Calibrate"), this);
QHBoxLayout *calibrateButtonLayout = new QHBoxLayout();
......@@ -112,10 +96,9 @@ void QGCRemoteControlView::setUASId(int id)
nameLabel->setText(QString("RC Input of %1").arg(newUAS->getUASName()));
calibrationWindow->setUASId(id);
connect(newUAS, SIGNAL(radioCalibrationReceived(const QPointer<RadioCalibrationData>&)), calibrationWindow, SLOT(receive(const QPointer<RadioCalibrationData>&)));
connect(newUAS, SIGNAL(remoteControlRSSIChanged(float)), this, SLOT(setRemoteRSSI(float)));
connect(newUAS, SIGNAL(remoteControlRSSIChanged(float)), this, SLOT(setRemoteRSSI(float)));
connect(newUAS, SIGNAL(remoteControlChannelRawChanged(int,float)), this, SLOT(setChannelRaw(int,float)));
connect(newUAS, SIGNAL(remoteControlChannelRawChanged(int,float)), calibrationWindow, SLOT(setChannel(int,float)));
connect(newUAS, SIGNAL(remoteControlChannelScaledChanged(int,float)), this, SLOT(setChannelScaled(int,float)));
}
}
......@@ -127,7 +110,7 @@ void QGCRemoteControlView::setChannelRaw(int channelId, float raw)
{
// This is a new channel, append it
this->raw.append(raw);
this->normalized.append(0);
//this->normalized.append(0);
appendChannelWidget(channelId);
}
else
......@@ -141,25 +124,25 @@ void QGCRemoteControlView::setChannelRaw(int channelId, float raw)
redraw();
}
void QGCRemoteControlView::setChannelScaled(int channelId, float normalized)
{
if (this->raw.size() <= channelId) // using raw vector as size indicator
{
// This is a new channel, append it
this->normalized.append(normalized);
this->raw.append(0);
appendChannelWidget(channelId);
}
else
{
// This is an existing channel, update it
this->normalized[channelId] = normalized;
}
updated = true;
//void QGCRemoteControlView::setChannelScaled(int channelId, float normalized)
//{
// if (this->raw.size() <= channelId) // using raw vector as size indicator
// {
// // This is a new channel, append it
// this->normalized.append(normalized);
// this->raw.append(0);
// appendChannelWidget(channelId);
// }
// else
// {
// // This is an existing channel, update it
// this->normalized[channelId] = normalized;
// }
// updated = true;
// FIXME Will be timer based in the future
redraw();
}
// // FIXME Will be timer based in the future
// redraw();
//}
void QGCRemoteControlView::setRemoteRSSI(float rssiNormalized)
{
......@@ -193,18 +176,26 @@ void QGCRemoteControlView::redraw()
if(isVisible() && updated)
{
// Update raw values
for(int i = 0; i < rawLabels.count(); i++)
{
rawLabels.at(i)->setText(QString("%1 us").arg(raw.at(i), 4, 10, QChar('0')));
}
//for(int i = 0; i < rawLabels.count(); i++)
//{
//rawLabels.at(i)->setText(QString("%1 us").arg(raw.at(i), 4, 10, QChar('0')));
//}
// Update percent bars
for(int i = 0; i < progressBars.count(); i++)
{
progressBars.at(i)->setValue(normalized.at(i)*100.0f);
rawLabels.at(i)->setText(QString("%1 us").arg(raw.at(i), 4, 10, QChar('0')));
//int vv = normalized.at(i)*100.0f;
//progressBars.at(i)->setValue(vv);
int vv = raw.at(i)*1.0f;
progressBars.at(i)->setValue(vv);
}
// Update RSSI
rssiBar->setValue(rssi*100);
if(rssi>0)
{
//rssiBar->setValue(rssi);//*100);
}
updated = false;
}
}
......
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009, 2010 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL 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.
QGROUNDCONTROL 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 QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
/**
* @file
* @brief Declaration of QGCRemoteControlView
* @author Lorenz Meier <mail@qgroundcontrol.org>
*/
#ifndef QGCREMOTECONTROLVIEW_H
#define QGCREMOTECONTROLVIEW_H
#include <QWidget>
#include <QVector>
#include <QPushButton>
#include "RadioCalibration/RadioCalibrationWindow.h"
namespace Ui {
class QGCRemoteControlView;
}
class QVBoxLayout;
class QLabel;
class QProgressBar;
class QGCRemoteControlView : public QWidget {
Q_OBJECT
public:
QGCRemoteControlView(QWidget *parent = 0);
~QGCRemoteControlView();
public slots:
void setUASId(int id);
void setChannelRaw(int channelId, float raw);
void setChannelScaled(int channelId, float normalized);
void setRemoteRSSI(float rssiNormalized);
void redraw();
protected slots:
void appendChannelWidget(int channelId);
protected:
void changeEvent(QEvent *e);
int uasId;
float rssi;
bool updated;
QVBoxLayout* channelLayout;
QVector<int> raw;
QVector<float> normalized;
QVector<QLabel*> rawLabels;
QVector<QProgressBar*> progressBars;
QProgressBar* rssiBar;
QLabel* nameLabel;
QPushButton *calibrate;
RadioCalibrationWindow *calibrationWindow;
private:
Ui::QGCRemoteControlView *ui;
};
#endif // QGCREMOTECONTROLVIEW_H
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009, 2010 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL 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.
QGROUNDCONTROL 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 QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
/**
* @file
* @brief Declaration of QGCRemoteControlView
* @author Lorenz Meier <mail@qgroundcontrol.org>
*/
#ifndef QGCREMOTECONTROLVIEW_H
#define QGCREMOTECONTROLVIEW_H
#include <QWidget>
#include <QVector>
#include <QPushButton>
#include "RadioCalibration/RadioCalibrationWindow.h"
namespace Ui {
class QGCRemoteControlView;
}
class QVBoxLayout;
class QLabel;
class QProgressBar;
class QGCRemoteControlView : public QWidget {
Q_OBJECT
public:
QGCRemoteControlView(QWidget *parent = 0);
~QGCRemoteControlView();
public slots:
void setUASId(int id);
void setChannelRaw(int channelId, float raw);
//void setChannelScaled(int channelId, float normalized);
void setRemoteRSSI(float rssiNormalized);
void redraw();
protected slots:
void appendChannelWidget(int channelId);
protected:
void changeEvent(QEvent *e);
int uasId;
float rssi;
bool updated;
QVBoxLayout* channelLayout;
QVector<int> raw;
QVector<float> normalized;
QVector<QLabel*> rawLabels;
QVector<QProgressBar*> progressBars;
QProgressBar* rssiBar;
QLabel* nameLabel;
QPushButton *calibrate;
RadioCalibrationWindow *calibrationWindow;
private:
Ui::QGCRemoteControlView *ui;
};
#endif // QGCREMOTECONTROLVIEW_H
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#ifndef SLUGSPIDCONTROL_H
#define SLUGSPIDCONTROL_H
#include <QWidget>
#include <QGroupBox>
#include "UASInterface.h"
#include "QGCMAVLink.h"
#include "SlugsMAV.h"
#include "mavlink.h"
#include <QTimer>
#include <QMutex>
namespace Ui {
class SlugsPIDControl;
}
class SlugsPIDControl : public QWidget
{
Q_OBJECT
public:
explicit SlugsPIDControl(QWidget *parent = 0);
~SlugsPIDControl();
public slots:
/**
* @brief Called when the a new UAS is set to active.
*
* Called when the a new UAS is set to active.
*
* @param uas The new active UAS
*/
void activeUasSet(UASInterface* uas);
/**
*/
void setRedColorStyle();
/**
* @brief Set color StyleSheet GREEN
*
* @param
*/
void setGreenColorStyle();
/**
* @brief Connect Set pushButtons to change the color GroupBox
*
* @param
*/
void connect_set_pushButtons();
/**
* @brief Connect Set pushButtons to change the color GroupBox
*
* @param
*/
void connect_get_pushButtons();
/**
* @brief Connect Edition Lines for PID Values
*
* @param
*/
void connect_editLinesPDIvalues();
/**
* @brief send a PDI request message to UAS
*
* @param
*/
void sendMessagePIDStatus(int PIDtype);
// Fuctions for Air Speed GroupBox
/**
* @brief Change color style to red when PID values of Air Speed are edited
*
*
* @param
*/
void changeColor_RED_AirSpeed_groupBox(QString text);
/**
* @brief Change color style to green when PID values of Air Speed are send to UAS
*
* @param
*/
void changeColor_GREEN_AirSpeed_groupBox();
/**
* @brief Connects the SIGNALS from the editline to SLOT changeColor_RED_AirSpeed_groupBox()
*
* @param
*/
void connect_AirSpeed_LineEdit();
/**
* @brief get message PID Air Speed(loop index = 0) from UAS
*
* @param
*/
void get_AirSpeed_PID();
// Functions for Pitch Followei GroupBox
/**
* @brief Change color style to red when PID values of Pitch Followei are edited
*
*
* @param
*/
void changeColor_RED_PitchFollowei_groupBox(QString text);
/**
* @brief Change color style to green when PID values of Pitch Followei are send to UAS
*
* @param
*/
void changeColor_GREEN_PitchFollowei_groupBox();
/**
* @brief Connects the SIGNALS from the editline to SLOT PitchFlowei_groupBox
*
* @param
*/
void connect_PitchFollowei_LineEdit();
/**
* @brief get message PID Pitch Followei(loop index = 2) from UAS
*
* @param
*/
void get_PitchFollowei_PID();
// Functions for Roll Control GroupBox
/**
* @brief Change color style to red when PID values of Roll Control are edited
*
*
* @param
*/
void changeColor_RED_RollControl_groupBox(QString text);
/**
* @brief Change color style to green when PID values of Roll Control are send to UAS
*
* @param
*/
void changeColor_GREEN_RollControl_groupBox();
/**
* @brief Connects the SIGNALS from the editline to SLOT RollControl_groupBox
*
* @param
*/
void connect_RollControl_LineEdit();
/**
* @brief get message PID Roll Control(loop index = 4) from UAS
*
* @param
*/
void get_RollControl_PID();
// Functions for Heigth Error GroupBox
/**
* @brief Change color style to red when PID values of Heigth Error are edited
*
*
* @param
*/
void changeColor_RED_HeigthError_groupBox(QString text);
/**
* @brief Change color style to green when PID values of Heigth Error are send to UAS
*
* @param
*/
void changeColor_GREEN_HeigthError_groupBox();
/**
* @brief Connects the SIGNALS from the editline to SLOT HeigthError_groupBox
*
* @param
*/
void connect_HeigthError_LineEdit();
/**
* @brief get message PID Heigth Error(loop index = 1) from UAS
*
* @param
*/
void get_HeigthError_PID();
// Functions for Yaw Damper GroupBox
/**
* @brief Change color style to red when PID values of Yaw Damper are edited
*
*
* @param
*/
void changeColor_RED_YawDamper_groupBox(QString text);
/**
* @brief Change color style to green when PID values of Yaw Damper are send to UAS
*
* @param
*/
void changeColor_GREEN_YawDamper_groupBox();
/**
* @brief Connects the SIGNALS from the editline to SLOT YawDamper_groupBox
*
* @param
*/
void connect_YawDamper_LineEdit();
/**
* @brief get message PID Yaw Damper(loop index = 3) from UAS
*
* @param
*/
void get_YawDamper_PID();
// Functions for Pitch to dT GroupBox
/**
* @brief Change color style to red when PID values of Pitch to dT are edited
*
*
* @param
*/
void changeColor_RED_Pitch2dT_groupBox(QString text);
/**
* @brief Change color style to green when PID values of Pitch to dT are send to UAS
*
* @param
*/
void changeColor_GREEN_Pitch2dT_groupBox();
/**
* @brief Connects the SIGNALS from the editline to SLOT Pitch2dT_groupBox
*
* @param
*/
void connect_Pitch2dT_LineEdit();
/**
* @brief get message PID Pitch2dT(loop index = 8) from UAS
*
* @param
*/
void get_Pitch2dT_PID();
/**
* @brief get and updates the values on widget
*/
void slugsGetGeneral();
/**
* @brief Sent all values to UAS
*/
void slugsSetGeneral();
void slugsTimerStartSet();
void slugsTimerStartGet();
void slugsTimerStop();
//Create, send and get Messages PID
// void createMessagePID();
#ifdef MAVLINK_ENABLED_SLUGS
void recibeMensaje(int systemId, const mavlink_action_ack_t& action);
void receivePidValues(int systemId, const mavlink_pid_t& pidValues);
#endif // MAVLINK_ENABLED_SLUG
private:
Ui::SlugsPIDControl *ui;
UASInterface* activeUAS;
int systemId;
bool change_dT;
//Color Styles
QString REDcolorStyle;
QString GREENcolorStyle;
QString ORIGINcolorStyle;
//SlugsMav Message
#ifdef MAVLINK_ENABLED_SLUGS
mavlink_pid_t pidMessage;
mavlink_slugs_action_t actionSlugs;
#endif
QTimer* refreshTimerSet; ///< The main timer, controls the update view
QTimer* refreshTimerGet; ///< The main timer, controls the update view
int counterRefreshSet;
int counterRefreshGet;
QMutex valuesMutex;
};
#endif // SLUGSPIDCONTROL_H
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -108,7 +108,7 @@ public slots:
signals:
void clearPathclicked();
void createWaypointAtMap(const QPointF coordinate);
void changePointList();
protected:
virtual void changeEvent(QEvent *e);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment