Currently to toggle the usb filesystem, usb hid and midi, we need to have to edit boot.py.
However, if you want to toggle it frequently it becomes quite annoying.
And it's hard for applications to just set it for the next boot in a clean manner, since there is no such ready-made api.
For ljinux, from 6.x I had implemented a config.json which stored stuff for boot.py and the os to read/write.
But during 8.x I switched to using settings.toml and the os just set the values with my standard toml library.
A typical ljinux settings.toml looks like this currently:
CIRCUITPY_PYSTACK_SIZE = 12288
[LJINUX]
setup = true
serial_console = true
usb_access = false
usb_hid = false
leden = -1
ledtype = "neopixel"
led = 33
DEBUG = false
root_SCLK = -1
root_SCSn = -1
root_MOSI = -1
root_MISO = -1
[IWD]
#Network1 = "password1"
#Network2 = "password2"
[IWD-AP]
SSID = "fastest_wifi"
PASSWD = "example ap password"
And I was wondering, wouldn't it be more practical to just have the toggles implemented in the core?
It would be so much simplier for users to configure this stuff with one line inside the toml, than in boot.py.
I don't think we should remove the existing api, but we should just edit the default state (what's set before boot.py runs) to be what settings.toml says.
If this idea is something you want to see implemented, I can probably go ahead and do it myself.
I just want to know if it's something the project would like.
Currently to toggle the usb filesystem, usb hid and midi, we need to have to edit
boot.py.However, if you want to toggle it frequently it becomes quite annoying.
And it's hard for applications to just set it for the next boot in a clean manner, since there is no such ready-made api.
For ljinux, from 6.x I had implemented a
config.jsonwhich stored stuff forboot.pyand the os to read/write.But during 8.x I switched to using
settings.tomland the os just set the values with my standard toml library.A typical ljinux settings.toml looks like this currently:
And I was wondering, wouldn't it be more practical to just have the toggles implemented in the core?
It would be so much simplier for users to configure this stuff with one line inside the toml, than in
boot.py.I don't think we should remove the existing api, but we should just edit the default state (what's set before boot.py runs) to be what
settings.tomlsays.If this idea is something you want to see implemented, I can probably go ahead and do it myself.
I just want to know if it's something the project would like.