-
Notifications
You must be signed in to change notification settings - Fork 4
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
Exceptions #2
Comments
I'm not sure what that error is about, sorry. Both USB and PowerMate are pretty terrible. All I can say is that it was working with my knob and software config, so the Are you sure you are using the I've since given up on the PowerMate knob, now I use a Zoom UAC-2, which is a nice looking DAC that has both a big system volume knob and a small headphones volume knob. I don't use the two instrument inputs. |
Thanks for your response! I am indeed using the |
It's been a while, I honestly can't remember. You might check here:
If that is similar to what I'm doing, you could try adding a
|
I figured out that there might be two versions of the PowerMate, the newer (version 2), is what I have. I managed to scoop up some documentation online, and got the following code to work: public void setBrightness (int brightness) {
if (dev == null) return;
if (brightness < 0 || brightness > 255) {
throw new IllegalArgumentException("Illegal brightness: " + brightness);
}
try {
dev.controlMsg(
// Request type
USB.REQ_TYPE_DIR_HOST_TO_DEVICE
| USB.REQ_TYPE_RECIP_INTERFACE
| USB.REQ_TYPE_TYPE_VENDOR,
// Request
0x01,
// Value = command type
0x0001,
// Index = brightness
brightness,
// Data (dummy buffer)
new byte[0],
// Length
0,
// Timeout (ms)
BRIGHTNESS_TIMEOUT,
// Reopen on timeout
true);
} catch (USBTimeoutException ex) {
return;
} catch (USBException ex) {
// TODO: This seems to always throw, disable for now
//LOGGER.log(Level.SEVERE, "Error setting brightness", ex);
}
this.brightness = brightness; This still throws exceptions (as can be seen above), but the brightness is set correctly. I still have one more question before closing this. What do you use to build this project into an executable? I have installed ResourceHacker and JSmooth already. I think I just need to build the Thanks for your help! |
Good find! If you want to make a PR so it works with both PowerMate versions, I'd merge it. I build it using Scar: |
Hi, thanks for creating this helpful utility. I too find it unacceptable that the proprietary software does not fully function for Windows 10. The volume control of this app works as intended, but the brightness is never set properly. I'm getting these two errors in the console whilst in debug mode.
The text was updated successfully, but these errors were encountered: