Commit 1fe54579 authored by Mariano Lizarraga's avatar Mariano Lizarraga

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

parents 5379a798 b5af9b84
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();
......@@ -130,8 +129,6 @@ protected:
qmapcontrol::Layer* tracks; ///< Layer for UAV tracks
qmapcontrol::GeometryLayer* geomLayer; ///< Layer for waypoints
qmapcontrol::GeometryLayer* homePosition; ///< Layer for station control
//only for experiment
//qmapcontrol::GeometryLayer* camLayer; ///< Layer for camera indicator
int zoomLevel;
int detailZoom; ///< Steps zoomed in further than qMapControl allows
......@@ -143,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;
......@@ -158,6 +153,8 @@ 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 */
......@@ -165,16 +162,14 @@ protected:
void mapproviderSelected(QAction* action);
void createHomePosition(const QMouseEvent* event, const QPointF coordinate);
void createHomePosition(const QPointF coordinate);
void createHomePositionClick(bool click);
void loadSettingsMap(QSettings &);
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;
......@@ -184,15 +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
......@@ -41,7 +41,7 @@
<bool>true</bool>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgba(255, 0, 0,50%);</string>
<string notr="true">background-color: rgb(135, 206, 235);</string>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
......@@ -67,6 +67,9 @@
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="lbPixel">
<property name="styleSheet">
<string notr="true">font-color:rgb(0, 0, 0);</string>
</property>
<property name="text">
<string>----</string>
</property>
......
......@@ -80,11 +80,11 @@ void UASControlParameters::changedMode(int mode)
if(modeTemp != this->mode)
{
ui->lbMode->setStyleSheet("background-color: rgb(255, 0, 0)");
ui->lbMode->setStyleSheet("background-color: rgb(165, 42, 42)");
}
else
{
ui->lbMode->setStyleSheet("background-color: rgb(0, 255, 0)");
ui->lbMode->setStyleSheet("background-color: rgb(85, 107, 47)");
}
}
......@@ -104,12 +104,17 @@ void UASControlParameters::activeUasSet(UASInterface *uas)
void UASControlParameters::updateGlobalPosition(UASInterface * a, double b, double c, double aa, quint64 ab)
{
//ui->sbHeight->setValue(aa);
Q_UNUSED(a);
Q_UNUSED(b);
Q_UNUSED(c);
Q_UNUSED(ab);
this->altitude=aa;
}
void UASControlParameters::speedChanged(UASInterface* uas, double vx, double vy, double vz, quint64 time)
{
Q_UNUSED(time);
Q_UNUSED(uas);
this->speed = sqrt(pow(vx, 2.0) + pow(vy, 2.0) + pow(vz, 2.0));
//ui->sbAirSpeed->setValue(speed);
}
......@@ -117,6 +122,8 @@ void UASControlParameters::speedChanged(UASInterface* uas, double vx, double vy,
void UASControlParameters::updateAttitude(UASInterface *uas, double roll, double pitch, double yaw, quint64 time)
{
Q_UNUSED(uas);
Q_UNUSED(pitch);
Q_UNUSED(yaw);
Q_UNUSED(time);
//ui->sbTurnRate->setValue(roll);
this->roll = roll;
......@@ -194,7 +201,7 @@ void UASControlParameters::updateMode(int uas,QString mode,QString description)
this->mode = mode;
ui->lbMode->setText(this->mode);
ui->lbMode->setStyleSheet("background-color: rgb(0, 255, 0)");
ui->lbMode->setStyleSheet("background-color: rgb(85, 107, 47)");
}
void UASControlParameters::thrustChanged(UASInterface *uas, double throttle)
......
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