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
ca053bd0
Commit
ca053bd0
authored
Jul 31, 2013
by
Michael Carpenter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Addition of pitch/roll/yaw P value locking in ArduCopter Pid Config
parent
365a330c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
0 deletions
+27
-0
ArduCopterPidConfig.cc
src/ui/configuration/ArduCopterPidConfig.cc
+24
-0
ArduCopterPidConfig.h
src/ui/configuration/ArduCopterPidConfig.h
+3
-0
No files found.
src/ui/configuration/ArduCopterPidConfig.cc
View file @
ca053bd0
...
...
@@ -3,6 +3,11 @@
ArduCopterPidConfig
::
ArduCopterPidConfig
(
QWidget
*
parent
)
:
AP2ConfigWidget
(
parent
)
{
ui
.
setupUi
(
this
);
m_pitchRollLocked
=
false
;
connect
(
ui
.
checkBox
,
SIGNAL
(
clicked
(
bool
)),
this
,
SLOT
(
lockCheckBoxClicked
(
bool
)));
connect
(
ui
.
stabilPitchPSpinBox
,
SIGNAL
(
valueChanged
(
double
)),
this
,
SLOT
(
stabilLockedChanged
(
double
)));
connect
(
ui
.
stabilRollPSpinBox
,
SIGNAL
(
valueChanged
(
double
)),
this
,
SLOT
(
stabilLockedChanged
(
double
)));
connect
(
ui
.
stabilYawPSpinBox
,
SIGNAL
(
valueChanged
(
double
)),
this
,
SLOT
(
stabilLockedChanged
(
double
)));
m_nameToBoxMap
[
"STB_RLL_P"
]
=
ui
.
stabilPitchPSpinBox
;
m_nameToBoxMap
[
"STB_PIT_P"
]
=
ui
.
stabilRollPSpinBox
;
m_nameToBoxMap
[
"STB_YAW_P"
]
=
ui
.
stabilYawPSpinBox
;
...
...
@@ -109,6 +114,25 @@ ArduCopterPidConfig::ArduCopterPidConfig(QWidget *parent) : AP2ConfigWidget(pare
}
initConnections
();
}
void
ArduCopterPidConfig
::
lockCheckBoxClicked
(
bool
checked
)
{
m_pitchRollLocked
=
checked
;
}
void
ArduCopterPidConfig
::
stabilLockedChanged
(
double
value
)
{
if
(
m_pitchRollLocked
)
{
disconnect
(
ui
.
stabilPitchPSpinBox
,
SIGNAL
(
valueChanged
(
double
)),
this
,
SLOT
(
stabilLockedChanged
(
double
)));
disconnect
(
ui
.
stabilRollPSpinBox
,
SIGNAL
(
valueChanged
(
double
)),
this
,
SLOT
(
stabilLockedChanged
(
double
)));
disconnect
(
ui
.
stabilYawPSpinBox
,
SIGNAL
(
valueChanged
(
double
)),
this
,
SLOT
(
stabilLockedChanged
(
double
)));
ui
.
stabilPitchPSpinBox
->
setValue
(
value
);
ui
.
stabilRollPSpinBox
->
setValue
(
value
);
ui
.
stabilYawPSpinBox
->
setValue
(
value
);
connect
(
ui
.
stabilPitchPSpinBox
,
SIGNAL
(
valueChanged
(
double
)),
this
,
SLOT
(
stabilLockedChanged
(
double
)));
connect
(
ui
.
stabilRollPSpinBox
,
SIGNAL
(
valueChanged
(
double
)),
this
,
SLOT
(
stabilLockedChanged
(
double
)));
connect
(
ui
.
stabilYawPSpinBox
,
SIGNAL
(
valueChanged
(
double
)),
this
,
SLOT
(
stabilLockedChanged
(
double
)));
}
}
ArduCopterPidConfig
::~
ArduCopterPidConfig
()
{
...
...
src/ui/configuration/ArduCopterPidConfig.h
View file @
ca053bd0
...
...
@@ -17,7 +17,10 @@ private slots:
void
writeButtonClicked
();
void
refreshButtonClicked
();
void
parameterChanged
(
int
uas
,
int
component
,
QString
parameterName
,
QVariant
value
);
void
lockCheckBoxClicked
(
bool
checked
);
void
stabilLockedChanged
(
double
value
);
private:
bool
m_pitchRollLocked
;
QList
<
QPair
<
int
,
QString
>
>
m_ch6ValueToTextList
;
QList
<
QPair
<
int
,
QString
>
>
m_ch78ValueToTextList
;
QMap
<
QString
,
QDoubleSpinBox
*>
m_nameToBoxMap
;
...
...
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