-
Notifications
You must be signed in to change notification settings - Fork 105
Description
@vlasovskikh - Can the ESP32 be declared as officially supported now? There is now a huge ESP32 success sample space of at least 2 users :-)
I suggest that it be identified as a separate board/device type (ESP32) in the Frameworks menu as I suspect in the future there may be differences between the two that matter to the plugin (OTA/wireless support looks like it could be one of these areas from my early investigation).
In addition, I would like to suggest that the board/device type be passed as an optional parameter to the python scripts (possibly something like --devtype ESP8266 on the command line. We currently have ESP8266, Micro:bit and Pyboard). If not specified, it would default to None.
This would allow conditional execution of the couple of delay() statements in the scripts that are commented as being ESP8266 specific.
I also have a feeling that this may help in the area of Micro:bit support although I have not explored that yet. I plan on looking at the scripts in #40 today to see how/if they would fit into the existing scripting framework if you are not already doing so. I dug out my Micro:bit so I should be able to check things out pretty readily.
I would be happy to take care of the python side of the new option as part of the docopt update. It could be implemented initially with no 'behaviour' based on the option if you prefer. I am not comfortable enough with my weak, weak abilities to read kotlin to take care of the kotlin side of this so I would have to coordinate with you on the activity.
I know you are handling some of the board specifics in the kotlin code (i.e. defining vendor_id:port_id's to scan in order to detect serial ports) but it may be worth considering pushing all of this down to the python layer and creating an abstract devboard class in python that is then used to create concrete classes for the various board types. The class interface would be optimised for plugin operations such as uploading a file to the device, removing files, accessing the REPL, etc.
Just some thoughts for consideration, I recognise that I am much more comfortable in python so I could be trying to use my hammer in places it isn't wanted :-) Please feel free to tell me to butt out on this one.