mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-09-21 09:54:59 -04:00
Initial commit for Linux-only controller for Valve Steam Machine using
the leds-valve kernel module and sysfs interface
This commit is contained in:
1 parent
8a831cef04
commit
14d543b9e4
5 files changed
+626
No files matched your search
@@ -0,0 +1,51 @@
|
||||
/*---------------------------------------------------------*\
|
||||
| ValveSteamMachineController_Linux.h |
|
||||
| |
|
||||
| Driver for Valve Steam Machine LEDs |
|
||||
| |
|
||||
| Adam Honse (calcprogrammer1@gmail.com) 23 Jul 2026 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
class ValveSteamMachineController
|
||||
{
|
||||
public:
|
||||
ValveSteamMachineController(std::string dev_name);
|
||||
~ValveSteamMachineController();
|
||||
|
||||
std::string GetName();
|
||||
|
||||
void AddLED(std::string led_path);
|
||||
size_t GetLEDCount();
|
||||
|
||||
std::string GetLEDPath(unsigned int led_idx);
|
||||
|
||||
std::vector<std::string> GetAvailableEffects();
|
||||
bool SupportsEffects();
|
||||
|
||||
void SetLEDColor(unsigned int led_idx, unsigned char red, unsigned char grn, unsigned char blu);
|
||||
void SetLEDEffect(unsigned int led_idx, std::string effect);
|
||||
void SetEffect(std::string effect);
|
||||
void SetBrightness(unsigned int brightness);
|
||||
void SetDelay(unsigned int delay);
|
||||
|
||||
private:
|
||||
std::string name;
|
||||
std::vector<std::string> led_paths;
|
||||
std::vector<std::ofstream> led_brightness;
|
||||
std::vector<std::ofstream> led_multi_intensity;
|
||||
std::vector<std::ofstream> led_effect;
|
||||
std::ofstream led_brightness_scale;
|
||||
std::ofstream led_delay;
|
||||
std::vector<std::string> available_effects;
|
||||
|
||||
void ReadAvailableEffects(std::string first_led_path);
|
||||
};
|
||||
Reference in new issue
Block a user