Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
1a40f019
Commit
1a40f019
authored
Jul 31, 2013
by
Michael Carpenter
Browse files
Change for Failsafe config to correctly display GPS status and Disarmed on start
parent
d4803699
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/ui/configuration/FailSafeConfig.cc
View file @
1a40f019
...
...
@@ -82,6 +82,11 @@ FailSafeConfig::FailSafeConfig(QWidget *parent) : AP2ConfigWidget(parent)
connect
(
ui
.
throttleCheckBox
,
SIGNAL
(
clicked
(
bool
)),
this
,
SLOT
(
throttleChecked
(
bool
)));
connect
(
ui
.
throttlePwmSpinBox
,
SIGNAL
(
editingFinished
()),
this
,
SLOT
(
throttlePwmChanged
()));
connect
(
ui
.
throttleFailSafeComboBox
,
SIGNAL
(
currentIndexChanged
(
int
)),
this
,
SLOT
(
throttleFailSafeChanged
(
int
)));
ui
.
armedLabel
->
setText
(
"<h1>DISARMED</h1>"
);
ui
.
modeLabel
->
setText
(
"<h1>MODE</h1>"
);
initConnections
();
}
void
FailSafeConfig
::
gcsChecked
(
bool
checked
)
...
...
@@ -225,6 +230,7 @@ void FailSafeConfig::activeUASSet(UASInterface *uas)
connect
(
m_uas
,
SIGNAL
(
remoteControlChannelRawChanged
(
int
,
float
)),
this
,
SLOT
(
remoteControlChannelRawChanges
(
int
,
float
)));
connect
(
m_uas
,
SIGNAL
(
hilActuatorsChanged
(
uint64_t
,
float
,
float
,
float
,
float
,
float
,
float
,
float
,
float
)),
this
,
SLOT
(
hilActuatorsChanged
(
uint64_t
,
float
,
float
,
float
,
float
,
float
,
float
,
float
,
float
)));
connect
(
m_uas
,
SIGNAL
(
armingChanged
(
bool
)),
this
,
SLOT
(
armingChanged
(
bool
)));
connect
(
m_uas
,
SIGNAL
(
gpsLocalizationChanged
(
UASInterface
*
,
int
)),
this
,
SLOT
(
gpsStatusChanged
(
UASInterface
*
,
int
)));
if
(
m_uas
->
getSystemType
()
==
MAV_TYPE_FIXED_WING
)
{
ui
.
batteryFailCheckBox
->
setVisible
(
false
);
...
...
@@ -417,3 +423,18 @@ void FailSafeConfig::hilActuatorsChanged(uint64_t time, float act1, float act2,
ui
.
radio7Out
->
setValue
(
act7
);
ui
.
radio8Out
->
setValue
(
act8
);
}
void
FailSafeConfig
::
gpsStatusChanged
(
UASInterface
*
uas
,
int
fixtype
)
{
if
(
fixtype
==
0
||
fixtype
==
1
)
{
ui
.
gpsLabel
->
setText
(
"<h1>None</h1>"
);
}
else
if
(
fixtype
==
2
)
{
ui
.
gpsLabel
->
setText
(
"<h1>2D Fix</h1>"
);
}
else
if
(
fixtype
==
3
)
{
ui
.
gpsLabel
->
setText
(
"<h1>3D Fix</h1>"
);
}
}
src/ui/configuration/FailSafeConfig.h
View file @
1a40f019
...
...
@@ -25,6 +25,7 @@ private slots:
void
throttleChecked
(
bool
checked
);
void
throttlePwmChanged
();
void
throttleFailSafeChanged
(
int
index
);
void
gpsStatusChanged
(
UASInterface
*
uas
,
int
fixtype
);
private:
Ui
::
FailSafeConfig
ui
;
};
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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