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
87f5c5b5
Commit
87f5c5b5
authored
Dec 31, 2013
by
Lorenz Meier
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #456 from thomasgubler/flightgear_debug
flightgear: prevent aircraft from flying with no input
parents
07ac8ad9
0c985a67
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
13 deletions
+34
-13
QGCFlightGearLink.cc
src/comm/QGCFlightGearLink.cc
+29
-1
QGCFlightGearLink.h
src/comm/QGCFlightGearLink.h
+2
-0
QGCHilFlightGearConfiguration.ui
src/ui/QGCHilFlightGearConfiguration.ui
+3
-12
No files found.
src/comm/QGCFlightGearLink.cc
View file @
87f5c5b5
...
...
@@ -598,7 +598,10 @@ bool QGCFlightGearLink::connectSimulation()
}
flightGearArguments
<<
QString
(
"--lat=%1"
).
arg
(
UASManager
::
instance
()
->
getHomeLatitude
());
flightGearArguments
<<
QString
(
"--lon=%1"
).
arg
(
UASManager
::
instance
()
->
getHomeLongitude
());
flightGearArguments
<<
QString
(
"--altitude=%1"
).
arg
(
UASManager
::
instance
()
->
getHomeAltitude
());
//The altitude is not set because an altitude not equal to the ground altitude leads to a non-zero default throttle in flightgear
//Without the altitude-setting the aircraft is positioned on the ground
//flightGearArguments << QString("--altitude=%1").arg(UASManager::instance()->getHomeAltitude());
// Add new argument with this: flightGearArguments << "";
//flightGearArguments << QString("--aircraft=%2").arg(aircraft);
...
...
@@ -625,6 +628,8 @@ bool QGCFlightGearLink::connectSimulation()
// qDebug() << "STARTING: " << processTerraSync << terraSyncArguments;
process
->
start
(
processFgfs
,
flightGearArguments
);
// connect (process, SIGNAL(readyReadStandardOutput()), this, SLOT(printFgfsOutput()));
// connect (process, SIGNAL(readyReadStandardError()), this, SLOT(printFgfsError()));
...
...
@@ -665,6 +670,29 @@ void QGCFlightGearLink::printTerraSyncError()
}
}
void
QGCFlightGearLink
::
printFgfsOutput
()
{
qDebug
()
<<
"fgfs stdout:"
;
QByteArray
byteArray
=
process
->
readAllStandardOutput
();
QStringList
strLines
=
QString
(
byteArray
).
split
(
"
\n
"
);
foreach
(
QString
line
,
strLines
){
qDebug
()
<<
line
;
}
}
void
QGCFlightGearLink
::
printFgfsError
()
{
qDebug
()
<<
"fgfs stderr:"
;
QByteArray
byteArray
=
process
->
readAllStandardError
();
QStringList
strLines
=
QString
(
byteArray
).
split
(
"
\n
"
);
foreach
(
QString
line
,
strLines
){
qDebug
()
<<
line
;
}
}
/**
* @brief Set the startup arguments used to start flightgear
*
...
...
src/comm/QGCFlightGearLink.h
View file @
87f5c5b5
...
...
@@ -131,6 +131,8 @@ public slots:
void
printTerraSyncOutput
();
void
printTerraSyncError
();
void
printFgfsOutput
();
void
printFgfsError
();
void
setStartupArguments
(
QString
startupArguments
);
protected:
...
...
src/ui/QGCHilFlightGearConfiguration.ui
View file @
87f5c5b5
...
...
@@ -7,7 +7,7 @@
<x>
0
</x>
<y>
0
</y>
<width>
237
</width>
<height>
20
4
</height>
<height>
20
9
</height>
</rect>
</property>
<property
name=
"sizePolicy"
>
...
...
@@ -26,16 +26,7 @@
<bool>
false
</bool>
</property>
<layout
class=
"QGridLayout"
name=
"gridLayout"
>
<property
name=
"leftMargin"
>
<number>
0
</number>
</property>
<property
name=
"topMargin"
>
<number>
0
</number>
</property>
<property
name=
"rightMargin"
>
<number>
0
</number>
</property>
<property
name=
"bottomMargin"
>
<property
name=
"margin"
>
<number>
0
</number>
</property>
<property
name=
"spacing"
>
...
...
@@ -77,7 +68,7 @@
</sizepolicy>
</property>
<property
name=
"plainText"
>
<string>
--
in-air --roll=0 --pitch=0 --vc=9
0 --heading=300 --timeofday=noon --disable-hud-3d --disable-fullscreen --geometry=400x300 --disable-anti-alias-hud --wind=0@0 --turbulence=0.0 --prop:/sim/frame-rate-throttle-hz=30 --control=mouse --disable-intro-music --disable-sound --disable-random-objects --disable-ai-models --shading-flat --fog-disable --disable-specular-highlight --disable-random-objects --disable-panel --disable-clouds --fdm=jsb --units-meters --prop:/engines/engine/running=true
</string>
<string>
--
roll=0 --pitch=0 --vc=
0 --heading=300 --timeofday=noon --disable-hud-3d --disable-fullscreen --geometry=400x300 --disable-anti-alias-hud --wind=0@0 --turbulence=0.0 --prop:/sim/frame-rate-throttle-hz=30 --control=mouse --disable-intro-music --disable-sound --disable-random-objects --disable-ai-models --shading-flat --fog-disable --disable-specular-highlight --disable-random-objects --disable-panel --disable-clouds --fdm=jsb --units-meters --prop:/engines/engine/running=true
</string>
</property>
</widget>
</item>
...
...
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