Skip to content

Commit

Permalink
APIv9 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
T-Troll committed Aug 29, 2023
1 parent becdc64 commit 0a2b329
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions AlienFX-SDK/AlienFX_SDK/AlienFX_SDK.cpp
Expand Up @@ -262,6 +262,9 @@ chain++;

bool Functions::Reset() {
switch (version) {
case API_V9:
inSet = PrepareAndSend(COMMV9_update, { {3,2} });
break;
case API_V6:
// need initial reset if not done
if (chain) {
Expand Down Expand Up @@ -296,6 +299,10 @@ chain++;
bool Functions::UpdateColors() {
if (inSet) {
switch (version) {
case API_V9:
inSet = !PrepareAndSend(COMMV9_update);
GetDeviceStatus();
break;
case API_V5:
{
inSet = !PrepareAndSend(COMMV5_update);
Expand Down Expand Up @@ -750,6 +757,9 @@ chain++;
//DWORD written;
if (devHandle)
switch (version) {
case API_V9:
HidD_GetInputReport(devHandle, buffer, length);
return 1;
case API_V5:
{
PrepareAndSend(COMMV5_status);
Expand Down
1 change: 1 addition & 0 deletions AlienFX-SDK/AlienFX_SDK/alienfx-controls.h
Expand Up @@ -147,6 +147,7 @@ namespace AlienFX_SDK {
const byte v8OpCodes[]{ 0x81, 0x82, 0x83, 0x87, 0x88, 0x84, 0x81 };
// 09 03, 0a 03 - set profiles
// V9, new monitors
const byte COMMV9_update[]{ 3,0x40,0xe1,0x01 };
const byte COMMV9_colorSet[]{ 11,0x40, 0xc6,00,00,00,00,0xa,00,0x6e,00,0x82 };
// 40c6000000000a006e00820000000000 0
// 00000000000000000000000000000000 1
Expand Down

0 comments on commit 0a2b329

Please sign in to comment.