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
f0d99039
Commit
f0d99039
authored
Oct 22, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2083 from DonLakeFlyer/FlightMode
Fix channel index reordering notification
parents
ddef8c71
2740e635
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
22 deletions
+21
-22
FlightModesComponentController.cc
src/AutoPilotPlugins/PX4/FlightModesComponentController.cc
+10
-2
FlightModesComponentController.h
src/AutoPilotPlugins/PX4/FlightModesComponentController.h
+11
-20
No files found.
src/AutoPilotPlugins/PX4/FlightModesComponentController.cc
View file @
f0d99039
...
@@ -656,6 +656,8 @@ void FlightModesComponentController::setManualModeChannelIndex(int index)
...
@@ -656,6 +656,8 @@ void FlightModesComponentController::setManualModeChannelIndex(int index)
_recalcModeSelections
();
_recalcModeSelections
();
_recalcModeRows
();
_recalcModeRows
();
emit
channelIndicesChanged
();
}
}
void
FlightModesComponentController
::
setAcroModeChannelIndex
(
int
index
)
void
FlightModesComponentController
::
setAcroModeChannelIndex
(
int
index
)
...
@@ -680,11 +682,12 @@ void FlightModesComponentController::setPosCtlModeChannelIndex(int index)
...
@@ -680,11 +682,12 @@ void FlightModesComponentController::setPosCtlModeChannelIndex(int index)
_assistModeVisible
=
channel
!=
getParameterFact
(
-
1
,
"RC_MAP_MODE_SW"
)
->
value
().
toInt
();
_assistModeVisible
=
channel
!=
getParameterFact
(
-
1
,
"RC_MAP_MODE_SW"
)
->
value
().
toInt
();
}
}
emit
altCtlModeChannelIndexChanged
(
index
);
emit
modesVisibleChanged
();
emit
modesVisibleChanged
();
_recalcModeSelections
();
_recalcModeSelections
();
_recalcModeRows
();
_recalcModeRows
();
emit
channelIndicesChanged
();
}
}
void
FlightModesComponentController
::
setLoiterModeChannelIndex
(
int
index
)
void
FlightModesComponentController
::
setLoiterModeChannelIndex
(
int
index
)
...
@@ -701,11 +704,12 @@ void FlightModesComponentController::setLoiterModeChannelIndex(int index)
...
@@ -701,11 +704,12 @@ void FlightModesComponentController::setLoiterModeChannelIndex(int index)
_autoModeVisible
=
channel
!=
getParameterFact
(
-
1
,
"RC_MAP_MODE_SW"
)
->
value
().
toInt
();
_autoModeVisible
=
channel
!=
getParameterFact
(
-
1
,
"RC_MAP_MODE_SW"
)
->
value
().
toInt
();
}
}
emit
missionModeChannelIndexChanged
(
index
);
emit
modesVisibleChanged
();
emit
modesVisibleChanged
();
_recalcModeSelections
();
_recalcModeSelections
();
_recalcModeRows
();
_recalcModeRows
();
emit
channelIndicesChanged
();
}
}
void
FlightModesComponentController
::
setReturnModeChannelIndex
(
int
index
)
void
FlightModesComponentController
::
setReturnModeChannelIndex
(
int
index
)
...
@@ -713,6 +717,8 @@ void FlightModesComponentController::setReturnModeChannelIndex(int index)
...
@@ -713,6 +717,8 @@ void FlightModesComponentController::setReturnModeChannelIndex(int index)
getParameterFact
(
-
1
,
"RC_MAP_RETURN_SW"
)
->
setValue
(
_channelIndexToChannel
(
index
));
getParameterFact
(
-
1
,
"RC_MAP_RETURN_SW"
)
->
setValue
(
_channelIndexToChannel
(
index
));
_recalcModeSelections
();
_recalcModeSelections
();
_recalcModeRows
();
_recalcModeRows
();
emit
channelIndicesChanged
();
}
}
void
FlightModesComponentController
::
setOffboardModeChannelIndex
(
int
index
)
void
FlightModesComponentController
::
setOffboardModeChannelIndex
(
int
index
)
...
@@ -720,6 +726,8 @@ void FlightModesComponentController::setOffboardModeChannelIndex(int index)
...
@@ -720,6 +726,8 @@ void FlightModesComponentController::setOffboardModeChannelIndex(int index)
getParameterFact
(
-
1
,
"RC_MAP_OFFB_SW"
)
->
setValue
(
_channelIndexToChannel
(
index
));
getParameterFact
(
-
1
,
"RC_MAP_OFFB_SW"
)
->
setValue
(
_channelIndexToChannel
(
index
));
_recalcModeSelections
();
_recalcModeSelections
();
_recalcModeRows
();
_recalcModeRows
();
emit
channelIndicesChanged
();
}
}
void
FlightModesComponentController
::
generateThresholds
(
void
)
void
FlightModesComponentController
::
generateThresholds
(
void
)
...
...
src/AutoPilotPlugins/PX4/FlightModesComponentController.h
View file @
f0d99039
...
@@ -63,16 +63,16 @@ public:
...
@@ -63,16 +63,16 @@ public:
Q_PROPERTY
(
int
returnModeRow
MEMBER
_returnModeRow
NOTIFY
modeRowsChanged
)
Q_PROPERTY
(
int
returnModeRow
MEMBER
_returnModeRow
NOTIFY
modeRowsChanged
)
Q_PROPERTY
(
int
offboardModeRow
MEMBER
_offboardModeRow
NOTIFY
modeRowsChanged
)
Q_PROPERTY
(
int
offboardModeRow
MEMBER
_offboardModeRow
NOTIFY
modeRowsChanged
)
Q_PROPERTY
(
int
manualModeChannelIndex
READ
manualModeChannelIndex
WRITE
setManualModeChannelIndex
NOTIFY
manualModeChannelIndex
Changed
)
Q_PROPERTY
(
int
manualModeChannelIndex
READ
manualModeChannelIndex
WRITE
setManualModeChannelIndex
NOTIFY
channelIndices
Changed
)
Q_PROPERTY
(
int
assistModeChannelIndex
READ
assistModeChannelIndex
NOTIFY
assistModeChannelIndex
Changed
)
Q_PROPERTY
(
int
assistModeChannelIndex
READ
assistModeChannelIndex
NOTIFY
channelIndices
Changed
)
Q_PROPERTY
(
int
autoModeChannelIndex
READ
autoModeChannelIndex
NOTIFY
autoModeChannelIndex
Changed
)
Q_PROPERTY
(
int
autoModeChannelIndex
READ
autoModeChannelIndex
NOTIFY
channelIndices
Changed
)
Q_PROPERTY
(
int
acroModeChannelIndex
READ
acroModeChannelIndex
WRITE
setAcroModeChannelIndex
NOTIFY
acroModeChannelIndex
Changed
)
Q_PROPERTY
(
int
acroModeChannelIndex
READ
acroModeChannelIndex
WRITE
setAcroModeChannelIndex
NOTIFY
channelIndices
Changed
)
Q_PROPERTY
(
int
altCtlModeChannelIndex
READ
altCtlModeChannelIndex
NOTIFY
altCtlModeChannelIndex
Changed
)
Q_PROPERTY
(
int
altCtlModeChannelIndex
READ
altCtlModeChannelIndex
NOTIFY
channelIndices
Changed
)
Q_PROPERTY
(
int
posCtlModeChannelIndex
READ
posCtlModeChannelIndex
WRITE
setPosCtlModeChannelIndex
NOTIFY
posCtlModeChannelIndex
Changed
)
Q_PROPERTY
(
int
posCtlModeChannelIndex
READ
posCtlModeChannelIndex
WRITE
setPosCtlModeChannelIndex
NOTIFY
channelIndices
Changed
)
Q_PROPERTY
(
int
loiterModeChannelIndex
READ
loiterModeChannelIndex
WRITE
setLoiterModeChannelIndex
NOTIFY
loiterModeChannelIndex
Changed
)
Q_PROPERTY
(
int
loiterModeChannelIndex
READ
loiterModeChannelIndex
WRITE
setLoiterModeChannelIndex
NOTIFY
channelIndices
Changed
)
Q_PROPERTY
(
int
missionModeChannelIndex
READ
missionModeChannelIndex
NOTIFY
missionModeChannelIndex
Changed
)
Q_PROPERTY
(
int
missionModeChannelIndex
READ
missionModeChannelIndex
NOTIFY
channelIndices
Changed
)
Q_PROPERTY
(
int
returnModeChannelIndex
READ
returnModeChannelIndex
WRITE
setReturnModeChannelIndex
NOTIFY
returnModeChannelIndex
Changed
)
Q_PROPERTY
(
int
returnModeChannelIndex
READ
returnModeChannelIndex
WRITE
setReturnModeChannelIndex
NOTIFY
channelIndices
Changed
)
Q_PROPERTY
(
int
offboardModeChannelIndex
READ
offboardModeChannelIndex
WRITE
setOffboardModeChannelIndex
NOTIFY
offboardModeChannelIndex
Changed
)
Q_PROPERTY
(
int
offboardModeChannelIndex
READ
offboardModeChannelIndex
WRITE
setOffboardModeChannelIndex
NOTIFY
channelIndices
Changed
)
Q_PROPERTY
(
double
manualModeRcValue
READ
manualModeRcValue
NOTIFY
switchLiveRangeChanged
)
Q_PROPERTY
(
double
manualModeRcValue
READ
manualModeRcValue
NOTIFY
switchLiveRangeChanged
)
Q_PROPERTY
(
double
assistModeRcValue
READ
assistModeRcValue
NOTIFY
switchLiveRangeChanged
)
Q_PROPERTY
(
double
assistModeRcValue
READ
assistModeRcValue
NOTIFY
switchLiveRangeChanged
)
...
@@ -179,16 +179,7 @@ signals:
...
@@ -179,16 +179,7 @@ signals:
void
thresholdsChanged
(
void
);
void
thresholdsChanged
(
void
);
void
modesSelectedChanged
(
void
);
void
modesSelectedChanged
(
void
);
void
modesVisibleChanged
(
void
);
void
modesVisibleChanged
(
void
);
void
manualModeChannelIndexChanged
(
int
index
);
void
channelIndicesChanged
(
void
);
void
assistModeChannelIndexChanged
(
int
index
);
void
autoModeChannelIndexChanged
(
int
index
);
void
acroModeChannelIndexChanged
(
int
index
);
void
altCtlModeChannelIndexChanged
(
int
index
);
void
posCtlModeChannelIndexChanged
(
int
index
);
void
loiterModeChannelIndexChanged
(
int
index
);
void
missionModeChannelIndexChanged
(
int
index
);
void
returnModeChannelIndexChanged
(
int
index
);
void
offboardModeChannelIndexChanged
(
int
index
);
void
modeRowsChanged
(
void
);
void
modeRowsChanged
(
void
);
private
slots
:
private
slots
:
...
...
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