-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support linux system #3
Conversation
a = 1 # print("Error: Can't find"+self.dll_path) | ||
|
||
def open_device(self): | ||
self.iIndex = self.dll.CH34xOpenDevice("/dev/ch34x_pis0".encode()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would recommend using an auto-detect method here.
import glob
def open_device(self):
# Return first entry
device = glob.glob('/dev/ch34x_pis[0-9]*')[0]
self.iIndex = self.dll.CH34xOpenDevice(device.encode())
return self.iIndex
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My comment up above should resolve your issue as it will search for the first device attached to the system after you have updated the permissions to the device. There should probably be a udev-rule that sets the permissions of the device.... but that is once an installation method has been identified. |
No description provided.