Browse Source

Rename OpenAuraSDK.cpp to OpenRGB.cpp and remove old unused code

hue_plus_autodetect_devel
Adam Honse 2 years ago
parent
commit
fd9134c911
  1. 12
      OpenAuraSDK.h
  2. 58
      OpenRGB.cpp
  3. 1
      OpenRGB.h
  4. 2
      OpenRGB.pro
  5. 21
      RGBController/AorusGPUDetect.cpp
  6. 2
      main.cpp
  7. 1
      qt/OpenRGBDialog.cpp
  8. 1
      qt/OpenRGBDialog2.cpp

12
OpenAuraSDK.h

@ -1,12 +0,0 @@
#include <string>
#include "AuraController.h"
#include "i2c_smbus.h"
#define MODE_AUTO 0
#define MODE_QUICK 1
#define MODE_READ 2
#define MODE_FUNC 3
std::string DetectI2C(i2c_smbus_interface * bus, int mode);
void DumpAuraRegisters(AuraController * controller);
void DetectRGBControllers();

58
OpenAuraSDK.cpp → OpenRGB.cpp

@ -1,14 +1,12 @@
/******************************************************************************************\
* *
* OpenAuraSDK.cpp *
* OpenRGB.cpp *
* *
* Functions for communicating with Asus Aura devices on Windows and Linux *
* Functions for communicating with RGBController API devices on Windows and Linux *
* *
\******************************************************************************************/
#include "AuraController.h"
#include "RGBController.h"
#include "RGBController_AorusGPU.h"
#include "i2c_smbus.h"
#include <vector>
#include <stdio.h>
@ -319,40 +317,6 @@ void DetectI2CBusses()
#endif /* WIN32 */
/******************************************************************************************\
* *
* DumpAuraRegisters *
* *
* Dumps register values from an Aura device *
* *
\******************************************************************************************/
void DumpAuraRegisters(AuraController * controller)
{
int i, j;
int start = 0x0000;
FILE* file = freopen("auradump.txt", "a", stdout);
printf(" 0 1 2 3 4 5 6 7 8 9 a b c d e f\r\n");
for (i = 0; i < 0xFFFF; i += 16)
{
printf("%04x: ", i + start);
for (j = 0; j < 16; j++)
{
printf("%02x ", controller->AuraRegisterRead(start + i + j));
}
printf("\r\n");
}
fclose(file);
} /* DumpAuraRegisters() */
void DetectAuraControllers(std::vector<i2c_smbus_interface*> &busses, std::vector<RGBController*> &rgb_controllers);
void DetectCorsairControllers(std::vector<i2c_smbus_interface*> &busses, std::vector<RGBController*> &rgb_controllers);
void DetectCorsairProControllers(std::vector<i2c_smbus_interface*> &busses, std::vector<RGBController*> &rgb_controllers);
@ -365,6 +329,7 @@ void DetectOpenRazerControllers(std::vector<RGBController*> &rgb_controllers);
void DetectRazerChromaSDKControllers(std::vector<RGBController*>& rgb_controllers);
void DetectE131Controllers(std::vector<RGBController*> &rgb_controllers);
void DetectAMDWraithPrismControllers(std::vector<RGBController*>& rgb_controllers);
void DetectAorusGPUControllers(std::vector<RGBController*> &rgb_controllers);
/******************************************************************************************\
* *
@ -390,18 +355,19 @@ void DetectRGBControllers(void)
DetectAMDWraithPrismControllers(rgb_controllers);
/*-------------------------------------*\
| Windows-only devices |
\*-------------------------------------*/
#ifdef WIN32
DetectRazerChromaSDKControllers(rgb_controllers);
//DetectAorusGPUControllers(rgb_controllers);
/*-------------------------------------*\
| Linux-only devices |
\*-------------------------------------*/
#else
DetectE131Controllers(rgb_controllers);
DetectOpenRazerControllers(rgb_controllers);
#endif
//This is for testing Aorus GPU
#if 0
RGBController_AorusGPU * aorus_rgb = new RGBController_AorusGPU();
rgb_controllers.push_back(aorus_rgb);
#endif
}
} /* DetectRGBControllers() */

1
OpenRGB.h

@ -0,0 +1 @@
void DetectRGBControllers();

2
OpenRGB.pro

@ -24,7 +24,7 @@ INCLUDEPATH += \
SOURCES += \
main.cpp \
OpenAuraSDK.cpp \
OpenRGB.cpp \
qt/OpenRGBDeviceInfoPage.cpp \
qt/OpenRGBDevicePage.cpp \
qt/OpenRGBDialog.cpp \

21
RGBController/AorusGPUDetect.cpp

@ -0,0 +1,21 @@
#include "RGBController.h"
#include "RGBController_AorusGPU.h"
#include <vector>
#include <stdio.h>
#include <stdlib.h>
/******************************************************************************************\
* *
* DetectAorusGPUControllers *
* *
* Detect devices supported by the Aorus GPU driver *
* * *
\******************************************************************************************/
void DetectAorusGPUControllers(std::vector<RGBController*> &rgb_controllers)
{
RGBController_AorusGPU * aorus_rgb = new RGBController_AorusGPU();
rgb_controllers.push_back(aorus_rgb);
} /* DetectLEDStripControllers() */

2
main.cpp

@ -6,7 +6,7 @@
* *
\******************************************************************************************/
#include "OpenAuraSDK.h"
#include "OpenRGB.h"
#include "RGBController.h"
#include "i2c_smbus.h"
#include <vector>

1
qt/OpenRGBDialog.cpp

@ -1,5 +1,4 @@
#include "OpenRGBDialog.h"
#include "OpenAuraSDK.h"
using namespace Ui;

1
qt/OpenRGBDialog2.cpp

@ -2,7 +2,6 @@
#include "OpenRGBDevicePage.h"
#include "OpenRGBDeviceInfoPage.h"
#include "OpenRGBSystemInfoPage.h"
#include "OpenAuraSDK.h"
#include <QLabel>
#include <QTabBar>

Loading…
Cancel
Save