Skip to content
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

web: Add mavlink post endpoint #76

Merged
merged 1 commit into from
Nov 8, 2024

Conversation

patrickelectric
Copy link
Member

No description provided.

Comment on lines 86 to 108
pub async fn post_mavlink(State(state): State<AppState>, message: String) {
if let Err(error) = state.message_tx.send(message) {
error!("Failed to send message to main loop: {error:?}");
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we want to have a "sender ID" arg to identify who is sending this message?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added a debug message showing the client and message, if the idea was to use the stats API, it need some rework since multiple posts and multiple websockets will have different clients, and we can't create a stats for each one of them.

Signed-off-by: Patrick José Pereira <[email protected]>
@joaoantoniocardoso joaoantoniocardoso merged commit dcde1f9 into bluerobotics:master Nov 8, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants