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

wip mavlink2rest support #215

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Williangalvani
Copy link

@Williangalvani Williangalvani commented Nov 10, 2024

I need to get this stuff out onto a separate file, but I'm opening the pr so I don't forget about it.
I already works as is. With BlueOS, I use ws://192.168.2.2/mavlink2rest/ws/mavlink for connecting.
This just maps the msg object format from mavlink2rest`s to the one outputted by the js parser.

@@ -115,6 +271,17 @@ function setup_connect(button_svg, button_color) {
}

ws.onmessage = (msg) => {
if (msg.data[0] == "{") {
Copy link
Member

Choose a reason for hiding this comment

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

I think you should just be able to check if its a string. Presuming that the json data is sent as a text message and that raw is sent with the binary message.

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