diff --git a/Controllers/SteelSeriesController/SteelSeriesOldApexController/RGBController_SteelSeriesOldApex.cpp b/Controllers/SteelSeriesController/SteelSeriesOldApexController/RGBController_SteelSeriesOldApex.cpp index ff7887c4..c319c192 100644 --- a/Controllers/SteelSeriesController/SteelSeriesOldApexController/RGBController_SteelSeriesOldApex.cpp +++ b/Controllers/SteelSeriesController/SteelSeriesOldApexController/RGBController_SteelSeriesOldApex.cpp @@ -1,20 +1,18 @@ -/*-----------------------------------------*\ -| RGBController_SteelSeriesOldApex.cpp | -| | -| Generic RGB Interface older-style | -| SteelSeriesApex Keyboards | -| (APEX/APEX Fnatic/Apex 350) | -| Class | -| | -| David Lee (RAMChYLD) 15/11/2020 | -| | -| Based on work by | -| B Horn (bahorn) 13/05/2020 | -| | -| Based on findings in ApexCtl by | -| Audrius/tuxmark5, et. al | -| https://github.com/tuxmark5/ApexCtl | -\*-----------------------------------------*/ +/*---------------------------------------------------------*\ +| RGBController_SteelSeriesOldApex.cpp | +| | +| RGBController for older SteelSeries Apex keyboards | +| (Apex/Apex Fnatic/Apex 350) | +| | +| Based on findings in ApexCtl by Audrius/tuxmark5, et. | +| al, https://github.com/tuxmark5/ApexCtl | +| | +| David Lee (RAMChYLD) 15 Nov 2020 | +| Based on work by B Horn (bahorn) 13 May 2020 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ #include "RGBController_SteelSeriesOldApex.h" diff --git a/Controllers/SteelSeriesController/SteelSeriesOldApexController/RGBController_SteelSeriesOldApex.h b/Controllers/SteelSeriesController/SteelSeriesOldApexController/RGBController_SteelSeriesOldApex.h index 09a2b4ab..ada2fe21 100644 --- a/Controllers/SteelSeriesController/SteelSeriesOldApexController/RGBController_SteelSeriesOldApex.h +++ b/Controllers/SteelSeriesController/SteelSeriesOldApexController/RGBController_SteelSeriesOldApex.h @@ -1,20 +1,18 @@ -/*-----------------------------------------*\ -| RGBController_SteelSeriesOldApex.h | -| | -| Generic RGB Interface older-style | -| SteelSeriesApex Keyboards | -| (APEX/APEX Fnatic/Apex 350) | -| Class | -| | -| David Lee (RAMChYLD) 15/11/2020 | -| | -| Based on work by | -| B Horn (bahorn) 13/05/2020 | -| | -| Based on findings in ApexCtl by | -| Audrius/tuxmark5, et. al | -| https://github.com/tuxmark5/ApexCtl | -\*-----------------------------------------*/ +/*---------------------------------------------------------*\ +| RGBController_SteelSeriesOldApex.h | +| | +| RGBController for older SteelSeries Apex keyboards | +| (Apex/Apex Fnatic/Apex 350) | +| | +| Based on findings in ApexCtl by Audrius/tuxmark5, et. | +| al, https://github.com/tuxmark5/ApexCtl | +| | +| David Lee (RAMChYLD) 15 Nov 2020 | +| Based on work by B Horn (bahorn) 13 May 2020 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ #pragma once diff --git a/Controllers/SteelSeriesController/SteelSeriesOldApexController/SteelSeriesOldApexController.cpp b/Controllers/SteelSeriesController/SteelSeriesOldApexController/SteelSeriesOldApexController.cpp index d77ab1fb..055361da 100644 --- a/Controllers/SteelSeriesController/SteelSeriesOldApexController/SteelSeriesOldApexController.cpp +++ b/Controllers/SteelSeriesController/SteelSeriesOldApexController/SteelSeriesOldApexController.cpp @@ -1,38 +1,36 @@ -/*-----------------------------------------*\ -| SteelSeriesOldApexController.cpp | -| | -| RGB Lighting Library for SteelSeries | -| older Apex KB lighting controller | -| (Apex, Apex Fnatic, Apex 350) | -| | -| David Lee (RAMChYLD) 15/11/2020 | -| | -| Based on work for SteelSeries Rival by | -| B Horn (bahorn) 13/5/2020 | -| | -| Based on findings in ApexCtl by | -| Audrius/tuxmark5, et. al | -| https://github.com/tuxmark5/ApexCtl | -\*-----------------------------------------*/ +/*---------------------------------------------------------*\ +| SteelSeriesOldApexController.cpp | +| | +| Driver for older SteelSeries Apex keyboards | +| (Apex/Apex Fnatic/Apex 350) | +| | +| Based on findings in ApexCtl by Audrius/tuxmark5, et. | +| al, https://github.com/tuxmark5/ApexCtl | +| | +| David Lee (RAMChYLD) 15 Nov 2020 | +| Based on work by B Horn (bahorn) 13 May 2020 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ - -#include "SteelSeriesOldApexController.h" #include #include #include +#include "SteelSeriesOldApexController.h" static void send_usb_msg(hid_device* dev, char * data_pkt, unsigned int size) { char* usb_pkt = new char[size + 1]; - + usb_pkt[0] = 0x00; for(unsigned int i = 1; i < size + 1; i++) { usb_pkt[i] = data_pkt[i-1]; } - + hid_write(dev, (unsigned char *)usb_pkt, size + 1); - + delete[] usb_pkt; } @@ -67,7 +65,7 @@ std::string SteelSeriesOldApexController::GetSerialString() { wchar_t serial_string[128]; int ret = hid_get_serial_number_string(dev, serial_string, 128); - + if (ret != 0) { return(""); diff --git a/Controllers/SteelSeriesController/SteelSeriesOldApexController/SteelSeriesOldApexController.h b/Controllers/SteelSeriesController/SteelSeriesOldApexController/SteelSeriesOldApexController.h index b5b0c523..877a26c4 100644 --- a/Controllers/SteelSeriesController/SteelSeriesOldApexController/SteelSeriesOldApexController.h +++ b/Controllers/SteelSeriesController/SteelSeriesOldApexController/SteelSeriesOldApexController.h @@ -1,28 +1,26 @@ -/*-----------------------------------------*\ -| SteelSeriesOldApexController.h | -| | -| Definitions and types for SteelSeries | -| older Apex KB lighting controller | -| (Apex, Apex Fnatic, Apex 350) | -| | -| David Lee (RAMChYLD) 15/11/2020 | -| | -| Based on work for SteelSeries Rival by | -| B Horn (bahorn) 13/5/2020 | -| | -| Based on findings in ApexCtl by | -| Audrius/tuxmark5, et. al | -| https://github.com/tuxmark5/ApexCtl | -\*-----------------------------------------*/ +/*---------------------------------------------------------*\ +| SteelSeriesOldApexController.h | +| | +| Driver for older SteelSeries Apex keyboards | +| (Apex/Apex Fnatic/Apex 350) | +| | +| Based on findings in ApexCtl by Audrius/tuxmark5, et. | +| al, https://github.com/tuxmark5/ApexCtl | +| | +| David Lee (RAMChYLD) 15 Nov 2020 | +| Based on work by B Horn (bahorn) 13 May 2020 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ + +#pragma once #include #include - #include "color32.h" #include "SteelSeriesGeneric.h" -#pragma once - /* Mode, we then use these to set actual effect based on speed. */ enum {