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
56190d75
Commit
56190d75
authored
Oct 01, 2012
by
Lorenz Meier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
HIL fixes
parent
2ead9b7d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
6 deletions
+18
-6
QGCXPlaneLink.cc
src/comm/QGCXPlaneLink.cc
+13
-6
QGCXPlaneLink.h
src/comm/QGCXPlaneLink.h
+2
-0
QGCHilConfiguration.ui
src/ui/QGCHilConfiguration.ui
+3
-0
No files found.
src/comm/QGCXPlaneLink.cc
View file @
56190d75
...
@@ -42,6 +42,8 @@ This file is part of the QGROUNDCONTROL project
...
@@ -42,6 +42,8 @@ This file is part of the QGROUNDCONTROL project
QGCXPlaneLink
::
QGCXPlaneLink
(
UASInterface
*
mav
,
QString
remoteHost
,
QHostAddress
localHost
,
quint16
localPort
)
:
QGCXPlaneLink
::
QGCXPlaneLink
(
UASInterface
*
mav
,
QString
remoteHost
,
QHostAddress
localHost
,
quint16
localPort
)
:
mav
(
mav
),
mav
(
mav
),
remoteHost
(
QHostAddress
(
"127.0.0.1"
)),
remotePort
(
49000
),
socket
(
NULL
),
socket
(
NULL
),
process
(
NULL
),
process
(
NULL
),
terraSync
(
NULL
),
terraSync
(
NULL
),
...
@@ -72,7 +74,7 @@ void QGCXPlaneLink::loadSettings()
...
@@ -72,7 +74,7 @@ void QGCXPlaneLink::loadSettings()
settings
.
sync
();
settings
.
sync
();
settings
.
beginGroup
(
"QGC_XPLANE_LINK"
);
settings
.
beginGroup
(
"QGC_XPLANE_LINK"
);
setRemoteHost
(
settings
.
value
(
"REMOTE_HOST"
,
QString
(
"%1:%2"
).
arg
(
remoteHost
.
toString
()).
arg
(
remotePort
)).
toString
());
setRemoteHost
(
settings
.
value
(
"REMOTE_HOST"
,
QString
(
"%1:%2"
).
arg
(
remoteHost
.
toString
()).
arg
(
remotePort
)).
toString
());
setVersion
(
settings
.
value
(
"XPLANE_VERSION"
,
10
).
to
String
());
setVersion
(
settings
.
value
(
"XPLANE_VERSION"
,
10
).
to
Int
());
selectPlane
(
settings
.
value
(
"AIRFRAME"
,
"default"
).
toString
());
selectPlane
(
settings
.
value
(
"AIRFRAME"
,
"default"
).
toString
());
settings
.
endGroup
();
settings
.
endGroup
();
}
}
...
@@ -115,11 +117,12 @@ void QGCXPlaneLink::setVersion(const QString& version)
...
@@ -115,11 +117,12 @@ void QGCXPlaneLink::setVersion(const QString& version)
}
}
}
}
//void QGCXPlaneLink::setVersion(unsigned int version)
void
QGCXPlaneLink
::
setVersion
(
unsigned
int
version
)
//{
{
//// bool changed = (xPlaneVersion != version);
bool
changed
=
(
xPlaneVersion
!=
version
);
// xPlaneVersion = version;
xPlaneVersion
=
version
;
//}
if
(
changed
)
emit
versionChanged
(
QString
(
"X-Plane %1"
).
arg
(
xPlaneVersion
));
}
/**
/**
...
@@ -174,6 +177,9 @@ QString QGCXPlaneLink::getRemoteHost()
...
@@ -174,6 +177,9 @@ QString QGCXPlaneLink::getRemoteHost()
*/
*/
void
QGCXPlaneLink
::
setRemoteHost
(
const
QString
&
newHost
)
void
QGCXPlaneLink
::
setRemoteHost
(
const
QString
&
newHost
)
{
{
if
(
newHost
.
length
()
==
0
)
return
;
if
(
newHost
.
contains
(
":"
))
if
(
newHost
.
contains
(
":"
))
{
{
//qDebug() << "HOST: " << newHost.split(":").first();
//qDebug() << "HOST: " << newHost.split(":").first();
...
@@ -204,6 +210,7 @@ void QGCXPlaneLink::setRemoteHost(const QString& newHost)
...
@@ -204,6 +210,7 @@ void QGCXPlaneLink::setRemoteHost(const QString& newHost)
{
{
// Add newHost
// Add newHost
remoteHost
=
info
.
addresses
().
first
();
remoteHost
=
info
.
addresses
().
first
();
if
(
remotePort
==
0
)
remotePort
=
49000
;
}
}
}
}
...
...
src/comm/QGCXPlaneLink.h
View file @
56190d75
...
@@ -102,6 +102,8 @@ public slots:
...
@@ -102,6 +102,8 @@ public slots:
void
updateActuators
(
uint64_t
time
,
float
act1
,
float
act2
,
float
act3
,
float
act4
,
float
act5
,
float
act6
,
float
act7
,
float
act8
);
void
updateActuators
(
uint64_t
time
,
float
act1
,
float
act2
,
float
act3
,
float
act4
,
float
act5
,
float
act6
,
float
act7
,
float
act8
);
/** @brief Set the simulator version as text string */
/** @brief Set the simulator version as text string */
void
setVersion
(
const
QString
&
version
);
void
setVersion
(
const
QString
&
version
);
/** @brief Set the simulator version as integer */
void
setVersion
(
unsigned
int
version
);
QString
getVersion
()
QString
getVersion
()
{
{
return
QString
(
"X-Plane %1"
).
arg
(
xPlaneVersion
);
return
QString
(
"X-Plane %1"
).
arg
(
xPlaneVersion
);
...
...
src/ui/QGCHilConfiguration.ui
View file @
56190d75
...
@@ -101,6 +101,9 @@
...
@@ -101,6 +101,9 @@
</item>
</item>
<item
row=
"0"
column=
"1"
colspan=
"3"
>
<item
row=
"0"
column=
"1"
colspan=
"3"
>
<widget
class=
"QComboBox"
name=
"simComboBox"
>
<widget
class=
"QComboBox"
name=
"simComboBox"
>
<property
name=
"editable"
>
<bool>
true
</bool>
</property>
<item>
<item>
<property
name=
"text"
>
<property
name=
"text"
>
<string>
X-Plane 10
</string>
<string>
X-Plane 10
</string>
...
...
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