-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add endpoint that follows mavlink2rest #29
Add endpoint that follows mavlink2rest #29
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got the idea, I made some considerations to improve it
DATA.messages | ||
.lock() | ||
.unwrap() | ||
.update(MAVLinkMessage { header, message }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.update(MAVLinkMessage { header, message }); | |
.update(Arc::new(MAVLinkMessage { header, message })); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the arc here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need it (referring to using Arc here). I was trying to make the clone cheaper if we couldn't avoid them, but we can almost completely avoid them, making the clone only when inserting, not when updating.
25f6b15
to
c5b865e
Compare
c5b865e
to
c7168ac
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some changes mainly to reduce the clones
DATA.messages | ||
.lock() | ||
.unwrap() | ||
.update(MAVLinkMessage { header, message }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need it (referring to using Arc here). I was trying to make the clone cheaper if we couldn't avoid them, but we can almost completely avoid them, making the clone only when inserting, not when updating.
ceb154f
to
e16cecd
Compare
Signed-off-by: Patrick José Pereira <[email protected]>
Create path for mavlink2rest Signed-off-by: Patrick José Pereira <[email protected]>
Signed-off-by: Patrick José Pereira <[email protected]>
e16cecd
to
196b8a9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perfect!
No description provided.