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
093f0830
Commit
093f0830
authored
Jan 03, 2019
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parent
86ead133
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
2 additions
and
65 deletions
+2
-65
APMFirmwarePlugin.cc
src/FirmwarePlugin/APM/APMFirmwarePlugin.cc
+0
-7
APMFirmwarePlugin.h
src/FirmwarePlugin/APM/APMFirmwarePlugin.h
+0
-1
ArduSubFirmwarePlugin.cc
src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.cc
+0
-5
ArduSubFirmwarePlugin.h
src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.h
+0
-3
FirmwarePlugin.cc
src/FirmwarePlugin/FirmwarePlugin.cc
+0
-7
FirmwarePlugin.h
src/FirmwarePlugin/FirmwarePlugin.h
+0
-8
PX4FirmwarePlugin.cc
src/FirmwarePlugin/PX4/PX4FirmwarePlugin.cc
+0
-5
PX4FirmwarePlugin.h
src/FirmwarePlugin/PX4/PX4FirmwarePlugin.h
+0
-1
Joystick.cc
src/Joystick/Joystick.cc
+1
-7
Vehicle.cc
src/Vehicle/Vehicle.cc
+0
-5
Vehicle.h
src/Vehicle/Vehicle.h
+0
-8
JoystickConfig.qml
src/VehicleSetup/JoystickConfig.qml
+1
-8
No files found.
src/FirmwarePlugin/APM/APMFirmwarePlugin.cc
View file @
093f0830
...
...
@@ -228,13 +228,6 @@ bool APMFirmwarePlugin::setFlightMode(const QString& flightMode, uint8_t* base_m
return
found
;
}
int
APMFirmwarePlugin
::
manualControlReservedButtonCount
(
void
)
{
// We don't know whether the firmware is going to used any of these buttons.
// So reserve them all.
return
-
1
;
}
void
APMFirmwarePlugin
::
_handleIncomingParamValue
(
Vehicle
*
vehicle
,
mavlink_message_t
*
message
)
{
Q_UNUSED
(
vehicle
);
...
...
src/FirmwarePlugin/APM/APMFirmwarePlugin.h
View file @
093f0830
...
...
@@ -90,7 +90,6 @@ public:
void
pauseVehicle
(
Vehicle
*
vehicle
)
override
;
void
guidedModeRTL
(
Vehicle
*
vehicle
)
override
;
void
guidedModeChangeAltitude
(
Vehicle
*
vehicle
,
double
altitudeChange
)
override
;
int
manualControlReservedButtonCount
(
void
)
override
;
bool
adjustIncomingMavlinkMessage
(
Vehicle
*
vehicle
,
mavlink_message_t
*
message
)
override
;
void
adjustOutgoingMavlinkMessage
(
Vehicle
*
vehicle
,
LinkInterface
*
outgoingLink
,
mavlink_message_t
*
message
)
override
;
virtual
void
initializeStreamRates
(
Vehicle
*
vehicle
);
...
...
src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.cc
View file @
093f0830
...
...
@@ -164,11 +164,6 @@ int ArduSubFirmwarePlugin::remapParamNameHigestMinorVersionNumber(int majorVersi
return
majorVersionNumber
==
3
?
6
:
Vehicle
::
versionNotSetValue
;
}
int
ArduSubFirmwarePlugin
::
manualControlReservedButtonCount
(
void
)
{
return
0
;
}
void
ArduSubFirmwarePlugin
::
initializeStreamRates
(
Vehicle
*
vehicle
)
{
vehicle
->
requestDataStream
(
MAV_DATA_STREAM_RAW_SENSORS
,
2
);
vehicle
->
requestDataStream
(
MAV_DATA_STREAM_EXTENDED_STATUS
,
2
);
...
...
src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.h
View file @
093f0830
...
...
@@ -110,9 +110,6 @@ public:
QList
<
MAV_CMD
>
supportedMissionCommands
(
void
)
final
;
// Overrides from FirmwarePlugin
int
manualControlReservedButtonCount
(
void
)
final
;
int
defaultJoystickTXMode
(
void
)
final
{
return
3
;
}
void
initializeStreamRates
(
Vehicle
*
vehicle
)
override
final
;
...
...
src/FirmwarePlugin/FirmwarePlugin.cc
View file @
093f0830
...
...
@@ -115,13 +115,6 @@ bool FirmwarePlugin::setFlightMode(const QString& flightMode, uint8_t* base_mode
return
false
;
}
int
FirmwarePlugin
::
manualControlReservedButtonCount
(
void
)
{
// We don't know whether the firmware is going to used any of these buttons.
// So reserve them all.
return
-
1
;
}
int
FirmwarePlugin
::
defaultJoystickTXMode
(
void
)
{
return
2
;
...
...
src/FirmwarePlugin/FirmwarePlugin.h
View file @
093f0830
...
...
@@ -146,14 +146,6 @@ public:
/// @param altitudeChange If > 0, go up by amount specified, if < 0, go down by amount specified
virtual
void
guidedModeChangeAltitude
(
Vehicle
*
vehicle
,
double
altitudeChange
);
/// FIXME: This isn't quite correct being here. All code for Joystick suvehicleTypepport is currently firmware specific
/// not just this. I'm going to try to change that. If not, this will need to be removed.
/// Returns the number of buttons which are reserved for firmware use in the MANUAL_CONTROL mavlink
/// message. For example PX4 Flight Stack reserves the first 8 buttons to simulate rc switches.
/// The remainder can be assigned to Vehicle actions.
/// @return -1: reserver all buttons, >0 number of buttons to reserve
virtual
int
manualControlReservedButtonCount
(
void
);
/// Default tx mode to apply to joystick axes
/// TX modes are as outlined here: http://www.rc-airplane-world.com/rc-transmitter-modes.html
virtual
int
defaultJoystickTXMode
(
void
);
...
...
src/FirmwarePlugin/PX4/PX4FirmwarePlugin.cc
View file @
093f0830
...
...
@@ -225,11 +225,6 @@ bool PX4FirmwarePlugin::setFlightMode(const QString& flightMode, uint8_t* base_m
return
found
;
}
int
PX4FirmwarePlugin
::
manualControlReservedButtonCount
(
void
)
{
return
0
;
// 0 buttons reserved for rc switch simulation
}
bool
PX4FirmwarePlugin
::
isCapable
(
const
Vehicle
*
vehicle
,
FirmwareCapabilities
capabilities
)
{
int
available
=
SetFlightModeCapability
|
PauseVehicleCapability
|
GuidedModeCapability
;
...
...
src/FirmwarePlugin/PX4/PX4FirmwarePlugin.h
View file @
093f0830
...
...
@@ -52,7 +52,6 @@ public:
double
minimumTakeoffAltitude
(
Vehicle
*
vehicle
)
override
;
void
startMission
(
Vehicle
*
vehicle
)
override
;
bool
isGuidedMode
(
const
Vehicle
*
vehicle
)
const
override
;
int
manualControlReservedButtonCount
(
void
)
override
;
void
initializeVehicle
(
Vehicle
*
vehicle
)
override
;
bool
sendHomePositionToVehicle
(
void
)
override
;
void
addMetaDataToFact
(
QObject
*
parameterMetaData
,
Fact
*
fact
,
MAV_TYPE
vehicleType
)
override
;
...
...
src/Joystick/Joystick.cc
View file @
093f0830
...
...
@@ -506,12 +506,6 @@ void Joystick::run(void)
// Set up button pressed information
// We only send the buttons the firmwware has reserved
int
reservedButtonCount
=
_activeVehicle
->
manualControlReservedButtonCount
();
if
(
reservedButtonCount
==
-
1
)
{
reservedButtonCount
=
_totalButtonCount
;
}
quint16
newButtonBits
=
0
;
// New set of button which are down
quint16
buttonPressedBits
=
0
;
// Buttons pressed for manualControl signal
...
...
@@ -526,7 +520,7 @@ void Joystick::run(void)
// Button was up last time through, but is now down which indicates a button press
qCDebug
(
JoystickLog
)
<<
"button triggered"
<<
buttonIndex
;
if
(
buttonIndex
>=
reserved
ButtonCount
)
{
if
(
buttonIndex
>=
_total
ButtonCount
)
{
// Button is above firmware reserved set
QString
buttonAction
=
_rgButtonActions
[
buttonIndex
];
if
(
!
buttonAction
.
isEmpty
())
{
...
...
src/Vehicle/Vehicle.cc
View file @
093f0830
...
...
@@ -2214,11 +2214,6 @@ void Vehicle::resetMessages()
}
}
int
Vehicle
::
manualControlReservedButtonCount
(
void
)
{
return
_firmwarePlugin
->
manualControlReservedButtonCount
();
}
void
Vehicle
::
_loadSettings
(
void
)
{
if
(
!
_active
)
{
...
...
src/Vehicle/Vehicle.h
View file @
093f0830
...
...
@@ -691,12 +691,6 @@ public:
/// Resets link status counters
Q_INVOKABLE
void
resetCounters
();
/// Returns the number of buttons which are reserved for firmware use in the MANUAL_CONTROL mavlink
/// message. For example PX4 Flight Stack reserves the first 8 buttons to simulate rc switches.
/// The remainder can be assigned to Vehicle actions.
/// @return -1: reserver all buttons, >0 number of buttons to reserve
Q_PROPERTY
(
int
manualControlReservedButtonCount
READ
manualControlReservedButtonCount
CONSTANT
)
// Called when the message drop-down is invoked to clear current count
Q_INVOKABLE
void
resetMessages
();
...
...
@@ -821,8 +815,6 @@ public:
/// Provides access to the Firmware Plugin for this Vehicle
FirmwarePlugin
*
firmwarePlugin
(
void
)
{
return
_firmwarePlugin
;
}
int
manualControlReservedButtonCount
(
void
);
MissionManager
*
missionManager
(
void
)
{
return
_missionManager
;
}
GeoFenceManager
*
geoFenceManager
(
void
)
{
return
_geoFenceManager
;
}
RallyPointManager
*
rallyPointManager
(
void
)
{
return
_rallyPointManager
;
}
...
...
src/VehicleSetup/JoystickConfig.qml
View file @
093f0830
...
...
@@ -620,20 +620,13 @@ SetupPage {
width
:
parent
.
width
spacing
:
ScreenTools
.
defaultFontPixelHeight
/
3
QGCLabel
{
visible
:
_activeVehicle
.
manualControlReservedButtonCount
!=
0
text
:
qsTr
(
"
Buttons 0-%1 reserved for firmware use
"
).
arg
(
reservedButtonCount
)
property
int
reservedButtonCount
:
_activeVehicle
.
manualControlReservedButtonCount
==
-
1
?
_activeJoystick
.
totalButtonCount
:
_activeVehicle
.
manualControlReservedButtonCount
}
Repeater
{
id
:
buttonActionRepeater
model
:
_activeJoystick
?
Math
.
min
(
_activeJoystick
.
totalButtonCount
,
_maxButtons
)
:
0
Row
{
spacing
:
ScreenTools
.
defaultFontPixelWidth
visible
:
(
_activeVehicle
.
manualControlReservedButtonCount
==
-
1
?
false
:
modelData
>=
_activeVehicle
.
manualControlReservedButtonCount
)
&&
!
_activeVehicle
.
supportsJSButton
visible
:
!
_activeVehicle
.
supportsJSButton
property
bool
pressed
...
...
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