Commit e441869a authored by Mariano Lizarraga's avatar Mariano Lizarraga

Merge branch 'master' of git://github.com/tecnosapiens/qgroundcontrol into mergeRemote

parents 174f9253 30afdd85
......@@ -138,7 +138,9 @@ FORMS += src/ui/MainWindow.ui \
src/ui/QGCRemoteControlView.ui \
src/ui/WaypointGlobalView.ui \
src/ui/SlugsDataSensorView.ui \
src/ui/SlugsHilSim.ui
src/ui/SlugsHilSim.ui \
src/ui/SlugsDataSensorView.ui \
src/ui/SlugsPIDControl.ui
INCLUDEPATH += src \
src/ui \
src/ui/linechart \
......@@ -239,7 +241,8 @@ HEADERS += src/MG.h \
src/ui/map3D/Imagery.h \
src/comm/QGCMAVLink.h\
src/ui/SlugsDataSensorView.h \
src/ui/SlugsHilSim.h
src/ui/SlugsHilSim.h \
src/ui/SlugsPIDControl.h
SOURCES += src/main.cc \
src/Core.cc \
src/uas/UASManager.cc \
......@@ -320,7 +323,8 @@ SOURCES += src/main.cc \
src/ui/map3D/WebImage.cc \
src/ui/map3D/Imagery.cc \
src/ui/SlugsDataSensorView.cc \
src/ui/SlugsHilSim.cc
src/ui/SlugsHilSim.cc \
src/ui/SlugsPIDControl.cpp
RESOURCES = mavground.qrc
......
......@@ -47,7 +47,7 @@ void SlugsMAV::receiveMessage(LinkInterface* link, mavlink_message_t message)
cpu_load.ctrlLoad,
cpu_load.batVolt,
0);
qDebug()<<"--------->>>>>>>>>>>>>>> EMITIENDO MAVLINK_MSG_ID_CPU_LOAD 170";
//qDebug()<<"--------->>>>>>>>>>>>>>> EMITIENDO MAVLINK_MSG_ID_CPU_LOAD 170";
break;
}
case MAVLINK_MSG_ID_AIR_DATA://171
......@@ -64,7 +64,7 @@ qDebug()<<"--------->>>>>>>>>>>>>>> EMITIENDO MAVLINK_MSG_ID_CPU_LOAD 170";
air_data.staticPressure,
air_data.temperature,
time);
qDebug()<<"--------->>>>>>>>>>>>>>> EMITIENDO MAVLINK_MSG_ID_AIR_DATA 171";
//qDebug()<<"--------->>>>>>>>>>>>>>> EMITIENDO MAVLINK_MSG_ID_AIR_DATA 171";
break;
}
case MAVLINK_MSG_ID_SENSOR_BIAS://172
......@@ -87,7 +87,7 @@ qDebug()<<"--------->>>>>>>>>>>>>>> EMITIENDO MAVLINK_MSG_ID_AIR_DATA 171";
sensor_bias.gyBias,
sensor_bias.gzBias,
0);
qDebug()<<"------------->>>>>>>>>>>>>>> EMITIENDO MAVLINK_MSG_ID_SENSOR_BIAS 172";
// qDebug()<<"------------->>>>>>>>>>>>>>> EMITIENDO MAVLINK_MSG_ID_SENSOR_BIAS 172";
break;
......@@ -112,7 +112,7 @@ qDebug()<<"--------->>>>>>>>>>>>>>> EMITIENDO MAVLINK_MSG_ID_AIR_DATA 171";
diagnostic.diagSh2,
diagnostic.diagSh3,
0);
qDebug()<<"------->>>>>>>>>>> EMITIENDO MAVLINK_MSG_ID_DIAGNOSTIC 173";
//qDebug()<<"------->>>>>>>>>>> EMITIENDO MAVLINK_MSG_ID_DIAGNOSTIC 173";
break;
}
case MAVLINK_MSG_ID_PILOT_CONSOLE://174
......@@ -133,7 +133,7 @@ qDebug()<<"------->>>>>>>>>>> EMITIENDO MAVLINK_MSG_ID_DIAGNOSTIC 173";
pilot.dr,
pilot.de,
0);
qDebug()<<"---------->>>>>>>>>>>>>>> EMITIENDO MAVLINK_MSG_ID_PILOT_CONSOLE 174";
// qDebug()<<"---------->>>>>>>>>>>>>>> EMITIENDO MAVLINK_MSG_ID_PILOT_CONSOLE 174";
break;
......@@ -166,7 +166,7 @@ qDebug()<<"------->>>>>>>>>>> EMITIENDO MAVLINK_MSG_ID_DIAGNOSTIC 173";
pwm.aux1,
pwm.aux2,
0);
qDebug()<<"----------->>>>>>>>>>>>>>> EMITIENDO MAVLINK_MSG_ID_PWM_COMMANDS 175";
//qDebug()<<"----------->>>>>>>>>>>>>>> EMITIENDO MAVLINK_MSG_ID_PWM_COMMANDS 175";
break;
}
......@@ -197,7 +197,7 @@ qDebug()<<"----------->>>>>>>>>>>>>>> EMITIENDO MAVLINK_MSG_ID_PWM_COMMANDS 175"
nav.toWP,
time);
qDebug()<<"-------->>>>>>>>>>>>>>> EMITIENDO MAVLINK_MSG_ID_SLUGS_NAVIGATION 176";
// qDebug()<<"-------->>>>>>>>>>>>>>> EMITIENDO MAVLINK_MSG_ID_SLUGS_NAVIGATION 176";
break;
}
......@@ -222,7 +222,7 @@ qDebug()<<"----------->>>>>>>>>>>>>>> EMITIENDO MAVLINK_MSG_ID_PWM_COMMANDS 175"
dataLog.fl_6,
time);
qDebug()<<"-------->>>>>>>>>>>>>>> EMITIENDO LOG DATA 177";
// qDebug()<<"-------->>>>>>>>>>>>>>> EMITIENDO LOG DATA 177";
......@@ -259,7 +259,7 @@ qDebug()<<"----------->>>>>>>>>>>>>>> EMITIENDO MAVLINK_MSG_ID_PWM_COMMANDS 175"
qDebug()<<"-------->>>>>>>>>>>>>>> EMITIENDO filtering data 178";
// qDebug()<<"-------->>>>>>>>>>>>>>> EMITIENDO filtering data 178";
......@@ -291,52 +291,60 @@ qDebug()<<"----------->>>>>>>>>>>>>>> EMITIENDO MAVLINK_MSG_ID_PWM_COMMANDS 175"
qDebug()<<"-------->>>>>>>>>>>>>>> EMITIENDO MAVLINK_MSG_ID_GPS_DATE_TIME 179";
// qDebug()<<"-------->>>>>>>>>>>>>>> EMITIENDO MAVLINK_MSG_ID_GPS_DATE_TIME 179";
break;
}
case MAVLINK_MSG_ID_MID_LVL_CMDS://180
case MAVLINK_MSG_ID_ACTION_ACK:
{
qDebug()<<"-------->>>>>>>>>>>>>>> EMITIENDO MAVLINK_MSG_ID_ACTION_ACK";
mavlink_action_ack_t ack;
mavlink_msg_action_ack_decode(&message,&ack);
emit slugsActionAck(uasId,ack.action,ack.result);
}
// case MAVLINK_MSG_ID_MID_LVL_CMDS://180
// {
qDebug()<<"------->>>>>>>>>>>>>>> EMITIENDO MAVLINK_MSG_ID_MID_LVL_CMDS 180";
// // qDebug()<<"------->>>>>>>>>>>>>>> EMITIENDO MAVLINK_MSG_ID_MID_LVL_CMDS 180";
break;
}
case MAVLINK_MSG_ID_CTRL_SRFC_PT://181
{
// break;
// }
// case MAVLINK_MSG_ID_CTRL_SRFC_PT://181
// {
qDebug()<<"--------->>>>>>>>>>>>>>> EMITIENDO MAVLINK_MSG_ID_CTRL_SRFC_PT 181";
// // qDebug()<<"--------->>>>>>>>>>>>>>> EMITIENDO MAVLINK_MSG_ID_CTRL_SRFC_PT 181";
break;
}
case MAVLINK_MSG_ID_PID://182
{
// break;
// }
// case MAVLINK_MSG_ID_PID://182
// {
qDebug()<<"-------->>>>>>>>>>>>>>> EMITIENDO MAVLINK_MSG_ID_PID 182";
// // qDebug()<<"-------->>>>>>>>>>>>>>> EMITIENDO MAVLINK_MSG_ID_PID 182";
break;
}
case MAVLINK_MSG_ID_SLUGS_ACTION://183
{
// break;
// }
// case MAVLINK_MSG_ID_SLUGS_ACTION://183
// {
qDebug()<<"-------->>>>>>>>>>>>>>> EMITIENDO MAVLINK_MSG_ID_SLUGS_ACTION 183";
// // qDebug()<<"-------->>>>>>>>>>>>>>> EMITIENDO MAVLINK_MSG_ID_SLUGS_ACTION 183";
break;
}
// break;
// }
#endif
default:
......
......@@ -135,6 +135,10 @@ signals:
uint8_t gpsvisSat,
quint64 time);
void slugsActionAck(int systemId,
uint8_t action,
uint8_t result);
......
......@@ -437,6 +437,7 @@ void UASWaypointManager::readWaypoints()
void UASWaypointManager::writeWaypoints()
{
qDebug() << "+++++++++++++++++++>>>> Entro Funcion Write WP";
if (current_state == WP_IDLE)
{
if (waypoints.count() > 0)
......@@ -541,6 +542,7 @@ void UASWaypointManager::sendWaypointCount()
wpc.target_component = MAV_COMP_ID_WAYPOINTPLANNER;
wpc.count = current_count;
qDebug() << "sent waypoint count (" << wpc.count << ") to ID " << wpc.target_system;
emit updateStatusString(QString("start transmitting waypoints..."));
mavlink_msg_waypoint_count_encode(uas.mavlink->getSystemId(), uas.mavlink->getComponentId(), &message, &wpc);
......
......@@ -181,6 +181,9 @@ void MainWindow::buildWidgets()
slugsDataWidget = new QDockWidget(tr("Slugs Data"), this);
slugsDataWidget->setWidget( new SlugsDataSensorView(this));
slugsPIDControlWidget = new QDockWidget(tr("PID Control"), this);
slugsPIDControlWidget->setWidget(new SlugsPIDControl(this));
slugsHilSimWidget = new QDockWidget(tr("Slugs Hil Sim"), this);
slugsHilSimWidget->setWidget( new SlugsHilSim(this));
......@@ -225,6 +228,7 @@ void MainWindow::connectWidgets()
connect(UASManager::instance(), SIGNAL(activeUASSet(UASInterface*)), dynamic_cast<SlugsHilSim*>(slugsHilSimWidget->widget()), SLOT(activeUasSet(UASInterface*)) );
}
}
void MainWindow::arrangeCenterStack()
......@@ -917,6 +921,13 @@ void MainWindow::loadGlobalOperatorView()
slugsDataWidget->show();
}
// Slugs Data View
if (slugsPIDControlWidget)
{
addDockWidget(Qt::LeftDockWidgetArea, slugsPIDControlWidget);
slugsPIDControlWidget->show();
}
// // UAS CONTROL
......
......@@ -66,9 +66,13 @@ This file is part of the QGROUNDCONTROL project
#include "QMap3DWidget.h"
#include "SlugsDataSensorView.h"
#include "LogCompressor.h"
#include "SlugsPIDControl.h"
#include "slugshilsim.h"
/**
* @brief Main Application Window
*
......@@ -181,8 +185,10 @@ protected:
QPointer<QDockWidget> hsiDockWidget;
QPointer<QDockWidget> rcViewDockWidget;
QPointer<QDockWidget> slugsDataWidget;
QPointer<QDockWidget> slugsPIDControlWidget;
QPointer<QDockWidget> slugsHilSimWidget;
// Popup widgets
JoystickWidget* joystickWidget;
......
......@@ -432,7 +432,6 @@ void SlugsDataSensorView::slugsDataLogChanged(int systemId,
double logfl_6,
quint64 time)
{
qDebug()<<"----------------------------------------------------->>>>>>>>>>>>>>> ACTUALIZANDO LOG DATA";
Q_UNUSED(systemId);
Logfl_1 = logfl_1;
Logfl_2 = logfl_2;
......
This diff is collapsed.
#ifndef SLUGSPIDCONTROL_H
#define SLUGSPIDCONTROL_H
#include <QWidget>
#include<QGroupBox>
#include "UASInterface.h"
#include "QGCMAVLink.h"
#include "SlugsMAV.h"
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 Edition Lines for PID Values
*
* @param
*/
void connect_editLinesPDIvalues();
// 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();
// 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();
// 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();
// 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();
// 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();
// 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();
//Create, send and get Messages PID
// void createMessagePID();
void recibeMensaje(int systemId, uint8_t action, uint8_t result);
private:
Ui::SlugsPIDControl *ui;
UASInterface* activeUAS;
int systemId;
bool change_dT;
//Color Styles
QString REDcolorStyle;
QString GREENcolorStyle;
QString ORIGINcolorStyle;
//SlugsMav Message
mavlink_pid_t pidMessage;
};
#endif // SLUGSPIDCONTROL_H
This diff is collapsed.
......@@ -200,6 +200,11 @@ float SlugsHilSim::getFloatFromDatagram (const QByteArray* datagram, unsigned ch
tmpF2C.chData[2] = datagram->at((*i)++);
tmpF2C.chData[3] = datagram->at((*i)++);
// if (uas != NULL) {
// //activeUas = uas;
// }
return tmpF2C.flData;
}
......@@ -210,6 +215,7 @@ uint16_t SlugsHilSim::getUint16FromDatagram (const QByteArray* datagram, unsigne
tmpU2C.chData[1] = datagram->at((*i)++);
return tmpU2C.uiData;
}
void SlugsHilSim::linkSelected(int cbIndex){
......
......@@ -105,6 +105,10 @@ public slots:
*/
void linkSelected (int cbIndex);
public slots:
private:
typedef union _tFloatToChar {
......
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