Update SteelSeriesOldApexController files to new standardized header format

This commit is contained in:
Adam Honse 2024-07-11 22:34:10 -05:00
parent 05d707b8d4
commit ac1c823ca1
4 changed files with 67 additions and 75 deletions

View file

@ -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"

View file

@ -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

View file

@ -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 <cstring>
#include <stdio.h>
#include <stdlib.h>
#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("");

View file

@ -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 <string>
#include <hidapi/hidapi.h>
#include "color32.h"
#include "SteelSeriesGeneric.h"
#pragma once
/* Mode, we then use these to set actual effect based on speed. */
enum
{