Closed IamPete1 closed 1 month ago
This is the internal server I mentioned.
Looks like your code is a client though, vs the existing is serverside
My use case was a browser connecting to MP as the data source
Yours is to push data to somewhere?
This one is for connecting to a socketio ws service as a client
My use case was a browser connecting to MP as the data source
Yours is to push data to somewhere?
Right, mission planner connects directly to the vehicle then it forwards onto a web based dashboard.
I assume you have something working? As I would have thought the dashboard makes the connection to the backend vs the backend connecting to the frontend
Ws://127.0.0.1:56781/websocket/server
Ws://127.0.0.1:56781/websocket/raw
Http://127.0.0.1:56781/hud.html
Example
https://yar.oborne.me/
I assume you have something working?
https://github.com/IamPete1/WebTools/tree/MAVLink_Dashboard
As with all the WebTools it is 100% client side, so the only option we have is WebSocket client (we could do direct COM ports too but I haven't implemented).
Turns out MissionPlanner already forwards on ws://127.0.0.1:56781
. So we don't need this PR. https://github.com/ArduPilot/WebTools/pull/196 adds auto connection.
This adds forwarding to WebSockets. I have only tested sending from MissionPlanner to the WebSocket not the other way (my application does not support send). So far I have been using pymavlink with https://github.com/ArduPilot/pymavlink/pull/967.
This very hacky currently. It doesn't work if you open the same connection more than once for example. I'm not cleaning up correctly I guess, but this is right on the edge of my c# knowledge.
This does add Fleck as a new dependency, it makes the server stuff easier. https://github.com/statianzo/Fleck
This is more or less a Fleck example and code copied from the existing client WebServer stuff.