Implemented targeted websocket messaging for playing different replays on different clients#127
Implemented targeted websocket messaging for playing different replays on different clients#127yourboykyle wants to merge 2 commits intomainfrom
Conversation
…s on different clients
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
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. |
|
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. |
It looks like a lot of stuff for a simple task, but here's a quick overview: