vialrgb: log protocol version on failure

main
Ilya Zhuravlev 2021-07-08 20:24:46 -04:00
parent 0f46237047
commit da984c578f
1 changed files with 2 additions and 1 deletions

View File

@ -400,7 +400,8 @@ class Keyboard:
retries=20)[2:]
self.rgb_version = data[0] | (data[1] << 8)
if self.rgb_version != 1:
raise RuntimeError("Unsupported VialRGB protocol, update your Vial version to latest")
raise RuntimeError("Unsupported VialRGB protocol ({}), update your Vial version to latest"
.format(self.rgb_version))
self.rgb_maximum_brightness = data[2]
data = self.usb_send(self.dev, struct.pack("BB", CMD_VIA_LIGHTING_GET_VALUE, VIALRGB_GET_MODE),