Unverified Commit 7bc39e2f authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge branch 'Stable_V3.5.1' into WindowsDriverInstall

parents 8bb5b045 e2889674
...@@ -19,17 +19,17 @@ install: ...@@ -19,17 +19,17 @@ install:
- mkdir %LOCALAPPDATA%\QtProject && copy test\qtlogging.ini %LOCALAPPDATA%\QtProject\ - mkdir %LOCALAPPDATA%\QtProject && copy test\qtlogging.ini %LOCALAPPDATA%\QtProject\
- ps: | - ps: |
Write-Host "Installing GStreamer..." -ForegroundColor Cyan Write-Host "Installing GStreamer..." -ForegroundColor Cyan
$msiPath = "$($env:USERPROFILE)\gstreamer-1.0-x86-1.5.2.msi" $msiPath = "$($env:USERPROFILE)\gstreamer-1.0-x86-1.14.4.msi"
Write-Host "Downloading..." Write-Host "Downloading..."
(New-Object Net.WebClient).DownloadFile('https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/gstreamer-1.0-x86-1.5.2.msi', $msiPath) (New-Object Net.WebClient).DownloadFile('https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/gstreamer-1.0-x86-1.14.4.msi', $msiPath)
Write-Host "Installing..." Write-Host "Installing..."
cmd /c start /wait msiexec /package $msiPath /passive ADDLOCAL=ALL cmd /c start /wait msiexec /package $msiPath /passive ADDLOCAL=ALL
Write-Host "Installed" -ForegroundColor Green Write-Host "Installed" -ForegroundColor Green
- ps: | - ps: |
Write-Host "Installing GStreamer dev..." -ForegroundColor Cyan Write-Host "Installing GStreamer dev..." -ForegroundColor Cyan
$msiPath = "$($env:USERPROFILE)\gstreamer-1.0-devel-x86-1.5.2.msi" $msiPath = "$($env:USERPROFILE)\gstreamer-1.0-devel-x86-1.14.4.msi"
Write-Host "Downloading..." Write-Host "Downloading..."
(New-Object Net.WebClient).DownloadFile('https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/gstreamer-1.0-devel-x86-1.5.2.msi', $msiPath) (New-Object Net.WebClient).DownloadFile('https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/gstreamer-1.0-devel-x86-1.14.4.msi', $msiPath)
Write-Host "Installing..." Write-Host "Installing..."
cmd /c start /wait msiexec /package $msiPath /passive ADDLOCAL=ALL cmd /c start /wait msiexec /package $msiPath /passive ADDLOCAL=ALL
Write-Host "Installed" -ForegroundColor Green Write-Host "Installed" -ForegroundColor Green
......
...@@ -10,6 +10,8 @@ Note: This file only contains high level features or important fixes. ...@@ -10,6 +10,8 @@ Note: This file only contains high level features or important fixes.
### 3.5.4 - Not yet released ### 3.5.4 - Not yet released
* Update windows drivers * Update windows drivers
* Add support for FMUK66 flashing/connection
* Guard against null geometry coming from gstreamer which can cause crashes
* Add .apj file selection support to custom firmware flash * Add .apj file selection support to custom firmware flash
### 3.5.3 - Stable ### 3.5.3 - Stable
......
...@@ -75,7 +75,7 @@ public: ...@@ -75,7 +75,7 @@ public:
static const int boardIDASCV1 = 65; ///< ASC V1 board, as from USB PID static const int boardIDASCV1 = 65; ///< ASC V1 board, as from USB PID
static const int boardIDCrazyflie2 = 12; ///< Crazyflie 2.0 board, as from USB PID static const int boardIDCrazyflie2 = 12; ///< Crazyflie 2.0 board, as from USB PID
static const int boardIDOmnibusF4SD = 42; ///< Omnibus F4 SD, as from USB PID static const int boardIDOmnibusF4SD = 42; ///< Omnibus F4 SD, as from USB PID
static const int boardIDNXPHliteV3 = 28; ///< NXPHliteV3 board, as from USB PID static const int boardIDFMUK66V3 = 28; ///< FMUK66V3 board, as from USB PID
/// Simulated board id for V3 which is a V2 board which supports larger flash space /// Simulated board id for V3 which is a V2 board which supports larger flash space
/// IMPORTANT: Make sure this id does not conflict with any newly added real board ids /// IMPORTANT: Make sure this id does not conflict with any newly added real board ids
......
...@@ -268,6 +268,13 @@ void FirmwareUpgradeController::_initFirmwareHash() ...@@ -268,6 +268,13 @@ void FirmwareUpgradeController::_initFirmwareHash()
{ AutoPilotStackPX4, DeveloperFirmware, DefaultVehicleFirmware, "http://px4-travis.s3.amazonaws.com/Firmware/master/omnibus_f4sd_default.px4"}, { AutoPilotStackPX4, DeveloperFirmware, DefaultVehicleFirmware, "http://px4-travis.s3.amazonaws.com/Firmware/master/omnibus_f4sd_default.px4"},
}; };
//////////////////////////////////// FMUK66V3 firmwares //////////////////////////////////////////////////
FirmwareToUrlElement_t rgFMUK66V3FirmwareArray[] = {
{ AutoPilotStackPX4, StableFirmware, DefaultVehicleFirmware, "http://px4-travis.s3.amazonaws.com/Firmware/stable/nxp_fmuk66-v3_default.px4"},
{ AutoPilotStackPX4, BetaFirmware, DefaultVehicleFirmware, "http://px4-travis.s3.amazonaws.com/Firmware/beta/nxp_fmuk66-v3_default.px4"},
{ AutoPilotStackPX4, DeveloperFirmware, DefaultVehicleFirmware, "http://px4-travis.s3.amazonaws.com/Firmware/master/nxp_fmuk66-v3_default.px4"},
};
/////////////////////////////// px4flow firmwares /////////////////////////////////////// /////////////////////////////// px4flow firmwares ///////////////////////////////////////
FirmwareToUrlElement_t rgPX4FLowFirmwareArray[] = { FirmwareToUrlElement_t rgPX4FLowFirmwareArray[] = {
{ PX4FlowPX4, StableFirmware, DefaultVehicleFirmware, "http://px4-travis.s3.amazonaws.com/Flow/master/px4flow.px4" }, { PX4FlowPX4, StableFirmware, DefaultVehicleFirmware, "http://px4-travis.s3.amazonaws.com/Flow/master/px4flow.px4" },
...@@ -459,6 +466,12 @@ void FirmwareUpgradeController::_initFirmwareHash() ...@@ -459,6 +466,12 @@ void FirmwareUpgradeController::_initFirmwareHash()
_rgOmnibusF4SDFirmware.insert(FirmwareIdentifier(element.stackType, element.firmwareType, element.vehicleType), element.url); _rgOmnibusF4SDFirmware.insert(FirmwareIdentifier(element.stackType, element.firmwareType, element.vehicleType), element.url);
} }
size = sizeof(rgFMUK66V3FirmwareArray)/sizeof(rgFMUK66V3FirmwareArray[0]);
for (int i = 0; i < size; i++) {
const FirmwareToUrlElement_t& element = rgFMUK66V3FirmwareArray[i];
_rgFMUK66V3Firmware.insert(FirmwareIdentifier(element.stackType, element.firmwareType, element.vehicleType), element.url);
}
size = sizeof(rgPX4FLowFirmwareArray)/sizeof(rgPX4FLowFirmwareArray[0]); size = sizeof(rgPX4FLowFirmwareArray)/sizeof(rgPX4FLowFirmwareArray[0]);
for (int i = 0; i < size; i++) { for (int i = 0; i < size; i++) {
const FirmwareToUrlElement_t& element = rgPX4FLowFirmwareArray[i]; const FirmwareToUrlElement_t& element = rgPX4FLowFirmwareArray[i];
...@@ -529,8 +542,8 @@ QHash<FirmwareUpgradeController::FirmwareIdentifier, QString>* FirmwareUpgradeCo ...@@ -529,8 +542,8 @@ QHash<FirmwareUpgradeController::FirmwareIdentifier, QString>* FirmwareUpgradeCo
case Bootloader::boardIDOmnibusF4SD: case Bootloader::boardIDOmnibusF4SD:
rgFirmware = &_rgOmnibusF4SDFirmware; rgFirmware = &_rgOmnibusF4SDFirmware;
break; break;
case Bootloader::boardIDNXPHliteV3: case Bootloader::boardIDFMUK66V3:
rgFirmware = &_rgNXPHliteV3Firmware; rgFirmware = &_rgFMUK66V3Firmware;
break; break;
case Bootloader::boardID3DRRadio: case Bootloader::boardID3DRRadio:
rgFirmware = &_rg3DRRadioFirmware; rgFirmware = &_rg3DRRadioFirmware;
......
...@@ -212,7 +212,7 @@ private: ...@@ -212,7 +212,7 @@ private:
QHash<FirmwareIdentifier, QString> _rgASCV1Firmware; QHash<FirmwareIdentifier, QString> _rgASCV1Firmware;
QHash<FirmwareIdentifier, QString> _rgCrazyflie2Firmware; QHash<FirmwareIdentifier, QString> _rgCrazyflie2Firmware;
QHash<FirmwareIdentifier, QString> _rgOmnibusF4SDFirmware; QHash<FirmwareIdentifier, QString> _rgOmnibusF4SDFirmware;
QHash<FirmwareIdentifier, QString> _rgNXPHliteV3Firmware; QHash<FirmwareIdentifier, QString> _rgFMUK66V3Firmware;
QHash<FirmwareIdentifier, QString> _rgPX4FLowFirmware; QHash<FirmwareIdentifier, QString> _rgPX4FLowFirmware;
QHash<FirmwareIdentifier, QString> _rg3DRRadioFirmware; QHash<FirmwareIdentifier, QString> _rg3DRRadioFirmware;
......
...@@ -78,6 +78,17 @@ void VideoItem::setSurface(VideoSurface *surface) ...@@ -78,6 +78,17 @@ void VideoItem::setSurface(VideoSurface *surface)
} }
#if defined(QGC_GST_STREAMING) #if defined(QGC_GST_STREAMING)
QSGGeometry* VideoItem::_createDefaultGeometry(QRectF& rectBound)
{
QSGGeometry *geometry = new QSGGeometry(QSGGeometry::defaultAttributes_Point2D(), 4);
geometry->vertexDataAsPoint2D()[0].set(rectBound.x(), rectBound.y());
geometry->vertexDataAsPoint2D()[1].set(rectBound.x(), rectBound.height());
geometry->vertexDataAsPoint2D()[2].set(rectBound.width(), rectBound.y());
geometry->vertexDataAsPoint2D()[3].set(rectBound.width(), rectBound.height());
return geometry;
}
QSGNode* VideoItem::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData*) QSGNode* VideoItem::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData*)
{ {
QRectF r = boundingRect(); QRectF r = boundingRect();
...@@ -103,19 +114,22 @@ QSGNode* VideoItem::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData*) ...@@ -103,19 +114,22 @@ QSGNode* VideoItem::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData*)
newNode = oldNode; newNode = oldNode;
} }
if (r != _data->targetArea) { if (r != _data->targetArea) {
QSGGeometry *geometry = new QSGGeometry(QSGGeometry::defaultAttributes_Point2D(), 4);
geometry->vertexDataAsPoint2D()[0].set(r.x(), r.y());
geometry->vertexDataAsPoint2D()[1].set(r.x(), r.height());
geometry->vertexDataAsPoint2D()[2].set(r.width(), r.y());
geometry->vertexDataAsPoint2D()[3].set(r.width(), r.height());
QSGGeometryNode *node = static_cast<QSGGeometryNode*>(newNode); QSGGeometryNode *node = static_cast<QSGGeometryNode*>(newNode);
node->setGeometry(geometry); node->setGeometry(_createDefaultGeometry(r));
_data->targetArea = r; _data->targetArea = r;
} }
} else { } else {
g_signal_emit_by_name(_data->surface.data()->_data->videoSink, "update-node", (void*)oldNode, r.x(), r.y(), r.width(), r.height(), (void**)&newNode); g_signal_emit_by_name(_data->surface.data()->_data->videoSink, "update-node", (void*)oldNode, r.x(), r.y(), r.width(), r.height(), (void**)&newNode);
} }
// Sometimes we can still end up here with no geometry when gstreamer fails to create it for whatever reason. If that happens it can
// cause crashes.
QSGGeometryNode *node = static_cast<QSGGeometryNode*>(newNode);
if (node->geometry() == nullptr) {
qDebug() << "Creating default geom";
node->setGeometry(_createDefaultGeometry(r));
}
return newNode; return newNode;
} }
#endif #endif
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
#include <QtQuick/QQuickItem> #include <QtQuick/QQuickItem>
#include "VideoSurface.h" #include "VideoSurface.h"
class QSGGeometry;
class VideoItem : public QQuickItem class VideoItem : public QQuickItem
{ {
Q_OBJECT Q_OBJECT
...@@ -40,6 +42,8 @@ protected: ...@@ -40,6 +42,8 @@ protected:
private: private:
#if defined(QGC_GST_STREAMING) #if defined(QGC_GST_STREAMING)
QSGGeometry* _createDefaultGeometry(QRectF& rectBound);
struct Private; struct Private;
Private* const _data; Private* const _data;
#endif #endif
......
...@@ -19,7 +19,8 @@ ...@@ -19,7 +19,8 @@
{ "vendorID": 9900, "productID": 65, "boardClass": "Pixhawk", "name": "ASC V1" }, { "vendorID": 9900, "productID": 65, "boardClass": "Pixhawk", "name": "ASC V1" },
{ "vendorID": 9900, "productID": 22, "boardClass": "Pixhawk", "name": "Crazyflie 2" }, { "vendorID": 9900, "productID": 22, "boardClass": "Pixhawk", "name": "Crazyflie 2" },
{ "vendorID": 9900, "productID": 1, "boardClass": "Pixhawk", "name": "Omnibus F4 SD" }, { "vendorID": 9900, "productID": 1, "boardClass": "Pixhawk", "name": "Omnibus F4 SD" },
{ "vendorID": 8137, "productID": 28, "boardClass": "Pixhawk", "name": "PX4 NXPHlite v3.x" }, { "vendorID": 8137, "productID": 28, "boardClass": "Pixhawk", "name": "PX4 FMUK66 v3.x" },
{ "vendorID": 1155, "productID": 22336, "boardClass": "Pixhawk", "name": "ArduPilot ChibiOS" }, { "vendorID": 1155, "productID": 22336, "boardClass": "Pixhawk", "name": "ArduPilot ChibiOS" },
{ "vendorID": 4617, "productID": 22336, "boardClass": "Pixhawk", "name": "ArduPilot ChibiOS" }, { "vendorID": 4617, "productID": 22336, "boardClass": "Pixhawk", "name": "ArduPilot ChibiOS" },
......
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