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
e1267cf4
Commit
e1267cf4
authored
May 12, 2014
by
Lorenz Meier
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #655 from mavlink/rc_cal_cleanup
RC switches names fixed in RC calibration
parents
8371276c
06b8ce6d
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
58 additions
and
130 deletions
+58
-130
px4_custom_mode.h
src/comm/px4_custom_mode.h
+2
-2
UAS.cc
src/uas/UAS.cc
+4
-4
QGCPX4VehicleConfig.cc
src/ui/QGCPX4VehicleConfig.cc
+19
-19
QGCPX4VehicleConfig.ui
src/ui/QGCPX4VehicleConfig.ui
+31
-103
UASControlWidget.cc
src/ui/uas/UASControlWidget.cc
+2
-2
No files found.
src/comm/px4_custom_mode.h
View file @
e1267cf4
...
...
@@ -3,8 +3,8 @@
enum
PX4_CUSTOM_MAIN_MODE
{
PX4_CUSTOM_MAIN_MODE_MANUAL
=
1
,
PX4_CUSTOM_MAIN_MODE_
SEATBELT
,
PX4_CUSTOM_MAIN_MODE_
EASY
,
PX4_CUSTOM_MAIN_MODE_
ALTCTL
,
PX4_CUSTOM_MAIN_MODE_
POSCTL
,
PX4_CUSTOM_MAIN_MODE_AUTO
,
};
...
...
src/uas/UAS.cc
View file @
e1267cf4
...
...
@@ -3394,10 +3394,10 @@ QString UAS::getShortModeTextFor(uint8_t base_mode, uint32_t custom_mode, int au
px4_mode
.
data
=
custom_mode
;
if
(
px4_mode
.
main_mode
==
PX4_CUSTOM_MAIN_MODE_MANUAL
)
{
mode
+=
"|MANUAL"
;
}
else
if
(
px4_mode
.
main_mode
==
PX4_CUSTOM_MAIN_MODE_
SEATBELT
)
{
mode
+=
"|
SEATBELT
"
;
}
else
if
(
px4_mode
.
main_mode
==
PX4_CUSTOM_MAIN_MODE_
EASY
)
{
mode
+=
"|
EASY
"
;
}
else
if
(
px4_mode
.
main_mode
==
PX4_CUSTOM_MAIN_MODE_
ALTCTL
)
{
mode
+=
"|
ALTCTL
"
;
}
else
if
(
px4_mode
.
main_mode
==
PX4_CUSTOM_MAIN_MODE_
POSCTL
)
{
mode
+=
"|
POSCTL
"
;
}
else
if
(
px4_mode
.
main_mode
==
PX4_CUSTOM_MAIN_MODE_AUTO
)
{
mode
+=
"|AUTO"
;
if
(
px4_mode
.
sub_mode
==
PX4_CUSTOM_SUB_MODE_AUTO_READY
)
{
...
...
src/ui/QGCPX4VehicleConfig.cc
View file @
e1267cf4
...
...
@@ -71,7 +71,7 @@ QGCPX4VehicleConfig::QGCPX4VehicleConfig(QWidget *parent) :
channelNames
<<
"Yaw / Rudder"
;
channelNames
<<
"Throttle"
;
channelNames
<<
"Main Mode Switch"
;
channelNames
<<
"
Assist
Switch"
;
channelNames
<<
"
Posctl
Switch"
;
channelNames
<<
"Loiter Switch"
;
channelNames
<<
"Return Switch"
;
channelNames
<<
"Flaps"
;
...
...
@@ -202,8 +202,8 @@ QGCPX4VehicleConfig::QGCPX4VehicleConfig(QWidget *parent) :
connect
(
ui
->
yawSpinBox
,
SIGNAL
(
valueChanged
(
int
)),
this
,
SLOT
(
setYawChan
(
int
)));
connect
(
ui
->
throttleSpinBox
,
SIGNAL
(
valueChanged
(
int
)),
this
,
SLOT
(
setThrottleChan
(
int
)));
connect
(
ui
->
modeSpinBox
,
SIGNAL
(
valueChanged
(
int
)),
this
,
SLOT
(
setModeChan
(
int
)));
connect
(
ui
->
assist
SwSpinBox
,
SIGNAL
(
valueChanged
(
int
)),
this
,
SLOT
(
setAssistChan
(
int
)));
connect
(
ui
->
mission
SwSpinBox
,
SIGNAL
(
valueChanged
(
int
)),
this
,
SLOT
(
setMissionChan
(
int
)));
connect
(
ui
->
posctl
SwSpinBox
,
SIGNAL
(
valueChanged
(
int
)),
this
,
SLOT
(
setAssistChan
(
int
)));
connect
(
ui
->
loiter
SwSpinBox
,
SIGNAL
(
valueChanged
(
int
)),
this
,
SLOT
(
setMissionChan
(
int
)));
connect
(
ui
->
returnSwSpinBox
,
SIGNAL
(
valueChanged
(
int
)),
this
,
SLOT
(
setReturnChan
(
int
)));
connect
(
ui
->
flapsSpinBox
,
SIGNAL
(
valueChanged
(
int
)),
this
,
SLOT
(
setFlapsChan
(
int
)));
connect
(
ui
->
aux1SpinBox
,
SIGNAL
(
valueChanged
(
int
)),
this
,
SLOT
(
setAux1Chan
(
int
)));
...
...
@@ -215,8 +215,8 @@ QGCPX4VehicleConfig::QGCPX4VehicleConfig(QWidget *parent) :
connect
(
ui
->
invertCheckBox_3
,
SIGNAL
(
clicked
(
bool
)),
this
,
SLOT
(
setYawInverted
(
bool
)));
connect
(
ui
->
invertCheckBox_4
,
SIGNAL
(
clicked
(
bool
)),
this
,
SLOT
(
setThrottleInverted
(
bool
)));
connect
(
ui
->
invertCheckBox_5
,
SIGNAL
(
clicked
(
bool
)),
this
,
SLOT
(
setModeInverted
(
bool
)));
connect
(
ui
->
assist
SwInvertCheckBox
,
SIGNAL
(
clicked
(
bool
)),
this
,
SLOT
(
setAssistInverted
(
bool
)));
connect
(
ui
->
mission
SwInvertCheckBox
,
SIGNAL
(
clicked
(
bool
)),
this
,
SLOT
(
setMissionInverted
(
bool
)));
connect
(
ui
->
posctl
SwInvertCheckBox
,
SIGNAL
(
clicked
(
bool
)),
this
,
SLOT
(
setAssistInverted
(
bool
)));
connect
(
ui
->
loiter
SwInvertCheckBox
,
SIGNAL
(
clicked
(
bool
)),
this
,
SLOT
(
setMissionInverted
(
bool
)));
connect
(
ui
->
returnSwInvertCheckBox
,
SIGNAL
(
clicked
(
bool
)),
this
,
SLOT
(
setReturnInverted
(
bool
)));
connect
(
ui
->
flapsInvertCheckBox
,
SIGNAL
(
clicked
(
bool
)),
this
,
SLOT
(
setFlapsInverted
(
bool
)));
connect
(
ui
->
aux1InvertCheckBox
,
SIGNAL
(
clicked
(
bool
)),
this
,
SLOT
(
setAux1Inverted
(
bool
)));
...
...
@@ -227,8 +227,8 @@ QGCPX4VehicleConfig::QGCPX4VehicleConfig(QWidget *parent) :
connect
(
ui
->
yawButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
identifyYawChannel
()));
connect
(
ui
->
throttleButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
identifyThrottleChannel
()));
connect
(
ui
->
modeButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
identifyModeChannel
()));
connect
(
ui
->
assist
SwButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
identifyAssistChannel
()));
connect
(
ui
->
mission
SwButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
identifyMissionChannel
()));
connect
(
ui
->
posctl
SwButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
identifyAssistChannel
()));
connect
(
ui
->
loiter
SwButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
identifyMissionChannel
()));
connect
(
ui
->
returnSwButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
identifyReturnChannel
()));
connect
(
ui
->
flapsButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
identifyFlapsChannel
()));
connect
(
ui
->
aux1Button
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
identifyAux1Channel
()));
...
...
@@ -1409,10 +1409,10 @@ void QGCPX4VehicleConfig::remoteControlChannelRawChanged(int chan, float fval)
ui
->
modeSpinBox
->
setValue
(
chan
+
1
);
break
;
case
5
:
ui
->
assist
SwSpinBox
->
setValue
(
chan
+
1
);
ui
->
posctl
SwSpinBox
->
setValue
(
chan
+
1
);
break
;
case
6
:
ui
->
mission
SwSpinBox
->
setValue
(
chan
+
1
);
ui
->
loiter
SwSpinBox
->
setValue
(
chan
+
1
);
break
;
case
7
:
ui
->
returnSwSpinBox
->
setValue
(
chan
+
1
);
...
...
@@ -1565,10 +1565,10 @@ void QGCPX4VehicleConfig::updateAllInvertedCheckboxes()
//ui->radio5Widget->setName(tr("Mode Switch (#%1)").arg(rcMapping[4] + 1));
break
;
case
5
:
ui
->
assist
SwInvertCheckBox
->
setChecked
(
rcRev
[
rc_input_index
]);
ui
->
posctl
SwInvertCheckBox
->
setChecked
(
rcRev
[
rc_input_index
]);
break
;
case
6
:
ui
->
mission
SwInvertCheckBox
->
setChecked
(
rcRev
[
rc_input_index
]);
ui
->
loiter
SwInvertCheckBox
->
setChecked
(
rcRev
[
rc_input_index
]);
break
;
case
7
:
ui
->
returnSwInvertCheckBox
->
setChecked
(
rcRev
[
rc_input_index
]);
...
...
@@ -1692,13 +1692,13 @@ void QGCPX4VehicleConfig::handleRcParameterChange(QString parameterName, QVarian
}
else
if
(
parameterName
.
startsWith
(
"RC_MAP_POSCTL_SW"
))
{
setChannelToFunctionMapping
(
5
,
intValue
);
ui
->
assist
SwSpinBox
->
setValue
(
rcMapping
[
5
]
+
1
);
ui
->
assist
SwSpinBox
->
setEnabled
(
true
);
ui
->
posctl
SwSpinBox
->
setValue
(
rcMapping
[
5
]
+
1
);
ui
->
posctl
SwSpinBox
->
setEnabled
(
true
);
}
else
if
(
parameterName
.
startsWith
(
"RC_MAP_LOITER_SW"
))
{
setChannelToFunctionMapping
(
6
,
intValue
);
ui
->
mission
SwSpinBox
->
setValue
(
rcMapping
[
6
]
+
1
);
ui
->
mission
SwSpinBox
->
setEnabled
(
true
);
ui
->
loiter
SwSpinBox
->
setValue
(
rcMapping
[
6
]
+
1
);
ui
->
loiter
SwSpinBox
->
setEnabled
(
true
);
}
else
if
(
parameterName
.
startsWith
(
"RC_MAP_RETURN_SW"
))
{
setChannelToFunctionMapping
(
7
,
intValue
);
...
...
@@ -1941,17 +1941,17 @@ void QGCPX4VehicleConfig::updateRcChanLabels()
}
if
(
rcValue
[
rcMapping
[
5
]]
!=
UINT16_MAX
)
{
ui
->
assist
SwChanLabel
->
setText
(
labelForRcValue
(
rcAssist
));
ui
->
posctl
SwChanLabel
->
setText
(
labelForRcValue
(
rcAssist
));
}
else
{
ui
->
assist
SwChanLabel
->
setText
(
blankLabel
);
ui
->
posctl
SwChanLabel
->
setText
(
blankLabel
);
}
if
(
rcValue
[
rcMapping
[
6
]]
!=
UINT16_MAX
)
{
ui
->
mission
SwChanLabel
->
setText
(
labelForRcValue
(
rcLoiter
));
ui
->
loiter
SwChanLabel
->
setText
(
labelForRcValue
(
rcLoiter
));
}
else
{
ui
->
mission
SwChanLabel
->
setText
(
blankLabel
);
ui
->
loiter
SwChanLabel
->
setText
(
blankLabel
);
}
if
(
rcValue
[
rcMapping
[
7
]]
!=
UINT16_MAX
)
{
...
...
src/ui/QGCPX4VehicleConfig.ui
View file @
e1267cf4
This diff is collapsed.
Click to expand it.
src/ui/uas/UASControlWidget.cc
View file @
e1267cf4
...
...
@@ -80,10 +80,10 @@ void UASControlWidget::updateModesList()
px4_cm
.
main_mode
=
PX4_CUSTOM_MAIN_MODE_MANUAL
;
modes_list_px4
[
0
].
customMode
=
px4_cm
.
data
;
modes_list_px4
[
1
].
baseMode
=
MAV_MODE_FLAG_CUSTOM_MODE_ENABLED
|
MAV_MODE_FLAG_MANUAL_INPUT_ENABLED
|
MAV_MODE_FLAG_STABILIZE_ENABLED
;
px4_cm
.
main_mode
=
PX4_CUSTOM_MAIN_MODE_
SEATBELT
;
px4_cm
.
main_mode
=
PX4_CUSTOM_MAIN_MODE_
ALTCTL
;
modes_list_px4
[
1
].
customMode
=
px4_cm
.
data
;
modes_list_px4
[
2
].
baseMode
=
MAV_MODE_FLAG_CUSTOM_MODE_ENABLED
|
MAV_MODE_FLAG_MANUAL_INPUT_ENABLED
|
MAV_MODE_FLAG_STABILIZE_ENABLED
|
MAV_MODE_FLAG_GUIDED_ENABLED
;
px4_cm
.
main_mode
=
PX4_CUSTOM_MAIN_MODE_
EASY
;
px4_cm
.
main_mode
=
PX4_CUSTOM_MAIN_MODE_
POSCTL
;
modes_list_px4
[
2
].
customMode
=
px4_cm
.
data
;
modes_list_px4
[
3
].
baseMode
=
MAV_MODE_FLAG_CUSTOM_MODE_ENABLED
|
MAV_MODE_FLAG_AUTO_ENABLED
|
MAV_MODE_FLAG_STABILIZE_ENABLED
|
MAV_MODE_FLAG_GUIDED_ENABLED
;
px4_cm
.
main_mode
=
PX4_CUSTOM_MAIN_MODE_AUTO
;
...
...
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