Change serial port from settings UI?
irfan798 opened this issue · comments
Sometimes my usb serial port name changes after reboot and sleep.
Is it possible to change serial port on settings without executing wizard?
Currently i can solve the issue my changing SerialPort
configuration under main.conf
and then restarting the Prismatik
It seems we have the function to change it, but it is only called from wizard:
Lightpack/Software/src/Settings.cpp
Lines 863 to 867 in 18a6592
Lightpack/Software/src/wizard/GlobalColorCoefPage.cpp
Lines 122 to 126 in 7124b83
But it seems like all the dynamic settings about port were commented out:
Lightpack/Software/src/LightpackApplication.cpp
Lines 663 to 673 in 92e2c5a
Lightpack/Software/src/LedDeviceAdalight.cpp
Line 211 in 39cdb72
It seems it is only possible to change when creating a new LedDeviceAdalight()
;
Was there a reason to comment those slots?
How can we activate them again, do they cause spesific bugs?
Not sure why there were commented out. I guess most of the work would be in creating the UI to set this outside the wizard.
Why do you need to change your serial port this often?
I have several USB's connected
And somehow they change /dev/ttyUSB0
to /dev/ttyUSB1
or vice versa on reboots and waking from sleep.
Also on re-plugging.
I dont know if this is a general case or just somehow an edge case.
Btw i am using Arduino Nano to control the leds.
I just figured it was reading the port information from main.conf
while reading the source code.
I can manage with it now (chaging the port then restarting prismatik), but it would be great if we can just change it from Device screen, just a text input next to Run configuration wizard
I will try to uncomment those lines and add a textbox when i have time.
have you tried /dev/serial/by-id/...
or /dev/serial/by-path/...
instead of /dev/tty..
? those might be less likely to change
you can also try udev rules for arduino