Update Patriot Viper controller files to new standardized header comment

This commit is contained in:
Adam Honse 2024-06-03 11:36:47 -05:00
parent 281d3d8c62
commit a87803ff26
5 changed files with 64 additions and 45 deletions

View file

@ -1,14 +1,16 @@
/*-----------------------------------------*\
| PatriotViperController.cpp |
| |
| Definitions and types for Patriot Viper |
| RGB RAM lighting controller |
| |
| Adam Honse (CalcProgrammer1) 1/1/2020 |
\*-----------------------------------------*/
/*---------------------------------------------------------*\
| PatriotViperController.cpp |
| |
| Driver for Patriot Viper RAM |
| |
| Adam Honse (CalcProgrammer1) 01 Jan 2020 |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-only |
\*---------------------------------------------------------*/
#include "PatriotViperController.h"
#include <cstring>
#include "PatriotViperController.h"
PatriotViperController::PatriotViperController(i2c_smbus_interface* bus, viper_dev_id dev, unsigned char slots)
{

View file

@ -1,18 +1,20 @@
/*-----------------------------------------*\
| PatriotViperController.h |
| |
| Definitions and types for Patriot Viper |
| RGB RAM lighting controller |
| |
| Adam Honse (CalcProgrammer1) 1/1/2020 |
\*-----------------------------------------*/
#include <string>
#include <map>
#include "i2c_smbus.h"
/*---------------------------------------------------------*\
| PatriotViperController.h |
| |
| Driver for Patriot Viper RAM |
| |
| Adam Honse (CalcProgrammer1) 01 Jan 2020 |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-only |
\*---------------------------------------------------------*/
#pragma once
#include <map>
#include <string>
#include "i2c_smbus.h"
typedef unsigned char viper_dev_id;
typedef unsigned short viper_register;
@ -94,7 +96,7 @@ private:
viper_dev_id dev;
unsigned char mode;
unsigned char speed;
std::thread* keepalive_thread;
std::atomic<bool> keepalive_thread_run;
std::atomic<int> step;
@ -108,7 +110,7 @@ private:
| and the Keepalive thread is not needed |
\*-------------------------------------------------------*/
std::map <int, int> mode_steps =
std::map <int, int> mode_steps =
{
{VIPER_MODE_DARK, -1},
{VIPER_MODE_BREATHING, 4},
@ -120,7 +122,7 @@ private:
{VIPER_MODE_NEON, 0},
};
std::map <int, int> mode_sub_steps =
std::map <int, int> mode_sub_steps =
{
{VIPER_MODE_DARK, -1},
{VIPER_MODE_BREATHING, 1},
@ -132,7 +134,7 @@ private:
{VIPER_MODE_NEON, 5},
};
std::map <int, int> mode_speed =
std::map <int, int> mode_speed =
{
{VIPER_MODE_DARK, -1},
{VIPER_MODE_BREATHING, 0x06},

View file

@ -1,3 +1,17 @@
/*---------------------------------------------------------*\
| PatriotViperControllerDetect.cpp |
| |
| Detector for Patriot Viper RAM |
| |
| Adam Honse (CalcProgrammer1) 01 Jan 2020 |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-only |
\*---------------------------------------------------------*/
#include <stdio.h>
#include <stdlib.h>
#include <vector>
#include "Detector.h"
#include "PatriotViperController.h"
#include "LogManager.h"
@ -5,9 +19,6 @@
#include "RGBController_PatriotViper.h"
#include "i2c_smbus.h"
#include "pci_ids.h"
#include <vector>
#include <stdio.h>
#include <stdlib.h>
using namespace std::chrono_literals;
#define PATRIOT_CONTROLLER_NAME "Patriot Viper"

View file

@ -1,11 +1,13 @@
/*-----------------------------------------*\
| RGBController_PatriotViper.cpp |
| |
| Generic RGB Interface for OpenRGB |
| Patriot Viper RGB interface |
| |
| Adam Honse (CalcProgrammer1) 1/1/2020 |
\*-----------------------------------------*/
/*---------------------------------------------------------*\
| RGBController_PatriotViper.cpp |
| |
| RGBController for Patriot Viper RAM |
| |
| Adam Honse (CalcProgrammer1) 01 Jan 2020 |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-only |
\*---------------------------------------------------------*/
#include "RGBController_PatriotViper.h"

View file

@ -1,11 +1,13 @@
/*-----------------------------------------*\
| RGBController_PatriotViper.h |
| |
| Generic RGB Interface for OpenRGB |
| Patriot Viper RGB interface |
| |
| Adam Honse (CalcProgrammer1) 1/1/2020 |
\*-----------------------------------------*/
/*---------------------------------------------------------*\
| RGBController_PatriotViper.h |
| |
| RGBController for Patriot Viper RAM |
| |
| Adam Honse (CalcProgrammer1) 01 Jan 2020 |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-only |
\*---------------------------------------------------------*/
#pragma once
@ -20,7 +22,7 @@ public:
void SetupZones();
void ResizeZone(int zone, int new_size);
void DeviceUpdateLEDs();
void UpdateZoneLEDs(int zone);
void UpdateSingleLED(int led);