Skip to content
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

g213colors-gui -t errors out if you have only a G203 #12

Open
ssokolow opened this issue Dec 20, 2019 · 3 comments
Open

g213colors-gui -t errors out if you have only a G203 #12

ssokolow opened this issue Dec 20, 2019 · 3 comments

Comments

@ssokolow
Copy link

Like the title says, running g213colors-gui -t (which the systemd task wraps) dies with this error if you only have a G203:

Traceback (most recent call last):
  File "/usr/bin/g213colors-gui", line 166, in <module>
    myG.connectG("G213")
  File "/usr/bin/G213Colors.py", line 68, in connectG
    raise ValueError("USB device not found!")
ValueError: USB device not found!

I had to edit line 173 in /usr/bin/g213colors-gui from myG.connectG("G213") to myG.connectG("G203") to get it to run without erroring out.

@SebiTimeWaster
Copy link

SebiTimeWaster commented Feb 5, 2021

the G203 most likely has different product IDs, if you can find out the ids, you could potentially get it to work...

@ssokolow
Copy link
Author

ssokolow commented Feb 5, 2021

@SebiTimeWaster This fork specifically lists support for the G203 in the README, the other features work, and, if you edit that one line, -t works too. That's why I opened the bug.

The code is there and functional... it's just that the implementation of the -t switch hard-codes an assumption that it's going to be dealing with a G213.

(Source: I've been using my locally patched copy of it with my G203 without issue since I opened this bug.)

myG.connectG("G213") or myG.connectG("G203") indexes into this dict:

idProduct      = {"G213": 0xc336, # The id of the G213
                  "G203": 0xc084} # The id of the G203

@SebiTimeWaster
Copy link

didn't know that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants