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
3ae6d915
Commit
3ae6d915
authored
Feb 15, 2017
by
Don Gagne
Committed by
GitHub
Feb 15, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4465 from AlexeyBulatov/pr/autoconnect
Auto connect on start for UDP links
parents
d02b8cc9
2d75a33c
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
26 additions
and
13 deletions
+26
-13
QGCApplication.cc
src/QGCApplication.cc
+3
-0
BluetoothLink.h
src/comm/BluetoothLink.h
+0
-1
LinkConfiguration.h
src/comm/LinkConfiguration.h
+1
-1
LinkManager.cc
src/comm/LinkManager.cc
+11
-0
LinkManager.h
src/comm/LinkManager.h
+2
-0
LogReplayLink.h
src/comm/LogReplayLink.h
+0
-1
UDPLink.h
src/comm/UDPLink.h
+7
-6
LinkSettings.qml
src/ui/preferences/LinkSettings.qml
+2
-4
No files found.
src/QGCApplication.cc
View file @
3ae6d915
...
...
@@ -439,6 +439,9 @@ bool QGCApplication::_initForNormalAppBoot(void)
"Your saved settings have been reset to defaults."
);
}
// Connect links with flag AutoconnectLink
toolbox
()
->
linkManager
()
->
startAutoConnectedLinks
();
if
(
getQGCMapEngine
()
->
wasCacheReset
())
{
showMessage
(
"The Offline Map Cache database has been upgraded. "
"Your old map cache sets have been reset."
);
...
...
src/comm/BluetoothLink.h
View file @
3ae6d915
...
...
@@ -104,7 +104,6 @@ public:
void
loadSettings
(
QSettings
&
settings
,
const
QString
&
root
);
void
saveSettings
(
QSettings
&
settings
,
const
QString
&
root
);
void
updateSettings
();
bool
isAutoConnectAllowed
()
{
return
false
;
}
QString
settingsURL
()
{
return
"BluetoothSettings.qml"
;
}
public
slots
:
...
...
src/comm/LinkConfiguration.h
View file @
3ae6d915
...
...
@@ -93,7 +93,7 @@ public:
* Is Auto Connect allowed for this type?
* @return True if this type can be set as an Auto Connect configuration
*/
virtual
bool
isAutoConnectAllowed
()
{
return
tru
e
;
}
virtual
bool
isAutoConnectAllowed
()
{
return
fals
e
;
}
/*!
* @brief Connection type
...
...
src/comm/LinkManager.cc
View file @
3ae6d915
...
...
@@ -990,3 +990,14 @@ QList<LinkInterface*> LinkManager::links(void)
return
rawLinks
;
}
void
LinkManager
::
startAutoConnectedLinks
(
void
)
{
SharedLinkConfigurationPointer
conf
;
for
(
int
i
=
0
;
i
<
_sharedConfigurations
.
count
();
i
++
)
{
conf
=
_sharedConfigurations
[
i
];
if
(
conf
->
isAutoConnect
())
createConnectedLink
(
conf
);
}
}
src/comm/LinkManager.h
View file @
3ae6d915
...
...
@@ -171,6 +171,8 @@ public:
SharedLinkConfigurationPointer
addConfiguration
(
LinkConfiguration
*
config
);
void
startAutoConnectedLinks
(
void
);
signals:
void
autoconnectUDPChanged
(
bool
autoconnect
);
void
autoconnectPixhawkChanged
(
bool
autoconnect
);
...
...
src/comm/LogReplayLink.h
View file @
3ae6d915
...
...
@@ -40,7 +40,6 @@ public:
void
loadSettings
(
QSettings
&
settings
,
const
QString
&
root
);
void
saveSettings
(
QSettings
&
settings
,
const
QString
&
root
);
void
updateSettings
();
bool
isAutoConnectAllowed
()
{
return
false
;
}
QString
settingsURL
()
{
return
"LogReplaySettings.qml"
;
}
signals:
void
fileNameChanged
();
...
...
src/comm/UDPLink.h
View file @
3ae6d915
...
...
@@ -131,12 +131,13 @@ public:
QStringList
hostList
()
{
return
_hostList
;
}
/// From LinkConfiguration
LinkType
type
()
{
return
LinkConfiguration
::
TypeUdp
;
}
void
copyFrom
(
LinkConfiguration
*
source
);
void
loadSettings
(
QSettings
&
settings
,
const
QString
&
root
);
void
saveSettings
(
QSettings
&
settings
,
const
QString
&
root
);
void
updateSettings
();
QString
settingsURL
()
{
return
"UdpSettings.qml"
;
}
LinkType
type
()
{
return
LinkConfiguration
::
TypeUdp
;
}
void
copyFrom
(
LinkConfiguration
*
source
);
void
loadSettings
(
QSettings
&
settings
,
const
QString
&
root
);
void
saveSettings
(
QSettings
&
settings
,
const
QString
&
root
);
void
updateSettings
();
bool
isAutoConnectAllowed
()
{
return
true
;
}
QString
settingsURL
()
{
return
"UdpSettings.qml"
;
}
signals:
void
localPortChanged
();
...
...
src/ui/preferences/LinkSettings.qml
View file @
3ae6d915
...
...
@@ -271,12 +271,11 @@ Rectangle {
height
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
width
:
parent
.
width
}
/*
//-- Auto Connect
//-- Auto Connect on Start
QGCCheckBox
{
text
:
"
Automatically Connect on Start
"
checked
:
false
enabled
: editConfig ? editConfig.autoConnectAllowed : false
visible
:
editConfig
?
editConfig
.
autoConnectAllowed
:
false
onCheckedChanged
:
{
if
(
editConfig
)
{
editConfig
.
autoConnect
=
checked
...
...
@@ -287,7 +286,6 @@ Rectangle {
checked
=
editConfig
.
autoConnect
}
}
*/
Item
{
height
:
ScreenTools
.
defaultFontPixelHeight
width
:
parent
.
width
...
...
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