Update more file header comments to standardized new format, move some locally owned files out of the dependencies folder

This commit is contained in:
Adam Honse 2024-05-08 11:53:07 -05:00
parent ff2957ec80
commit 1bbfded78a
25 changed files with 123 additions and 105 deletions

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -2,7 +2,7 @@
#include "LGMonitorController.h"
#include "RGBController.h"
#include "RGBController_LGMonitor.h"
#include "dependencies/dmiinfo.h"
#include "dmiinfo.h"
/*---------------------------------------------------------*\
| vendor ID |

View file

@ -2,7 +2,7 @@
#include "LenovoMotherboardController.h"
#include "RGBController.h"
#include "RGBController_LenovoMotherboard.h"
#include "dependencies/dmiinfo.h"
#include "dmiinfo.h"
/*---------------------------------------------------------*\
| vendor ID |

View file

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

View file

@ -10,7 +10,7 @@
\*-----------------------------------------*/
#include "MSIRGBController.h"
#include "dependencies/dmiinfo.h"
#include "dmiinfo.h"
#include "super_io.h"
MSIRGBController::MSIRGBController(int sioaddr, bool invert)

View file

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

View file

@ -12,7 +12,6 @@
#include "ZETBladeOpticalController.h"
#include <cstring>
#include "dependencies/dmiinfo.h"
using namespace std::chrono_literals;

View file

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

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

View file

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

View file

@ -1,11 +1,13 @@
/*-------------------------------------------------------------------*\
| dmiinfo.cpp |
/*---------------------------------------------------------*\
| dmiinfo.h |
| |
| Read DMI information for motherboard vendor and name |
| |
| Chris M (Dr_No) 30th Jun 2020 |
| 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
View 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;
};

View file

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

View file

@ -1,16 +1,19 @@
/*-------------------------------------------------------------------*\
| Swatches.cpp |
/*---------------------------------------------------------*\
| swatches.cpp |
| |
| Custom Colour Swatch widget that allows for adding user colours |
| Custom Colour Swatch widget that allows for adding user |
| colours |
| |
| Chris M (Dr_No) 23rd April 2021 |
| 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),

View file

@ -1,14 +1,16 @@
/*-------------------------------------------------------------------*\
| Swatches.cpp |
/*---------------------------------------------------------*\
| swatches.h |
| |
| Custom Colour Swatch widget that allows for adding user colours |
| Custom Colour Swatch widget that allows for adding user |
| colours |
| |
| Chris M (Dr_No) 23rd April 2021 |
| 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