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

Enable new compare buffer for K70 Lux RGB also #195

Merged
merged 1 commit into from
May 15, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/ckb-daemon/led_keyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ int loadrgb_kb(usbdevice* kb, lighting* light, int mode){
/// Since Firmware Version 2.05 for K95RGB the answers for getting the stored color-maps from the hardware
/// has changed a bit. So comparing for the correct answer cannot validate against the cmd,
/// and has to be done against a third map.
/// Up to now we know, that K70RGB Pro has firmware version 2.04 and havin the problem also.
/// Up to now we know, that K70RGB Pro and K70 Lux RGB have firmware version 2.04 and having the problem also.
/// So we have to determine in the most inner loop the firmware version and type of KB to select the correct compare-table.

uchar cmp_pkt[4][4] = {
Expand All @@ -223,7 +223,10 @@ int loadrgb_kb(usbdevice* kb, lighting* light, int mode){
uchar* comparePacket = data_pkt[i + clr * 4]; ///> That is the old comparison method: you get back what you sent.
/// Normally a firmware version >= 2.05 runs with the new compare array.
/// Up to now there is a 2.04 running in K70 RGB Lux with the same behavior.
if ((kb->fwversion >= 0x205) || ((kb->fwversion >= 0x204) && (kb->product == P_K70_LUX_NRGB))) {
/// It seems that K70RGB has the same problem
if ((kb->fwversion >= 0x205)
|| ((kb->fwversion >= 0x204)
&& ((kb->product == P_K70_LUX_NRGB) || (kb->product == P_K70_LUX)))) {
comparePacket = cmp_pkt[i];
}

Expand Down