Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
cfbc6f64
Unverified
Commit
cfbc6f64
authored
Dec 28, 2018
by
Gus Grubba
Committed by
GitHub
Dec 28, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7104 from mavlink/taisyncFixes
Various fixes
parents
168a7326
21323ccb
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
49 additions
and
44 deletions
+49
-44
ChangeLog.md
ChangeLog.md
+1
-0
Fact.cc
src/FactSystem/Fact.cc
+7
-5
SettingsFact.h
src/FactSystem/SettingsFact.h
+3
-3
TaisyncManager.cc
src/Taisync/TaisyncManager.cc
+35
-30
TaisyncManager.h
src/Taisync/TaisyncManager.h
+3
-6
No files found.
ChangeLog.md
View file @
cfbc6f64
...
...
@@ -17,6 +17,7 @@ Note: This file only contains high level features or important fixes.
*
Support loading polygons from SHP files
*
Bumped settings version (now 8). This will cause all settings to be reset to defaults.
*
Orbit visuals support changing rotation direction
*
Added support for the Taisync 2.4GHz ViUlinx digital HD wireless link.
## 3.4
...
...
src/FactSystem/Fact.cc
View file @
cfbc6f64
...
...
@@ -733,11 +733,13 @@ FactValueSliderListModel* Fact::valueSliderModel(void)
void
Fact
::
_checkForRebootMessaging
(
void
)
{
if
(
!
qgcApp
()
->
runningUnitTests
())
{
if
(
vehicleRebootRequired
())
{
qgcApp
()
->
showMessage
(
tr
(
"Change of parameter %1 requires a Vehicle reboot to take effect."
).
arg
(
name
()));
}
else
if
(
qgcRebootRequired
())
{
qgcApp
()
->
showMessage
(
tr
(
"Change of '%1' value requires restart of %2 to take effect."
).
arg
(
shortDescription
()).
arg
(
qgcApp
()
->
applicationName
()));
if
(
qgcApp
())
{
if
(
!
qgcApp
()
->
runningUnitTests
())
{
if
(
vehicleRebootRequired
())
{
qgcApp
()
->
showMessage
(
tr
(
"Change of parameter %1 requires a Vehicle reboot to take effect."
).
arg
(
name
()));
}
else
if
(
qgcRebootRequired
())
{
qgcApp
()
->
showMessage
(
tr
(
"Change of '%1' value requires restart of %2 to take effect."
).
arg
(
shortDescription
()).
arg
(
qgcApp
()
->
applicationName
()));
}
}
}
}
src/FactSystem/SettingsFact.h
View file @
cfbc6f64
...
...
@@ -17,9 +17,9 @@ class SettingsFact : public Fact
Q_OBJECT
public:
SettingsFact
(
QObject
*
parent
=
NULL
);
SettingsFact
(
QString
settingsGroup
,
FactMetaData
*
metaData
,
QObject
*
parent
=
NULL
);
SettingsFact
(
const
SettingsFact
&
other
,
QObject
*
parent
=
NULL
);
SettingsFact
(
QObject
*
parent
=
nullptr
);
SettingsFact
(
QString
settingsGroup
,
FactMetaData
*
metaData
,
QObject
*
parent
=
nullptr
);
SettingsFact
(
const
SettingsFact
&
other
,
QObject
*
parent
=
nullptr
);
const
SettingsFact
&
operator
=
(
const
SettingsFact
&
other
);
...
...
src/Taisync/TaisyncManager.cc
View file @
cfbc6f64
...
...
@@ -11,6 +11,7 @@
#include "TaisyncHandler.h"
#include "SettingsManager.h"
#include "QGCApplication.h"
#include "QGCCorePlugin.h"
#include "VideoManager.h"
#include <QSettings>
...
...
@@ -88,10 +89,6 @@ TaisyncManager::_reset()
emit
connectedChanged
();
_linkConnected
=
false
;
emit
linkConnectedChanged
();
_taiSettings
=
new
TaisyncSettings
(
this
);
connect
(
_taiSettings
,
&
TaisyncSettings
::
updateSettings
,
this
,
&
TaisyncManager
::
_updateSettings
);
connect
(
_taiSettings
,
&
TaisyncSettings
::
connected
,
this
,
&
TaisyncManager
::
_connected
);
connect
(
_taiSettings
,
&
TaisyncSettings
::
disconnected
,
this
,
&
TaisyncManager
::
_disconnected
);
if
(
!
_appSettings
)
{
_appSettings
=
_toolbox
->
settingsManager
()
->
appSettings
();
connect
(
_appSettings
->
enableTaisync
(),
&
Fact
::
rawValueChanged
,
this
,
&
TaisyncManager
::
_setEnabled
);
...
...
@@ -183,6 +180,7 @@ TaisyncManager::setToolbox(QGCToolbox* toolbox)
_videoRateList
.
append
(
"high"
);
connect
(
_videoRate
,
&
Fact
::
_containerRawValueChanged
,
this
,
&
TaisyncManager
::
_videoSettingsChanged
);
}
//-- Start it all
_reset
();
}
...
...
@@ -286,6 +284,12 @@ TaisyncManager::_setEnabled()
{
bool
enable
=
_appSettings
->
enableTaisync
()
->
rawValue
().
toBool
();
if
(
enable
)
{
if
(
!
_taiSettings
)
{
_taiSettings
=
new
TaisyncSettings
(
this
);
connect
(
_taiSettings
,
&
TaisyncSettings
::
updateSettings
,
this
,
&
TaisyncManager
::
_updateSettings
);
connect
(
_taiSettings
,
&
TaisyncSettings
::
connected
,
this
,
&
TaisyncManager
::
_connected
);
connect
(
_taiSettings
,
&
TaisyncSettings
::
disconnected
,
this
,
&
TaisyncManager
::
_disconnected
);
}
#if defined(__ios__) || defined(__android__)
if
(
!
_taiTelemetery
)
{
_taiTelemetery
=
new
TaisyncTelemetry
(
this
);
...
...
@@ -298,7 +302,7 @@ TaisyncManager::_setEnabled()
_taiTelemetery
->
start
();
}
#endif
_reqMask
=
REQ_ALL
;
_reqMask
=
static_cast
<
uint32_t
>
(
REQ_ALL
)
;
_workTimer
.
start
(
1000
);
}
else
{
//-- Stop everything
...
...
@@ -310,6 +314,16 @@ TaisyncManager::_setEnabled()
_setVideoEnabled
();
}
//-----------------------------------------------------------------------------
void
TaisyncManager
::
_restoreVideoSettings
(
Fact
*
setting
)
{
SettingsFact
*
pFact
=
dynamic_cast
<
SettingsFact
*>
(
setting
);
if
(
pFact
)
{
pFact
->
setVisible
(
qgcApp
()
->
toolbox
()
->
corePlugin
()
->
adjustSettingMetaData
(
VideoSettings
::
settingsGroup
,
*
setting
->
metaData
()));
}
}
//-----------------------------------------------------------------------------
void
TaisyncManager
::
_setVideoEnabled
()
...
...
@@ -317,21 +331,13 @@ TaisyncManager::_setVideoEnabled()
//-- Check both if video is enabled and Taisync support itself is enabled as well.
bool
enable
=
_appSettings
->
enableTaisyncVideo
()
->
rawValue
().
toBool
()
&&
_appSettings
->
enableTaisync
()
->
rawValue
().
toBool
();
if
(
enable
)
{
//-- If we haven't already saved the previous settings...
if
(
!
_savedVideoSource
.
isValid
())
{
//-- Hide video selection as we will be fixed to Taisync video and set the way we need it.
VideoSettings
*
pVSettings
=
qgcApp
()
->
toolbox
()
->
settingsManager
()
->
videoSettings
();
//-- First save current state.
_savedVideoSource
=
pVSettings
->
videoSource
()
->
rawValue
();
_savedVideoUDP
=
pVSettings
->
udpPort
()
->
rawValue
();
_savedAR
=
pVSettings
->
aspectRatio
()
->
rawValue
();
_savedVideoState
=
pVSettings
->
visible
();
//-- Now set it up the way we need it do be.
pVSettings
->
setVisible
(
false
);
pVSettings
->
udpPort
()
->
setRawValue
(
5600
);
pVSettings
->
aspectRatio
()
->
setRawValue
(
1024.0
/
768.0
);
pVSettings
->
videoSource
()
->
setRawValue
(
QString
(
VideoSettings
::
videoSourceUDP
));
}
//-- Set it up the way we need it do be.
VideoSettings
*
pVSettings
=
qgcApp
()
->
toolbox
()
->
settingsManager
()
->
videoSettings
();
pVSettings
->
setVisible
(
false
);
pVSettings
->
udpPort
()
->
setRawValue
(
5600
);
//-- TODO: this AR must come from somewhere
pVSettings
->
aspectRatio
()
->
setRawValue
(
1024.0
/
768.0
);
pVSettings
->
videoSource
()
->
setRawValue
(
QString
(
VideoSettings
::
videoSourceUDP
));
#if defined(__ios__) || defined(__android__)
if
(
!
_taiVideo
)
{
//-- iOS and Android receive raw h.264 and need a different pipeline
...
...
@@ -350,14 +356,11 @@ TaisyncManager::_setVideoEnabled()
_taiVideo
=
nullptr
;
}
#endif
if
(
!
_savedVideoSource
.
isValid
())
{
VideoSettings
*
pVSettings
=
qgcApp
()
->
toolbox
()
->
settingsManager
()
->
videoSettings
();
pVSettings
->
videoSource
()
->
setRawValue
(
_savedVideoSource
);
pVSettings
->
udpPort
()
->
setRawValue
(
_savedVideoUDP
);
pVSettings
->
aspectRatio
()
->
setRawValue
(
_savedAR
);
pVSettings
->
setVisible
(
_savedVideoState
);
_savedVideoSource
.
clear
();
}
VideoSettings
*
pVSettings
=
qgcApp
()
->
toolbox
()
->
settingsManager
()
->
videoSettings
();
_restoreVideoSettings
(
pVSettings
->
videoSource
());
_restoreVideoSettings
(
pVSettings
->
aspectRatio
());
_restoreVideoSettings
(
pVSettings
->
udpPort
());
pVSettings
->
setVisible
(
true
);
}
_enableVideo
=
enable
;
}
...
...
@@ -422,8 +425,10 @@ TaisyncManager::_checkTaisync()
{
if
(
_enabled
)
{
if
(
!
_isConnected
)
{
if
(
!
_taiSettings
->
isServerRunning
())
{
_taiSettings
->
start
();
if
(
_taiSettings
)
{
if
(
!
_taiSettings
->
isServerRunning
())
{
_taiSettings
->
start
();
}
}
}
else
{
//qCDebug(TaisyncVerbose) << bin << _reqMask;
...
...
src/Taisync/TaisyncManager.h
View file @
cfbc6f64
...
...
@@ -110,6 +110,7 @@ private slots:
private:
void
_close
();
void
_reset
();
void
_restoreVideoSettings
(
Fact
*
setting
);
FactMetaData
*
_createMetadata
(
const
char
*
name
,
QStringList
enums
);
private:
...
...
@@ -122,10 +123,10 @@ private:
REQ_RADIO_SETTINGS
=
16
,
REQ_RTSP_SETTINGS
=
32
,
REQ_IP_SETTINGS
=
64
,
REQ_ALL
=
0xFFFFFFF
F
,
REQ_ALL
=
0xFFFFFFF
,
};
uint32_t
_reqMask
=
REQ_ALL
;
uint32_t
_reqMask
=
static_cast
<
uint32_t
>
(
REQ_ALL
)
;
bool
_running
=
false
;
bool
_isConnected
=
false
;
AppSettings
*
_appSettings
=
nullptr
;
...
...
@@ -148,10 +149,6 @@ private:
int
_decodeIndex
=
0
;
QStringList
_rateList
;
int
_rateIndex
=
0
;
bool
_savedVideoState
=
true
;
QVariant
_savedVideoSource
;
QVariant
_savedVideoUDP
;
QVariant
_savedAR
;
QString
_serialNumber
;
QString
_fwVersion
;
Fact
*
_radioMode
=
nullptr
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment