You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A common situation I've encountered: I have the port name (i.e. as a String, e.g. "/dev/serial/by-id/usb-Arduino__www.arduino.cc__0043_95735353032351F0F0F0-if00"), I open it, do stuff with the SerialPort object, and then for various reasons I "lose" the SerialPort object. I then have no means of reacquiring it. In fact, the only real option I have is to restart the Julia session and get it by name again.
One way would be for me to keep my own record of the SerialPort object (like a const Ref of the object) and maintain it that way. But perhaps it would be better if that functionality existed in LibSerialPort.jl. Simply put, just like there is an open port function that accepts the port name as a string, there should be a close function that accepts the port name as a string (and not just as a SerialPort).
The text was updated successfully, but these errors were encountered:
Note worthy: I just found out that I can open and close the same SerialPort instance as much as I like, so I could just a keep a const sp and that's it...
A common situation I've encountered: I have the port name (i.e. as a String, e.g.
"/dev/serial/by-id/usb-Arduino__www.arduino.cc__0043_95735353032351F0F0F0-if00"
), I open it, do stuff with the SerialPort object, and then for various reasons I "lose" the SerialPort object. I then have no means of reacquiring it. In fact, the only real option I have is to restart the Julia session and get it by name again.One way would be for me to keep my own record of the
SerialPort
object (like aconst Ref
of the object) and maintain it that way. But perhaps it would be better if that functionality existed inLibSerialPort.jl
. Simply put, just like there is anopen
port function that accepts the port name as a string, there should be aclose
function that accepts the port name as a string (and not just as a SerialPort).The text was updated successfully, but these errors were encountered: