mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2025-12-23 23:37:48 -05:00
Update more file header comments to standardized new format, move some locally owned files out of the dependencies folder
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
#include "ResourceManager.h"
|
||||
#include "SettingsManager.h"
|
||||
#include "ASRockPolychromeUSBController.h"
|
||||
#include "dependencies/dmiinfo.h"
|
||||
#include "dmiinfo.h"
|
||||
|
||||
#define POLYCHROME_USB_READ_ZONE_CONFIG 0x11
|
||||
#define POLYCHROME_USB_READ_HEADER 0x14
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#include "ASRockASRRGBSMBusController.h"
|
||||
#include <cstring>
|
||||
#include "dependencies/dmiinfo.h"
|
||||
#include "dmiinfo.h"
|
||||
#include "LogManager.h"
|
||||
|
||||
#define ASROCK_ZONE_LED_COUNT_MESSAGE_EN "[%s] Zone %i LED count: %02d"
|
||||
@@ -64,7 +64,7 @@ void ASRockASRRGBSMBusController::SetColorsAndSpeed(uint8_t led, uint8_t red, ui
|
||||
{
|
||||
uint8_t color_speed_pkt[4] = { red, green, blue, active_speed };
|
||||
uint8_t select_led_pkt[1] = { led };
|
||||
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Select LED |
|
||||
\*-----------------------------------------------------*/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#include "ASRockPolychromeV1SMBusController.h"
|
||||
#include <cstring>
|
||||
#include "dependencies/dmiinfo.h"
|
||||
#include "dmiinfo.h"
|
||||
#include "LogManager.h"
|
||||
|
||||
#define ASROCK_ZONE_LED_COUNT_MESSAGE_EN "[%s] Zone %i LED count: %02d"
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#include <cstring>
|
||||
#include "ASRockPolychromeV2SMBusController.h"
|
||||
#include "dependencies/dmiinfo.h"
|
||||
#include "dmiinfo.h"
|
||||
#include "LogManager.h"
|
||||
|
||||
#define ASROCK_ZONE_LED_COUNT_MESSAGE_EN "[%s] Zone %i LED count: %02d"
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "RGBController_AsusAuraRyuoAIO.h"
|
||||
#include <stdexcept>
|
||||
#include <hidapi/hidapi.h>
|
||||
#include "dependencies/dmiinfo.h"
|
||||
#include "dmiinfo.h"
|
||||
|
||||
#define AURA_USB_VID 0x0B05
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#include "RGBController_AsusCerberusKeyboard.h"
|
||||
#include "RGBController_AsusSagarisKeyboard.h"
|
||||
#include "RGBController_AsusStrixClaw.h"
|
||||
#include "dependencies/dmiinfo.h"
|
||||
|
||||
#define ASUS_LEGACY_USB_VID 0x195D
|
||||
#define ASUS_USB_VID 0x0B05
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include <vector>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "dependencies/dmiinfo.h"
|
||||
#include "dmiinfo.h"
|
||||
|
||||
#define DETECTOR_NAME "ENE (ASUS Aura) SMBus Controller"
|
||||
#define VENDOR_NAME "ASUS" //This should match the Vendor name from DMI
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string>
|
||||
#include "dependencies/dmiinfo.h"
|
||||
#include "dmiinfo.h"
|
||||
|
||||
#define DETECTOR_NAME "Gigabyte RGB Fusion 2 SMBus"
|
||||
#define VENDOR_NAME "Gigabyte Technology Co., Ltd."
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "Detector.h"
|
||||
#include "GigabyteRGBFusion2USBController.h"
|
||||
#include "RGBController_GigabyteRGBFusion2USB.h"
|
||||
#include "dependencies/dmiinfo.h"
|
||||
#include "dmiinfo.h"
|
||||
#define DETECTOR_NAME "Gigabyte RGB Fusion 2 USB"
|
||||
|
||||
#define IT8297_VID 0x048D
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "RGBController.h"
|
||||
#include "RGBController_GigabyteSuperIORGB.h"
|
||||
#include "super_io.h"
|
||||
#include "dependencies/dmiinfo.h"
|
||||
#include "dmiinfo.h"
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include "ResourceManager.h"
|
||||
#include "SettingsManager.h"
|
||||
#include "JGINYUEInternalUSBController.h"
|
||||
#include "dependencies/dmiinfo.h"
|
||||
#include "dmiinfo.h"
|
||||
|
||||
#define JGINYUE_USB_GENERAL_COMMAND_HEADER 0x01
|
||||
#define JGINYUE_USB_LED_STRIPE_SET_COMMAND_HEADER 0x05
|
||||
@@ -166,7 +166,7 @@ void JGINYUEInternalUSBController::WriteZoneMode
|
||||
usb_buf[0x05] = device_config[Active_zone].Color_B;
|
||||
usb_buf[0x06] = device_config[Active_zone].Brightness;
|
||||
usb_buf[0x07] = device_config[Active_zone].Speed;
|
||||
|
||||
|
||||
hid_write(dev, usb_buf, 16);
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ void JGINYUEInternalUSBController::DirectLEDControl
|
||||
std::this_thread::sleep_for(20ms);
|
||||
|
||||
memset(usb_buf, 0x00, sizeof(usb_buf));
|
||||
|
||||
|
||||
usb_buf[0x00] = JGINYUE_USB_PER_LED_SET_COMMAND_HEADER;
|
||||
usb_buf[0x01] = zone;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#include "LGMonitorController.h"
|
||||
#include "RGBController.h"
|
||||
#include "RGBController_LGMonitor.h"
|
||||
#include "dependencies/dmiinfo.h"
|
||||
#include "dmiinfo.h"
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| vendor ID |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#include "LenovoMotherboardController.h"
|
||||
#include "RGBController.h"
|
||||
#include "RGBController_LenovoMotherboard.h"
|
||||
#include "dependencies/dmiinfo.h"
|
||||
#include "dmiinfo.h"
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| vendor ID |
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "RGBController_MSIMysticLight112.h"
|
||||
#include "RGBController_MSIMysticLight162.h"
|
||||
#include "RGBController_MSIMysticLight185.h"
|
||||
#include "dependencies/dmiinfo.h"
|
||||
#include "dmiinfo.h"
|
||||
#include "LogManager.h"
|
||||
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#include "MSIRGBController.h"
|
||||
#include "dependencies/dmiinfo.h"
|
||||
#include "dmiinfo.h"
|
||||
#include "super_io.h"
|
||||
|
||||
MSIRGBController::MSIRGBController(int sioaddr, bool invert)
|
||||
@@ -29,7 +29,7 @@ MSIRGBController::MSIRGBController(int sioaddr, bool invert)
|
||||
val_at_2c |= 0b00010000;
|
||||
|
||||
superio_outb(msi_sioaddr, 0x2C, val_at_2c);
|
||||
|
||||
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Set logical device register to RGB controller |
|
||||
@@ -108,4 +108,4 @@ void MSIRGBController::SetColor(unsigned char red, unsigned char green, unsigned
|
||||
superio_outb(msi_sioaddr, MSI_SIO_RGB_REG_BLUE_3_2, (blue | (blue << 4)));
|
||||
superio_outb(msi_sioaddr, MSI_SIO_RGB_REG_BLUE_5_4, (blue | (blue << 4)));
|
||||
superio_outb(msi_sioaddr, MSI_SIO_RGB_REG_BLUE_7_6, (blue | (blue << 4)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "RGBController.h"
|
||||
#include "RGBController_MSIRGB.h"
|
||||
#include "super_io.h"
|
||||
#include "dependencies/dmiinfo.h"
|
||||
#include "dmiinfo.h"
|
||||
#include <vector>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
#include "ZETBladeOpticalController.h"
|
||||
|
||||
#include <cstring>
|
||||
#include "dependencies/dmiinfo.h"
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
|
||||
@@ -91,7 +91,6 @@ INCLUDEPATH +=
|
||||
$$CONTROLLER_INCLUDES \
|
||||
$$GUI_INCLUDES \
|
||||
dependencies/ColorWheel \
|
||||
dependencies/Swatches/ \
|
||||
dependencies/CRCpp/ \
|
||||
dependencies/hidapi/ \
|
||||
dependencies/hueplusplus-1.0.0/include \
|
||||
@@ -102,6 +101,7 @@ INCLUDEPATH +=
|
||||
dependencies/libusb-1.0.22/include/ \
|
||||
dependencies/mdns \
|
||||
dependencies/mbedtls-2.24.0/include/ \
|
||||
dmiinfo/ \
|
||||
hidapi_wrapper/ \
|
||||
i2c_smbus/ \
|
||||
i2c_tools/ \
|
||||
@@ -121,7 +121,6 @@ HEADERS +=
|
||||
$$CONTROLLER_H \
|
||||
Colors.h \
|
||||
dependencies/ColorWheel/ColorWheel.h \
|
||||
dependencies/Swatches/swatches.h \
|
||||
dependencies/hidapi/hidapi/hidapi.h \
|
||||
dependencies/json/json.hpp \
|
||||
LogManager.h \
|
||||
@@ -135,6 +134,7 @@ HEADERS +=
|
||||
SettingsManager.h \
|
||||
Detector.h \
|
||||
DeviceDetector.h \
|
||||
dmiinfo/dmiinfo.h \
|
||||
filesystem.h \
|
||||
hidapi_wrapper/hidapi_wrapper.h \
|
||||
i2c_smbus/i2c_smbus.h \
|
||||
@@ -159,8 +159,6 @@ HEADERS +=
|
||||
SOURCES += \
|
||||
$$GUI_CPP \
|
||||
$$CONTROLLER_CPP \
|
||||
dependencies/Swatches/swatches.cpp \
|
||||
dependencies/dmiinfo.cpp \
|
||||
dependencies/ColorWheel/ColorWheel.cpp \
|
||||
dependencies/hueplusplus-1.0.0/src/Action.cpp \
|
||||
dependencies/hueplusplus-1.0.0/src/APICache.cpp \
|
||||
@@ -194,6 +192,7 @@ SOURCES +=
|
||||
dependencies/libe131/src/e131.c \
|
||||
main.cpp \
|
||||
cli.cpp \
|
||||
dmiinfo/dmiinfo.cpp \
|
||||
LogManager.cpp \
|
||||
NetworkClient.cpp \
|
||||
NetworkProtocol.cpp \
|
||||
|
||||
20
cli.cpp
20
cli.cpp
@@ -1,3 +1,17 @@
|
||||
/*---------------------------------------------------------*\
|
||||
| cli.cpp |
|
||||
| |
|
||||
| OpenRGB command line interface |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include <vector>
|
||||
#include <cstring>
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
#include <iostream>
|
||||
#include "AutoStart.h"
|
||||
#include "filesystem.h"
|
||||
#include "ProfileManager.h"
|
||||
@@ -9,12 +23,6 @@
|
||||
#include "LogManager.h"
|
||||
#include "Colors.h"
|
||||
|
||||
#include <vector>
|
||||
#include <cstring>
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
#include <iostream>
|
||||
|
||||
/*-------------------------------------------------------------*\
|
||||
| Quirk for MSVC; which doesn't support this case-insensitive |
|
||||
| function |
|
||||
|
||||
39
dependencies/dmiinfo.h
vendored
39
dependencies/dmiinfo.h
vendored
@@ -1,39 +0,0 @@
|
||||
/*-------------------------------------------------------------------*\
|
||||
| dmiinfo.h |
|
||||
| |
|
||||
| Read DMI information for motherboard vendor and name |
|
||||
| |
|
||||
| Chris M (Dr_No) 30th Jun 2020 |
|
||||
| |
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
#ifndef DMIINFO_H
|
||||
#define DMIINFO_H
|
||||
|
||||
#include <string>
|
||||
|
||||
#ifdef WIN32
|
||||
#include "wmi.h"
|
||||
|
||||
#define WMI "WMI"
|
||||
#else
|
||||
#include <unistd.h> //Linux specific filesystem operation
|
||||
#include <fstream>
|
||||
|
||||
#define SYSFSDMI "/sys/devices/virtual/dmi/id/" //Linux specific file path
|
||||
#endif
|
||||
|
||||
class DMIInfo
|
||||
{
|
||||
public:
|
||||
DMIInfo();
|
||||
~DMIInfo();
|
||||
|
||||
std::string getMainboard();
|
||||
std::string getManufacturer();
|
||||
private:
|
||||
std::string mainboard;
|
||||
std::string manufacturer;
|
||||
};
|
||||
|
||||
#endif // DMIINFO_H
|
||||
@@ -1,11 +1,13 @@
|
||||
/*-------------------------------------------------------------------*\
|
||||
| dmiinfo.cpp |
|
||||
| |
|
||||
| Read DMI information for motherboard vendor and name |
|
||||
| |
|
||||
| Chris M (Dr_No) 30th Jun 2020 |
|
||||
| |
|
||||
\*-------------------------------------------------------------------*/
|
||||
/*---------------------------------------------------------*\
|
||||
| dmiinfo.h |
|
||||
| |
|
||||
| Read DMI information for motherboard vendor and name |
|
||||
| |
|
||||
| Chris M (Dr_No) 30 Jun 2020 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "dmiinfo.h"
|
||||
#include "LogManager.h"
|
||||
38
dmiinfo/dmiinfo.h
Normal file
38
dmiinfo/dmiinfo.h
Normal file
@@ -0,0 +1,38 @@
|
||||
/*---------------------------------------------------------*\
|
||||
| dmiinfo.h |
|
||||
| |
|
||||
| Read DMI information for motherboard vendor and name |
|
||||
| |
|
||||
| Chris M (Dr_No) 30 Jun 2020 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
#ifdef WIN32
|
||||
#include "wmi.h"
|
||||
|
||||
#define WMI "WMI"
|
||||
#else
|
||||
#include <unistd.h> //Linux specific filesystem operation
|
||||
#include <fstream>
|
||||
|
||||
#define SYSFSDMI "/sys/devices/virtual/dmi/id/" //Linux specific file path
|
||||
#endif
|
||||
|
||||
class DMIInfo
|
||||
{
|
||||
public:
|
||||
DMIInfo();
|
||||
~DMIInfo();
|
||||
|
||||
std::string getMainboard();
|
||||
std::string getManufacturer();
|
||||
private:
|
||||
std::string mainboard;
|
||||
std::string manufacturer;
|
||||
};
|
||||
@@ -1,4 +1,13 @@
|
||||
/*---------------------------------------------------------*\
|
||||
| pci_ids.h |
|
||||
| |
|
||||
| PCI Vendor and Device ID constants |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| PCI Vendor IDs |
|
||||
\*---------------------------------------------------------*/
|
||||
#define AMD_VEN 0x1022
|
||||
|
||||
@@ -1,16 +1,19 @@
|
||||
/*-------------------------------------------------------------------*\
|
||||
| Swatches.cpp |
|
||||
| |
|
||||
| Custom Colour Swatch widget that allows for adding user colours |
|
||||
| |
|
||||
| Chris M (Dr_No) 23rd April 2021 |
|
||||
| |
|
||||
\*-------------------------------------------------------------------*/
|
||||
/*---------------------------------------------------------*\
|
||||
| swatches.cpp |
|
||||
| |
|
||||
| Custom Colour Swatch widget that allows for adding user |
|
||||
| colours |
|
||||
| |
|
||||
| Chris M (Dr_No) 23 Apr 2021 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "swatches.h"
|
||||
#include <QPainter>
|
||||
#include <QResizeEvent>
|
||||
#include <QStyleOption>
|
||||
#include "swatches.h"
|
||||
|
||||
Swatches::Swatches(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
@@ -30,23 +33,23 @@ Swatches::Swatches(QWidget *parent) :
|
||||
swatch red_swatch;
|
||||
red_swatch.color.setRgb(255, 0, 0, 255);
|
||||
swatch_list.push_back(red_swatch);
|
||||
|
||||
|
||||
swatch yellow_swatch;
|
||||
yellow_swatch.color.setRgb(255, 255, 0, 255);
|
||||
swatch_list.push_back(yellow_swatch);
|
||||
|
||||
|
||||
swatch green_swatch;
|
||||
green_swatch.color.setRgb( 0, 255, 0, 255);
|
||||
swatch_list.push_back(green_swatch);
|
||||
|
||||
|
||||
swatch cyan_swatch;
|
||||
cyan_swatch.color.setRgb( 0, 255, 255, 255);
|
||||
swatch_list.push_back(cyan_swatch);
|
||||
|
||||
|
||||
swatch blue_swatch;
|
||||
blue_swatch.color.setRgb( 0, 0, 255, 255);
|
||||
swatch_list.push_back(blue_swatch);
|
||||
|
||||
|
||||
swatch magenta_swatch;
|
||||
magenta_swatch.color.setRgb(255, 0, 255, 255);
|
||||
swatch_list.push_back(magenta_swatch);
|
||||
@@ -1,14 +1,16 @@
|
||||
/*-------------------------------------------------------------------*\
|
||||
| Swatches.cpp |
|
||||
| |
|
||||
| Custom Colour Swatch widget that allows for adding user colours |
|
||||
| |
|
||||
| Chris M (Dr_No) 23rd April 2021 |
|
||||
| |
|
||||
\*-------------------------------------------------------------------*/
|
||||
/*---------------------------------------------------------*\
|
||||
| swatches.h |
|
||||
| |
|
||||
| Custom Colour Swatch widget that allows for adding user |
|
||||
| colours |
|
||||
| |
|
||||
| Chris M (Dr_No) 23 Apr 2021 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#ifndef SWATCHES_H
|
||||
#define SWATCHES_H
|
||||
#pragma once
|
||||
|
||||
#include <QWidget>
|
||||
#include <QVector>
|
||||
@@ -67,5 +69,3 @@ private:
|
||||
|
||||
void drawSwatches(const QSize &newSize);
|
||||
};
|
||||
|
||||
#endif // SWATCHES_H
|
||||
Reference in New Issue
Block a user