Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Skyward Boardcore
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
Deploy
Releases
Model registry
Analyze
Model experiments
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
Skyward Boardcore
Commits
589233f4
Commit
589233f4
authored
3 years ago
by
Alberto Nidasio
Browse files
Options
Downloads
Patches
Plain Diff
[MavlinkDriver] Fixed timestamp value
parent
aaf74359
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/shared/radio/MavlinkDriver/MavlinkDriver.h
+6
-6
6 additions, 6 deletions
src/shared/radio/MavlinkDriver/MavlinkDriver.h
with
6 additions
and
6 deletions
src/shared/radio/MavlinkDriver/MavlinkDriver.h
+
6
−
6
View file @
589233f4
...
...
@@ -58,7 +58,7 @@ namespace Boardcore
* @tparam PktLength Maximum length in bytes of each transceiver packet.
* @tparam OutQueueSize Max number of transceiver packets in the output queue.
* @tparam MavMsgLength Max length of a mavlink message. By default is 255 the
* maximu
n
possible but can be replaces with MAVLINK_MAX_DIALECT_PAYLOAD_SIZE
* maximu
m
possible but can be replaces with MAVLINK_MAX_DIALECT_PAYLOAD_SIZE
* for a specific protocol.
*/
template
<
unsigned
int
PktLength
,
unsigned
int
OutQueueSize
,
...
...
@@ -105,7 +105,7 @@ public:
/**
* @brief Enqueue a raw packet message into the sync packet queue.
*
* @param msg Messa to send.
* @param msg Messa
ge
to send.
* @param size Length in bytes.
* @return True if the message was enqueued.
*/
...
...
@@ -257,11 +257,11 @@ bool MavlinkDriver<PktLength, OutQueueSize, MavMsgLength>::enqueueMsg(
const
mavlink_message_t
&
msg
)
{
// Convert mavlink message to a byte array
uint8_t
msg
t
empBuf
[
MAVLINK_NUM_NON_PAYLOAD_BYTES
+
MavMsgLength
];
int
msgLen
=
mavlink_msg_to_send_buffer
(
msg
t
empBuf
,
&
msg
);
uint8_t
msg
T
empBuf
[
MAVLINK_NUM_NON_PAYLOAD_BYTES
+
MavMsgLength
];
int
msgLen
=
mavlink_msg_to_send_buffer
(
msg
T
empBuf
,
&
msg
);
// Append message to the queue
bool
appended
=
outQueue
.
put
(
msg
t
empBuf
,
msgLen
);
bool
appended
=
outQueue
.
put
(
msg
T
empBuf
,
msgLen
);
// Update stats
updateQueueStats
(
appended
);
...
...
@@ -418,7 +418,7 @@ template <unsigned int PktLength, unsigned int OutQueueSize,
MavlinkStatus
MavlinkDriver
<
PktLength
,
OutQueueSize
,
MavMsgLength
>::
getStatus
()
{
miosix
::
Lock
<
miosix
::
FastMutex
>
l
(
mtxStatus
);
status
.
timestamp
=
miosix
::
getTick
();
status
.
timestamp
=
TimestampTimer
::
getTimestamp
();
return
status
;
}
...
...
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