ardrone-webflight
ardrone-webflight copied to clipboard
Replay navdata conflict
If you use the replay plugin and you're also connected to a real drone, you'll end up with two conflicting sources of navdata events running in parallel:
https://github.com/eschnou/ardrone-webflight/blob/776f845919af2f424fd8bcca3c184715819efc0c/plugins/replay/index.js#L45
https://github.com/eschnou/ardrone-webflight/blob/8f81e55967a8797847cf61e18801603ee1a3146b/app.js#L110
The observed effect of this is the HUD and any other user interface (or autonomous navigation) based on navdata will jump between two vehicle states.
Indeed, in my current use case I only use replay when not connected to a drone, for testing purposes. Do you have a use case where you'd like to use replay combined to a real drone? Which data would you like to see preserved then?
I don't have a use case for it, other than that having to disconnect from the drone before using replay is another step.
Ok, if we can safely ignore the 'real' client when in replay mode, then forcing a pause() or end() on the client should do the trick. I'll have a look at it.