Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
On-Board Software
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Avionics
Software Development
On-Board Software
Commits
c39988a3
Commit
c39988a3
authored
1 year ago
by
Federico Lolli
Browse files
Options
Downloads
Patches
Plain Diff
[ARP] add mavlink logger id message interaction
parent
a2fbcd17
No related branches found
No related tags found
No related merge requests found
Pipeline
#8649
failed
1 year ago
Stage: build-release
Stage: build-debug
Stage: lint
Changes
1
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/boards/Groundstation/Automated/Hub.cpp
+47
-0
47 additions, 0 deletions
src/boards/Groundstation/Automated/Hub.cpp
with
47 additions
and
0 deletions
src/boards/Groundstation/Automated/Hub.cpp
+
47
−
0
View file @
c39988a3
...
...
@@ -159,6 +159,53 @@ void Hub::dispatchOutgoingMsg(const mavlink_message_t& msg)
sendAck
(
msg
);
break
;
}
case
MAVLINK_MSG_ID_SYSTEM_TM_REQUEST_TC
:
{
mavlink_message_t
msg_response
;
SystemTMList
tmId
=
static_cast
<
SystemTMList
>
(
mavlink_msg_system_tm_request_tc_get_tm_id
(
&
msg
));
// If it is handled create the msg_response, otherwise return
// NACK
switch
(
tmId
)
{
case
SystemTMList
::
MAV_LOGGER_ID
:
{
mavlink_logger_tm_t
tm
;
LoggerStats
stats
=
Logger
::
getInstance
().
getStats
();
tm
.
timestamp
=
TimestampTimer
::
getTimestamp
();
tm
.
log_number
=
stats
.
logNumber
;
tm
.
too_large_samples
=
stats
.
tooLargeSamples
;
tm
.
dropped_samples
=
stats
.
droppedSamples
;
tm
.
queued_samples
=
stats
.
queuedSamples
;
tm
.
buffers_filled
=
stats
.
buffersFilled
;
tm
.
buffers_written
=
stats
.
buffersWritten
;
tm
.
writes_failed
=
stats
.
writesFailed
;
tm
.
last_write_error
=
stats
.
lastWriteError
;
tm
.
average_write_time
=
stats
.
averageWriteTime
;
tm
.
max_write_time
=
stats
.
maxWriteTime
;
mavlink_msg_logger_tm_encode
(
SysIDs
::
MAV_SYSID_ARP
,
Groundstation
::
GS_COMPONENT_ID
,
&
msg_response
,
&
tm
);
break
;
}
default
:
{
sendNack
(
msg
);
return
;
}
}
// Dispatching the created response message and then returning
// the ACK
dispatchIncomingMsg
(
msg_response
);
sendAck
(
msg
);
return
;
}
}
send_ok
|=
radio
->
sendMsg
(
msg
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment