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
bf51f87f
Commit
bf51f87f
authored
Aug 22, 2015
by
Lorenz Meier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add UAS changes for CAN config
parent
69d38e40
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
66 additions
and
1 deletion
+66
-1
UAS.cc
src/uas/UAS.cc
+51
-0
UAS.h
src/uas/UAS.h
+3
-0
UASInterface.h
src/uas/UASInterface.h
+12
-1
No files found.
src/uas/UAS.cc
View file @
bf51f87f
...
...
@@ -1515,6 +1515,9 @@ void UAS::startCalibration(UASInterface::StartCalibrationType calType)
case
StartCalibrationEsc
:
escCal
=
1
;
break
;
case
StartCalibrationUavcanEsc
:
escCal
=
2
;
break
;
}
mavlink_message_t
msg
;
...
...
@@ -1555,6 +1558,54 @@ void UAS::stopCalibration(void)
sendMessage
(
msg
);
}
void
UAS
::
startBusConfig
(
UASInterface
::
StartBusConfigType
calType
)
{
int
actuatorCal
=
0
;
switch
(
calType
)
{
case
StartBusConfigActuators
:
actuatorCal
=
1
;
break
;
}
mavlink_message_t
msg
;
mavlink_msg_command_long_pack
(
mavlink
->
getSystemId
(),
mavlink
->
getComponentId
(),
&
msg
,
uasId
,
0
,
// target component
MAV_CMD_PREFLIGHT_UAVCAN
,
// command id
0
,
// 0=first transmission of command
actuatorCal
,
// actuators
0
,
0
,
0
,
0
,
0
,
0
);
sendMessage
(
msg
);
}
void
UAS
::
stopBusConfig
(
void
)
{
mavlink_message_t
msg
;
mavlink_msg_command_long_pack
(
mavlink
->
getSystemId
(),
mavlink
->
getComponentId
(),
&
msg
,
uasId
,
0
,
// target component
MAV_CMD_PREFLIGHT_UAVCAN
,
// command id
0
,
// 0=first transmission of command
0
,
0
,
0
,
0
,
0
,
0
,
0
);
sendMessage
(
msg
);
}
void
UAS
::
startDataRecording
()
{
mavlink_message_t
msg
;
...
...
src/uas/UAS.h
View file @
bf51f87f
...
...
@@ -916,6 +916,9 @@ public slots:
void
startCalibration
(
StartCalibrationType
calType
);
void
stopCalibration
(
void
);
void
startBusConfig
(
StartBusConfigType
calType
);
void
stopBusConfig
(
void
);
void
startDataRecording
();
void
stopDataRecording
();
void
deleteSettings
();
...
...
src/uas/UASInterface.h
View file @
bf51f87f
...
...
@@ -249,7 +249,12 @@ public:
StartCalibrationAccel
,
StartCalibrationLevel
,
StartCalibrationEsc
,
StartCalibrationCopyTrims
StartCalibrationCopyTrims
,
StartCalibrationUavcanEsc
};
enum
StartBusConfigType
{
StartBusConfigActuators
};
/// Starts the specified calibration
...
...
@@ -258,6 +263,12 @@ public:
/// Ends any current calibration
virtual
void
stopCalibration
(
void
)
=
0
;
/// Starts the specified bus configuration
virtual
void
startBusConfig
(
StartBusConfigType
calType
)
=
0
;
/// Ends any current bus configuration
virtual
void
stopBusConfig
(
void
)
=
0
;
public
slots
:
/** @brief Set a new name for the system */
...
...
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