programs can be loaded from external py files#8
programs can be loaded from external py files#8dr3y wants to merge 2 commits intoHarrisonSteel:masterfrom
Conversation
more multiplexer messages because we are getting multiplexer issues
|
Look like very interesting and useful changes. It's a much more rigorous/modular approach to custom programs than what is there currently. What was your motivation for the usecomms flag? Do you have use-cases where you want the UI to run but without any interaction with the devices? I can't see that this will break it, but may add extra complexity for 98% of users if they are not going to be trying to operate without the appropriate communication toolboxes installed. The most recent software install version I have on the Chi.Bio site actually flashes the whole linux distro (including all required packages), so it would ensure that the I2C/GPIO packages are always installed... |
|
Thanks! |
|
Hi! Are there any plans to merge this PR? Best |
|
To be honest, I had not had time to go through it line by line to see whether it might cause any issues with the broader OS. Is it something that would be useful to you? If there are multiple users who would benefit from it then (at first glance) I don't see why not merge it. |
|
Hi Harrison, thank you for the reply! I just wanted to get back to you to let you know that after some scoping of the Chi.bio system, we decided to use another system for our fermentations. So, in the end, I will not have any immediate use for it. |
I wanted to allow custom programs to be integrated a bit better into the workflow.
Now you can have programs in external .py files!
This is still ultraWIP(TM) so many things might be bad or unfinished.
Consequences:
programname.pyfile every time you runCustomProgram(M), so any variables in the program which aren't stored in sysData are not saved##CHI_BIO_PROGRAMon the first linedef main(M,sysData,api):functionfuncapiis a class which exposes many functions to the programs (but not all of them because I am lazy)Custom Programsdropdown, which get updated every time you reload the pageindex()now checks the current folder for any valid programs and stores them insysData["CustomPrograms"]={"programname":"\\path\\to\\programname.py","programname2" etc}WARNING: UNTESTED ON REAL CHI.BIOs!! use at own risktested and it works :)