New device management approach #351
Replies: 2 comments 4 replies
-
Follow actual list of serial ports Filtering devices by VID:PID Device detection |
Beta Was this translation helpful? Give feedback.
-
UI ideas you've expressed are all fine and doable. |
Beta Was this translation helpful? Give feedback.
-
In the last few days I've been considering how stubs and device type detection could be handled. Firstly, I would welcome moving the port selector drop down left of the connect/disconnect button in the MicroPython plugin window. This would make it easier to work with, as I often find myself having to go to the settings multiple times in a day, which can get annoying.
I understand that this could be difficult and that it has plenty of considerations, here are a few problems and their solutions I thought of:
Users changing the serial port when connected - upon successfully connecting it would be great to gray out the dropdown to not be clickable. From my experience working with the Jetbrains UI API perhaps this could be possible with some disable parameter/property.
Refreshing the serial port drop down - would it be possible to refresh the serial port listing each time the drop down is expanded?
Filtering out irrelevant serial devices - here I would look at how Thonny does it, I believe, using USB VID and PID. Thonny's port selector looks sort of like this: MicroPython (ESP32): Espressif Device @ /dev/cu.usbmodem101. Now this plugin could simplify it to ESP32: /dev/cu.usbmodem101. This would serve the purpose of making the selection clearer and it could also be used for handling stubs - although the best way here might be interrogating the device for specific device type and MicroPython version each time a connection is established.
There are two more considerations -> handling WebREPL and stubs when no device is connected:
For both of these problems I would go with an approach similar to how thonny does it. In Thonny you have the bottom right serial port drop down, which is the default quick access. Then its interpreter settings allow you to select a device manufacturer, specific communication type and then either the serial device or WebREPL credentials. The way this then propagates is that the main quick access serial device drop down is switched to displaying MicroPython (ESP32): ws://192.168... again this could be adapted like I suggested before.
This plugin's implementation could be expanded for choosing the MicroPython version as well, so that users have more control over specific stub settings should they need it.
Beta Was this translation helpful? Give feedback.
All reactions