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
1a40f019
Commit
1a40f019
authored
Jul 31, 2013
by
Michael Carpenter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change for Failsafe config to correctly display GPS status and Disarmed on start
parent
d4803699
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
0 deletions
+22
-0
FailSafeConfig.cc
src/ui/configuration/FailSafeConfig.cc
+21
-0
FailSafeConfig.h
src/ui/configuration/FailSafeConfig.h
+1
-0
No files found.
src/ui/configuration/FailSafeConfig.cc
View file @
1a40f019
...
@@ -82,6 +82,11 @@ FailSafeConfig::FailSafeConfig(QWidget *parent) : AP2ConfigWidget(parent)
...
@@ -82,6 +82,11 @@ FailSafeConfig::FailSafeConfig(QWidget *parent) : AP2ConfigWidget(parent)
connect
(
ui
.
throttleCheckBox
,
SIGNAL
(
clicked
(
bool
)),
this
,
SLOT
(
throttleChecked
(
bool
)));
connect
(
ui
.
throttleCheckBox
,
SIGNAL
(
clicked
(
bool
)),
this
,
SLOT
(
throttleChecked
(
bool
)));
connect
(
ui
.
throttlePwmSpinBox
,
SIGNAL
(
editingFinished
()),
this
,
SLOT
(
throttlePwmChanged
()));
connect
(
ui
.
throttlePwmSpinBox
,
SIGNAL
(
editingFinished
()),
this
,
SLOT
(
throttlePwmChanged
()));
connect
(
ui
.
throttleFailSafeComboBox
,
SIGNAL
(
currentIndexChanged
(
int
)),
this
,
SLOT
(
throttleFailSafeChanged
(
int
)));
connect
(
ui
.
throttleFailSafeComboBox
,
SIGNAL
(
currentIndexChanged
(
int
)),
this
,
SLOT
(
throttleFailSafeChanged
(
int
)));
ui
.
armedLabel
->
setText
(
"<h1>DISARMED</h1>"
);
ui
.
modeLabel
->
setText
(
"<h1>MODE</h1>"
);
initConnections
();
initConnections
();
}
}
void
FailSafeConfig
::
gcsChecked
(
bool
checked
)
void
FailSafeConfig
::
gcsChecked
(
bool
checked
)
...
@@ -225,6 +230,7 @@ void FailSafeConfig::activeUASSet(UASInterface *uas)
...
@@ -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
(
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
(
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
(
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
)
if
(
m_uas
->
getSystemType
()
==
MAV_TYPE_FIXED_WING
)
{
{
ui
.
batteryFailCheckBox
->
setVisible
(
false
);
ui
.
batteryFailCheckBox
->
setVisible
(
false
);
...
@@ -417,3 +423,18 @@ void FailSafeConfig::hilActuatorsChanged(uint64_t time, float act1, float act2,
...
@@ -417,3 +423,18 @@ void FailSafeConfig::hilActuatorsChanged(uint64_t time, float act1, float act2,
ui
.
radio7Out
->
setValue
(
act7
);
ui
.
radio7Out
->
setValue
(
act7
);
ui
.
radio8Out
->
setValue
(
act8
);
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:
...
@@ -25,6 +25,7 @@ private slots:
void
throttleChecked
(
bool
checked
);
void
throttleChecked
(
bool
checked
);
void
throttlePwmChanged
();
void
throttlePwmChanged
();
void
throttleFailSafeChanged
(
int
index
);
void
throttleFailSafeChanged
(
int
index
);
void
gpsStatusChanged
(
UASInterface
*
uas
,
int
fixtype
);
private:
private:
Ui
::
FailSafeConfig
ui
;
Ui
::
FailSafeConfig
ui
;
};
};
...
...
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