Commit b6a0f25c authored by Gus Grubba's avatar Gus Grubba

Make ToolStrip be at the same Y position on both Fly and Plan view

Make ToolStrip font smaller (Desktop builds)
Check for auto configured video stream before testing video source type
parent 6ab120ac
...@@ -572,8 +572,8 @@ Item { ...@@ -572,8 +572,8 @@ Item {
anchors.left: isInstrumentRight() ? _mapAndVideo.left : undefined anchors.left: isInstrumentRight() ? _mapAndVideo.left : undefined
anchors.rightMargin:isInstrumentRight() ? undefined : ScreenTools.defaultFontPixelWidth anchors.rightMargin:isInstrumentRight() ? undefined : ScreenTools.defaultFontPixelWidth
anchors.right: isInstrumentRight() ? undefined : _mapAndVideo.right anchors.right: isInstrumentRight() ? undefined : _mapAndVideo.right
anchors.topMargin: ScreenTools.toolbarHeight + anchors.leftMargin anchors.topMargin: mainWindow.header.height + (ScreenTools.defaultFontPixelHeight * 0.5)
anchors.top: _mapAndVideo.top anchors.top: parent.top
z: _mapAndVideo.z + 4 z: _mapAndVideo.z + 4
maxHeight: (_flightVideo.visible ? _flightVideo.y : parent.height) - toolStrip.y maxHeight: (_flightVideo.visible ? _flightVideo.y : parent.height) - toolStrip.y
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
****************************************************************************/ ****************************************************************************/
import QtQuick 2.3 import QtQuick 2.4
import QtQuick.Controls 1.2 import QtQuick.Controls 1.2
import QtLocation 5.3 import QtLocation 5.3
import QtPositioning 5.3 import QtPositioning 5.3
...@@ -166,7 +166,6 @@ FlightMap { ...@@ -166,7 +166,6 @@ FlightMap {
QGCMapPalette { id: mapPal; lightColors: isSatelliteMap } QGCMapPalette { id: mapPal; lightColors: isSatelliteMap }
Connections { Connections {
enabled: missionController !== null
target: missionController target: missionController
ignoreUnknownSignals: true ignoreUnknownSignals: true
onNewItemsFromVehicle: { onNewItemsFromVehicle: {
......
...@@ -530,12 +530,12 @@ Item { ...@@ -530,12 +530,12 @@ Item {
//----------------------------------------------------------- //-----------------------------------------------------------
// Left tool strip // Left tool strip
ToolStrip { ToolStrip {
id: toolStrip id: toolStrip
anchors.leftMargin: ScreenTools.defaultFontPixelWidth * 2 anchors.leftMargin: ScreenTools.defaultFontPixelWidth * 2
anchors.left: parent.left anchors.left: parent.left
anchors.topMargin: _toolButtonTopMargin + anchors.leftMargin anchors.topMargin: ScreenTools.defaultFontPixelHeight * 0.5
anchors.top: parent.top anchors.top: parent.top
z: QGroundControl.zOrderWidgets z: QGroundControl.zOrderWidgets
showAlternateIcon: [ false, _planMasterController.dirty, false, false, false, false, false, false ] showAlternateIcon: [ false, _planMasterController.dirty, false, false, false, false, false, false ]
rotateImage: [ false, _planMasterController.syncInProgress, false, false, false, false, false, false ] rotateImage: [ false, _planMasterController.syncInProgress, false, false, false, false, false, false ]
......
...@@ -36,7 +36,6 @@ Rectangle { ...@@ -36,7 +36,6 @@ Rectangle {
signal clicked(int index, bool checked) signal clicked(int index, bool checked)
QGCPalette { id: qgcPal }
ButtonGroup { ButtonGroup {
id: buttonGroup id: buttonGroup
exclusive: false exclusive: false
...@@ -59,7 +58,7 @@ Rectangle { ...@@ -59,7 +58,7 @@ Rectangle {
anchors.right: toolStripColumn.right anchors.right: toolStripColumn.right
height: width height: width
radius: ScreenTools.defaultFontPixelWidth / 2 radius: ScreenTools.defaultFontPixelWidth / 2
fontPointSize: ScreenTools.isMobile ? ScreenTools.smallFontPointSize : ScreenTools.defaultFontPointSize fontPointSize: ScreenTools.smallFontPointSize
enabled: _root.buttonEnabled ? _root.buttonEnabled[index] : true enabled: _root.buttonEnabled ? _root.buttonEnabled[index] : true
visible: _root.buttonVisible ? _root.buttonVisible[index] : true visible: _root.buttonVisible ? _root.buttonVisible[index] : true
......
...@@ -130,16 +130,16 @@ bool VideoSettings::streamConfigured(void) ...@@ -130,16 +130,16 @@ bool VideoSettings::streamConfigured(void)
#if !defined(QGC_GST_STREAMING) #if !defined(QGC_GST_STREAMING)
return false; return false;
#endif #endif
//-- First, check if it's disabled //-- First, check if it's autoconfigured
QString vSource = videoSource()->rawValue().toString();
if(vSource == videoSourceNoVideo || vSource == videoDisabled) {
return false;
}
//-- Check if it's autoconfigured
if(qgcApp()->toolbox()->videoManager()->autoStreamConfigured()) { if(qgcApp()->toolbox()->videoManager()->autoStreamConfigured()) {
qCDebug(VideoManagerLog) << "Stream auto configured"; qCDebug(VideoManagerLog) << "Stream auto configured";
return true; return true;
} }
//-- Check if it's disabled
QString vSource = videoSource()->rawValue().toString();
if(vSource == videoSourceNoVideo || vSource == videoDisabled) {
return false;
}
//-- If UDP, check if port is set //-- If UDP, check if port is set
if(vSource == videoSourceUDP) { if(vSource == videoSourceUDP) {
qCDebug(VideoManagerLog) << "Testing configuration for UDP Stream:" << udpPort()->rawValue().toInt(); qCDebug(VideoManagerLog) << "Testing configuration for UDP Stream:" << udpPort()->rawValue().toInt();
......
...@@ -504,8 +504,7 @@ void Vehicle::_commonInit(void) ...@@ -504,8 +504,7 @@ void Vehicle::_commonInit(void)
_flightTimeFact.setRawValue(0); _flightTimeFact.setRawValue(0);
// Set video stream to udp if running ArduSub and Video is disabled // Set video stream to udp if running ArduSub and Video is disabled
if (sub() && _settingsManager->videoSettings()->videoSource()->rawValue() == VideoSettings::videoDisabled) if (sub() && _settingsManager->videoSettings()->videoSource()->rawValue() == VideoSettings::videoDisabled) {
{
_settingsManager->videoSettings()->videoSource()->setRawValue(VideoSettings::videoSourceUDP); _settingsManager->videoSettings()->videoSource()->setRawValue(VideoSettings::videoSourceUDP);
} }
......
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