leaphy-robotics / leaphy-webbased-svelte

Leaphy Easybloqs is software to program Leaphy Robots and Arduino microcontrollers using a block-based programming language.
https://leaphyeasybloqs.com
1 stars 2 forks source link

[bug] connecting to a robot twice results in a non-ready state #119

Closed sverben closed 1 month ago

sverben commented 3 months ago

When selecting the connect button in the header twice for the same robot without disconnecting, this will result in a non-ready state due to the port's streams already being locked

It would be nice to check for the following 2 scenarios

  1. The cause of the failed connect is that the same robot is already connected
    • We should probably immediately throw a ready state or trigger a reconnect by reserving the old port
  2. The cause of the failed connect is that another program is already using it
    • Instead of simply throwing a non-ready state and keeping the user guessing as to what went wrong we may want to show a popup to indicate the reason for the failed action