mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-05-24 06:25:01 -04:00
Add autonomous mode as a selectable mode
This commit is contained in:
@@ -160,8 +160,6 @@ HIDLampArrayController::HIDLampArrayController(hid_device *dev_handle, const cha
|
||||
{
|
||||
GetLampAttributesResponseReport();
|
||||
}
|
||||
|
||||
SetLampArrayControlReport(false);
|
||||
}
|
||||
|
||||
HIDLampArrayController::~HIDLampArrayController()
|
||||
|
||||
@@ -121,6 +121,7 @@ public:
|
||||
unsigned int GetLampCount();
|
||||
std::vector<LampAttributes> GetLamps();
|
||||
|
||||
void SetLampArrayControlReport(unsigned char AutonomousMode);
|
||||
void SetLampMultiUpdateReport(unsigned char LampCount, unsigned char LampUpdateFlags, unsigned short * LampIds, LampArrayColor * UpdateColors);
|
||||
|
||||
private:
|
||||
@@ -140,6 +141,5 @@ private:
|
||||
|
||||
void GetLampArrayAttributesReport();
|
||||
void GetLampAttributesResponseReport();
|
||||
void SetLampArrayControlReport(unsigned char AutonomousMode);
|
||||
void SetLampAttributesRequestReport(unsigned short LampId);
|
||||
};
|
||||
|
||||
@@ -71,6 +71,13 @@ RGBController_HIDLampArray::RGBController_HIDLampArray(HIDLampArrayController* c
|
||||
Direct.color_mode = MODE_COLORS_PER_LED;
|
||||
modes.push_back(Direct);
|
||||
|
||||
mode Autonomous;
|
||||
Autonomous.name = "Autonomous";
|
||||
Autonomous.value = 1;
|
||||
Autonomous.flags = 0;
|
||||
Autonomous.color_mode = MODE_COLORS_NONE;
|
||||
modes.push_back(Autonomous);
|
||||
|
||||
SetupZones();
|
||||
}
|
||||
|
||||
@@ -411,5 +418,12 @@ void RGBController_HIDLampArray::DeviceUpdateSingleLED(int /*led*/)
|
||||
|
||||
void RGBController_HIDLampArray::DeviceUpdateMode()
|
||||
{
|
||||
|
||||
if(modes[active_mode].value == 0)
|
||||
{
|
||||
controller->SetLampArrayControlReport(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
controller->SetLampArrayControlReport(true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user