mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-20 10:54:14 +01:00
Merge branch 'pt/CC3D_Release' of ssh://git.openpilot.org/OpenPilot into pt/CC3D_Release
This commit is contained in:
commit
1927e8bce9
@ -81,7 +81,7 @@ ConnectionManager::ConnectionManager(Internal::MainWindow *mainWindow, QTabWidge
|
||||
// modeStack->insertCornerWidget(modeStack->cornerWidgetCount()-1, this);
|
||||
modeStack->setCornerWidget(this, Qt::TopRightCorner);
|
||||
|
||||
QObject::connect(m_connectBtn, SIGNAL(pressed()), this, SLOT(onConnectPressed()));
|
||||
QObject::connect(m_connectBtn, SIGNAL(clicked()), this, SLOT(onConnectClicked()));
|
||||
}
|
||||
|
||||
ConnectionManager::~ConnectionManager()
|
||||
@ -224,9 +224,9 @@ void ConnectionManager::onConnectionDestroyed(QObject *obj) // Pip
|
||||
}
|
||||
|
||||
/**
|
||||
* Slot called when the user pressed the connect/disconnect button
|
||||
* Slot called when the user clicks the connect/disconnect button
|
||||
*/
|
||||
void ConnectionManager::onConnectPressed()
|
||||
void ConnectionManager::onConnectClicked()
|
||||
{
|
||||
// Check if we have a ioDev already created:
|
||||
if (!m_ioDev)
|
||||
|
@ -93,7 +93,7 @@ private slots:
|
||||
void objectAdded(QObject *obj);
|
||||
void aboutToRemoveObject(QObject *obj);
|
||||
|
||||
void onConnectPressed();
|
||||
void onConnectClicked();
|
||||
void devChanged(IConnection *connection);
|
||||
|
||||
// void onConnectionClosed(QObject *obj);
|
||||
|
@ -48,6 +48,7 @@
|
||||
|
||||
#include "positionactual.h"
|
||||
#include "homelocation.h"
|
||||
#include "gpsposition.h"
|
||||
|
||||
#define allow_manual_home_location_move
|
||||
|
||||
@ -662,15 +663,17 @@ void OPMapGadgetWidget::updatePosition()
|
||||
uav_pos = internals::PointLatLng(uav_latitude, uav_longitude);
|
||||
|
||||
// *************
|
||||
// get the current GPS details
|
||||
// get current GPS position
|
||||
ExtensionSystem::PluginManager* pm = ExtensionSystem::PluginManager::instance();
|
||||
UAVObjectManager* objManager = pm->getObject<UAVObjectManager>();
|
||||
|
||||
// get current GPS position
|
||||
if (!getGPSPosition(gps_latitude, gps_longitude, gps_altitude))
|
||||
return;
|
||||
GPSPosition *gpsPositionData = GPSPosition::GetInstance(objManager);
|
||||
|
||||
// get current GPS heading
|
||||
// gps_heading = getGPS_Heading();
|
||||
gps_heading = 0;
|
||||
gps_heading = gpsPositionData->getData().Heading;
|
||||
gps_latitude = gpsPositionData->getData().Latitude;
|
||||
gps_longitude = gpsPositionData->getData().Longitude;
|
||||
gps_altitude = gpsPositionData->getData().Altitude;
|
||||
|
||||
gps_pos = internals::PointLatLng(gps_latitude, gps_longitude);
|
||||
|
||||
@ -698,7 +701,7 @@ void OPMapGadgetWidget::updatePosition()
|
||||
m_map->GPS->SetUAVPos(gps_pos, gps_altitude); // set the maps GPS position
|
||||
m_map->GPS->SetUAVHeading(gps_heading); // set the maps GPS heading
|
||||
|
||||
// *************
|
||||
// *************
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2387,25 +2390,8 @@ double OPMapGadgetWidget::getUAV_Yaw()
|
||||
return yaw;
|
||||
}
|
||||
|
||||
bool OPMapGadgetWidget::getGPSPosition(double &latitude, double &longitude, double &altitude)
|
||||
{
|
||||
double LLA[3];
|
||||
|
||||
if (!obum)
|
||||
return false;
|
||||
|
||||
if (obum->getGPSPosition(LLA) < 0)
|
||||
return false; // error
|
||||
|
||||
latitude = LLA[0];
|
||||
longitude = LLA[1];
|
||||
altitude = LLA[2];
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// *************************************************************************************
|
||||
|
||||
void OPMapGadgetWidget::setMapFollowingMode()
|
||||
{
|
||||
if (!m_widget || !m_map)
|
||||
|
@ -350,7 +350,6 @@ private:
|
||||
internals::PointLatLng destPoint(internals::PointLatLng source, double bear, double dist);
|
||||
|
||||
bool getUAVPosition(double &latitude, double &longitude, double &altitude);
|
||||
bool getGPSPosition(double &latitude, double &longitude, double &altitude);
|
||||
double getUAV_Yaw();
|
||||
|
||||
void setMapFollowingMode();
|
||||
|
@ -63,7 +63,7 @@ Rectangle {
|
||||
WelcomePageButton {
|
||||
baseIconName: "planner"
|
||||
label: "Flight Planner"
|
||||
onClicked: welcomePlugin.openPage("Flight Planner")
|
||||
onClicked: welcomePlugin.openPage("System")
|
||||
}
|
||||
|
||||
WelcomePageButton {
|
||||
|
Loading…
x
Reference in New Issue
Block a user