Skip to content

Conversation

@yourboykyle
Copy link
Contributor

It looks like a lot of stuff for a simple task, but here's a quick overview:

  • Changed the packets to now have an optional "client ID" (if there is one, only send the packet to that client, otherwise broadcast to everyone)
  • client IDs are generated using UUID4, a very very well known and used random ID generator
  • Change telemetry to have different replay instances for each client
  • Makes sure to remove all previous replay packets for that client when a client stops the replay, or disconnects mid replay

@yourboykyle yourboykyle requested a review from bskdany November 24, 2025 05:34
Copy link
Contributor

@bskdany bskdany left a comment

Choose a reason for hiding this comment

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

If I close the window mid replay I get double replay stop

INFO:ground_station.websocket.websocket:Received message: telemetry replay stop
INFO:ground_station.telemetry.telemetry:REPLAY STOP for client 9b753021-02e0-48e6-871c-6bae954ddedc
INFO:ground_station.websocket.websocket:Client disconnected: 9b753021-02e0-48e6-871c-6bae954ddedc
INFO:ground_station.telemetry.telemetry:REPLAY STOP for client 9b753021-02e0-48e6-871c-6bae954ddedc

Copy link
Contributor

@bskdany bskdany left a comment

Choose a reason for hiding this comment

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

I added this change to change the websocket ip based on whether we're admin or not. When running 2 replays from 2 devices in parallel the replay appears slower? Can you check

@yourboykyle
Copy link
Contributor Author

If I close the window mid replay I get double replay stop

INFO:ground_station.websocket.websocket:Received message: telemetry replay stop
INFO:ground_station.telemetry.telemetry:REPLAY STOP for client 9b753021-02e0-48e6-871c-6bae954ddedc
INFO:ground_station.websocket.websocket:Client disconnected: 9b753021-02e0-48e6-871c-6bae954ddedc
INFO:ground_station.telemetry.telemetry:REPLAY STOP for client 9b753021-02e0-48e6-871c-6bae954ddedc

It does a stop when you disconnect just in case you left it running, but I should change it so it checks if the replay is actually playing before making sure you stopped it.

@bskdany
Copy link
Contributor

bskdany commented Nov 25, 2025

Big change of plan, the current ground station is bonkers, we can get like 2k lines off if we rewrite it properly.

The biggest change is to use async instead of spawning processes.

Check the main_v2 files and ground_station_v2 dir, I scaffolded some stuff.

There is a replay class and 2 get methods for starting and stopping recording. The replay class has an async generator. Slam them together somehow so that it transmits over websocket.

You would need postman or some other request testing app to verify stuff working.

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.

3 participants