Browse Source

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
QGC4.4
Gus Grubba 6 years ago
parent
commit
b6a0f25c57
  1. 4
      src/FlightDisplay/FlightDisplayView.qml
  2. 3
      src/FlightDisplay/FlightDisplayViewMap.qml
  3. 10
      src/PlanView/PlanView.qml
  4. 3
      src/QmlControls/ToolStrip.qml
  5. 12
      src/Settings/VideoSettings.cc
  6. 3
      src/Vehicle/Vehicle.cc

4
src/FlightDisplay/FlightDisplayView.qml

@ -572,8 +572,8 @@ Item { @@ -572,8 +572,8 @@ Item {
anchors.left: isInstrumentRight() ? _mapAndVideo.left : undefined
anchors.rightMargin:isInstrumentRight() ? undefined : ScreenTools.defaultFontPixelWidth
anchors.right: isInstrumentRight() ? undefined : _mapAndVideo.right
anchors.topMargin: ScreenTools.toolbarHeight + anchors.leftMargin
anchors.top: _mapAndVideo.top
anchors.topMargin: mainWindow.header.height + (ScreenTools.defaultFontPixelHeight * 0.5)
anchors.top: parent.top
z: _mapAndVideo.z + 4
maxHeight: (_flightVideo.visible ? _flightVideo.y : parent.height) - toolStrip.y

3
src/FlightDisplay/FlightDisplayViewMap.qml

@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
****************************************************************************/
import QtQuick 2.3
import QtQuick 2.4
import QtQuick.Controls 1.2
import QtLocation 5.3
import QtPositioning 5.3
@ -166,7 +166,6 @@ FlightMap { @@ -166,7 +166,6 @@ FlightMap {
QGCMapPalette { id: mapPal; lightColors: isSatelliteMap }
Connections {
enabled: missionController !== null
target: missionController
ignoreUnknownSignals: true
onNewItemsFromVehicle: {

10
src/PlanView/PlanView.qml

@ -530,12 +530,12 @@ Item { @@ -530,12 +530,12 @@ Item {
//-----------------------------------------------------------
// Left tool strip
ToolStrip {
id: toolStrip
id: toolStrip
anchors.leftMargin: ScreenTools.defaultFontPixelWidth * 2
anchors.left: parent.left
anchors.topMargin: _toolButtonTopMargin + anchors.leftMargin
anchors.top: parent.top
z: QGroundControl.zOrderWidgets
anchors.left: parent.left
anchors.topMargin: ScreenTools.defaultFontPixelHeight * 0.5
anchors.top: parent.top
z: QGroundControl.zOrderWidgets
showAlternateIcon: [ false, _planMasterController.dirty, false, false, false, false, false, false ]
rotateImage: [ false, _planMasterController.syncInProgress, false, false, false, false, false, false ]

3
src/QmlControls/ToolStrip.qml

@ -36,7 +36,6 @@ Rectangle { @@ -36,7 +36,6 @@ Rectangle {
signal clicked(int index, bool checked)
QGCPalette { id: qgcPal }
ButtonGroup {
id: buttonGroup
exclusive: false
@ -59,7 +58,7 @@ Rectangle { @@ -59,7 +58,7 @@ Rectangle {
anchors.right: toolStripColumn.right
height: width
radius: ScreenTools.defaultFontPixelWidth / 2
fontPointSize: ScreenTools.isMobile ? ScreenTools.smallFontPointSize : ScreenTools.defaultFontPointSize
fontPointSize: ScreenTools.smallFontPointSize
enabled: _root.buttonEnabled ? _root.buttonEnabled[index] : true
visible: _root.buttonVisible ? _root.buttonVisible[index] : true

12
src/Settings/VideoSettings.cc

@ -130,16 +130,16 @@ bool VideoSettings::streamConfigured(void) @@ -130,16 +130,16 @@ bool VideoSettings::streamConfigured(void)
#if !defined(QGC_GST_STREAMING)
return false;
#endif
//-- First, check if it's disabled
QString vSource = videoSource()->rawValue().toString();
if(vSource == videoSourceNoVideo || vSource == videoDisabled) {
return false;
}
//-- Check if it's autoconfigured
//-- First, check if it's autoconfigured
if(qgcApp()->toolbox()->videoManager()->autoStreamConfigured()) {
qCDebug(VideoManagerLog) << "Stream auto configured";
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(vSource == videoSourceUDP) {
qCDebug(VideoManagerLog) << "Testing configuration for UDP Stream:" << udpPort()->rawValue().toInt();

3
src/Vehicle/Vehicle.cc

@ -504,8 +504,7 @@ void Vehicle::_commonInit(void) @@ -504,8 +504,7 @@ void Vehicle::_commonInit(void)
_flightTimeFact.setRawValue(0);
// 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);
}

Loading…
Cancel
Save