Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.8.0-rc2 #2061

Merged
merged 30 commits into from
Jun 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
8e7f8cb
Added audio device proxy class.
Wibble199 May 19, 2020
5f7b780
Added default device entry to the device lists.
Wibble199 May 19, 2020
16766e6
fixup! Added audio device proxy class. Helps with easily swapping dev…
Wibble199 May 19, 2020
56aac6a
Added options for choosing the audio device for equalizer layer and f…
Wibble199 May 19, 2020
425b082
Made audio device IDs update each time they're accessed.
Wibble199 May 19, 2020
7ebce7a
Fixed device not initially working with equalizer.
Wibble199 May 21, 2020
0b965d0
Merge pull request #2044 from antonpup/master
diogotr7 May 26, 2020
1b21cba
Renew support OEM list.
May 27, 2020
fa45c06
First Demo version
gitmacer May 29, 2020
40c5243
Rename mouse to cursor
gitmacer May 29, 2020
cb3e31a
Fix razer sdk wrapper not handling some effects correctly
MoshiMoshi0 May 30, 2020
874721e
Added return of actual operation in LogiLEDWrapper
supergrml May 30, 2020
a70e08b
Merge branch 'dev' into logiloading
supergrml May 30, 2020
efd7168
made color adjust sliders apply to the average color
diogotr7 May 30, 2020
847692d
Merge pull request #2052 from MoshiMoshi0/razer-chroma-update
diogotr7 May 30, 2020
d6129c6
Merge branch 'dev' into LocalPCInfoMousePosition
diogotr7 May 30, 2020
329baa8
Merge pull request #2051 from gitmacer/LocalPCInfoMousePosition
diogotr7 May 30, 2020
9a1dc6e
Merge branch 'dev' into dev
diogotr7 May 30, 2020
78fb088
Merge pull request #2047 from rushdie99/dev
diogotr7 May 30, 2020
c7422a7
Fixed Asus configure window from crashing, Updated UI to be a bit mor…
Fluto May 31, 2020
4f02f87
Added logging when overlay layers fail to update
diogotr7 May 31, 2020
3899a2d
Merge branch 'dev' into logiloading
diogotr7 May 31, 2020
2dcaf76
Merge pull request #2054 from supergrml/logiloading
diogotr7 May 31, 2020
98d03c0
Merge branch 'dev' into feature/ambilight-average-sliders
diogotr7 May 31, 2020
26f3fb2
plugin error logging
diogotr7 May 28, 2020
0de4418
Merge pull request #2055 from diogotr7/feature/ambilight-average-sliders
diogotr7 May 31, 2020
475d960
Merge branch 'dev' into asus-fix-01
diogotr7 Jun 1, 2020
5045d20
Merge pull request #2056 from Fluto/asus-fix-01
diogotr7 Jun 1, 2020
148cce0
Merge branch 'dev' into feature/audio-device-picker
diogotr7 Jun 2, 2020
bf1db63
Merge pull request #2028 from Wibble199/feature/audio-device-picker
diogotr7 Jun 2, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
114 changes: 50 additions & 64 deletions Project-Aurora/Aurora-LogiLEDWrapper/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,7 @@ bool WriteToPipe(const std::string command_cargo)
return false;
}

void _LogiLedSetLighting(int redPercentage, int greenPercentage, int bluePercentage, int custom_mode = 0)
bool _LogiLedSetLighting(int redPercentage, int greenPercentage, int bluePercentage, int custom_mode = 0)
{
unsigned char redValue = (unsigned char)((redPercentage / 100.0f) * 255);
unsigned char greenValue = (unsigned char)((greenPercentage / 100.0f) * 255);
Expand Down Expand Up @@ -936,7 +936,7 @@ void _LogiLedSetLighting(int redPercentage, int greenPercentage, int bluePercent
)
{
//No need to write on pipe, color did not change
return;
return true;
}

current_bg[0] = blueValue;
Expand All @@ -962,11 +962,13 @@ void _LogiLedSetLighting(int redPercentage, int greenPercentage, int bluePercent

contents += '}';

WriteToPipe(contents);
return WriteToPipe(contents);
}

return false;
}

void _LogiLedFlashLighting(int redPercentage, int greenPercentage, int bluePercentage, int milliSecondsDuration, int milliSecondsInterval)
bool _LogiLedFlashLighting(int redPercentage, int greenPercentage, int bluePercentage, int milliSecondsDuration, int milliSecondsInterval)
{
unsigned char redValue = (unsigned char)((redPercentage / 100.0f) * 255);
unsigned char greenValue = (unsigned char)((greenPercentage / 100.0f) * 255);
Expand All @@ -984,10 +986,10 @@ void _LogiLedFlashLighting(int redPercentage, int greenPercentage, int bluePerce

contents += '}';

WriteToPipe(contents);
return WriteToPipe(contents);
}

void _LogiLedPulseLighting(int redPercentage, int greenPercentage, int bluePercentage, int milliSecondsDuration, int milliSecondsInterval)
bool _LogiLedPulseLighting(int redPercentage, int greenPercentage, int bluePercentage, int milliSecondsDuration, int milliSecondsInterval)
{
unsigned char redValue = (unsigned char)((redPercentage / 100.0f) * 255);
unsigned char greenValue = (unsigned char)((greenPercentage / 100.0f) * 255);
Expand All @@ -1005,20 +1007,20 @@ void _LogiLedPulseLighting(int redPercentage, int greenPercentage, int bluePerce

contents += '}';

WriteToPipe(contents);
return WriteToPipe(contents);
}

void _LogiLedStopEffects()
bool _LogiLedStopEffects()
{
std::string contents = "";
contents += "\"command\": \"StopEffects\",";
contents += "\"command_data\": {";
contents += '}';

WriteToPipe(contents);
return WriteToPipe(contents);
}

void _LogiLedSetLightingFromBitmap(unsigned char bitmap[])
bool _LogiLedSetLightingFromBitmap(unsigned char bitmap[])
{
if (isInitialized && (current_device == LOGI_DEVICETYPE_ALL || current_device == LOGI_DEVICETYPE_PERKEY_RGB))
{
Expand All @@ -1044,11 +1046,13 @@ void _LogiLedSetLightingFromBitmap(unsigned char bitmap[])
}
contents += "]";

WriteToPipe(contents);
return WriteToPipe(contents);
}

return false;
}

void _LogiLedSetLightingForKeyWithScanCode(int keyCode, int redPercentage, int greenPercentage, int bluePercentage)
bool _LogiLedSetLightingForKeyWithScanCode(int keyCode, int redPercentage, int greenPercentage, int bluePercentage)
{
unsigned char redValue = (unsigned char)((redPercentage / 100.0f) * 255);
unsigned char greenValue = (unsigned char)((greenPercentage / 100.0f) * 255);
Expand All @@ -1068,7 +1072,7 @@ void _LogiLedSetLightingForKeyWithScanCode(int keyCode, int redPercentage, int g
)
{
//No need to write on pipe, color did not change
return;
return true;
}

current_bitmap[(int)bit_location] = blueValue;
Expand All @@ -1086,11 +1090,13 @@ void _LogiLedSetLightingForKeyWithScanCode(int keyCode, int redPercentage, int g

contents += "}";

WriteToPipe(contents);
return WriteToPipe(contents);
}

return false;
}

void _LogiLedSetLightingForKeyWithHidCode(int keyCode, int redPercentage, int greenPercentage, int bluePercentage)
bool _LogiLedSetLightingForKeyWithHidCode(int keyCode, int redPercentage, int greenPercentage, int bluePercentage)
{
unsigned char redValue = (unsigned char)((redPercentage / 100.0f) * 255);
unsigned char greenValue = (unsigned char)((greenPercentage / 100.0f) * 255);
Expand All @@ -1110,7 +1116,7 @@ void _LogiLedSetLightingForKeyWithHidCode(int keyCode, int redPercentage, int gr
)
{
//No need to write on pipe, color did not change
return;
return true;
}

current_bitmap[(int)bit_location] = blueValue;
Expand All @@ -1128,11 +1134,13 @@ void _LogiLedSetLightingForKeyWithHidCode(int keyCode, int redPercentage, int gr

contents += "}";

WriteToPipe(contents);
return WriteToPipe(contents);
}

return false;
}

void _LogiLedSetLightingForKeyWithQuartzCode(int keyCode, int redPercentage, int greenPercentage, int bluePercentage)
bool _LogiLedSetLightingForKeyWithQuartzCode(int keyCode, int redPercentage, int greenPercentage, int bluePercentage)
{
unsigned char redValue = (unsigned char)((redPercentage / 100.0f) * 255);
unsigned char greenValue = (unsigned char)((greenPercentage / 100.0f) * 255);
Expand Down Expand Up @@ -1163,10 +1171,10 @@ void _LogiLedSetLightingForKeyWithQuartzCode(int keyCode, int redPercentage, int
return WriteToPipe(current_bitmap, ss.str());
}
*/
WriteToPipe(contents);
return WriteToPipe(contents);
}

void _LogiLedSetLightingForKeyWithKeyName(LogiLed::KeyName keyName, int redPercentage, int greenPercentage, int bluePercentage)
bool _LogiLedSetLightingForKeyWithKeyName(LogiLed::KeyName keyName, int redPercentage, int greenPercentage, int bluePercentage)
{
unsigned char redValue = (unsigned char)((redPercentage / 100.0f) * 255);
unsigned char greenValue = (unsigned char)((greenPercentage / 100.0f) * 255);
Expand All @@ -1185,7 +1193,7 @@ void _LogiLedSetLightingForKeyWithKeyName(LogiLed::KeyName keyName, int redPerce
)
{
//No need to write on pipe, color did not change
return;
return true;
}

current_bitmap[(int)bit_location] = blueValue;
Expand All @@ -1203,11 +1211,13 @@ void _LogiLedSetLightingForKeyWithKeyName(LogiLed::KeyName keyName, int redPerce

contents += "}";

WriteToPipe(contents);
return WriteToPipe(contents);
}

return false;
}

void _LogiLedFlashSingleKey(LogiLed::KeyName keyName, int redPercentage, int greenPercentage, int bluePercentage, int msDuration, int msInterval)
bool _LogiLedFlashSingleKey(LogiLed::KeyName keyName, int redPercentage, int greenPercentage, int bluePercentage, int msDuration, int msInterval)
{
unsigned char redValue = (unsigned char)((redPercentage / 100.0f) * 255);
unsigned char greenValue = (unsigned char)((greenPercentage / 100.0f) * 255);
Expand All @@ -1226,10 +1236,10 @@ void _LogiLedFlashSingleKey(LogiLed::KeyName keyName, int redPercentage, int gre

contents += '}';

WriteToPipe(contents);
return WriteToPipe(contents);
}

void _LogiLedPulseSingleKey(LogiLed::KeyName keyName, int startRedPercentage, int startGreenPercentage, int startBluePercentage, int finishRedPercentage, int finishGreenPercentage, int finishBluePercentage, int msDuration, bool isInfinite)
bool _LogiLedPulseSingleKey(LogiLed::KeyName keyName, int startRedPercentage, int startGreenPercentage, int startBluePercentage, int finishRedPercentage, int finishGreenPercentage, int finishBluePercentage, int msDuration, bool isInfinite)
{
unsigned char redValue = (unsigned char)((startRedPercentage / 100.0f) * 255);
unsigned char greenValue = (unsigned char)((startGreenPercentage / 100.0f) * 255);
Expand Down Expand Up @@ -1257,18 +1267,18 @@ void _LogiLedPulseSingleKey(LogiLed::KeyName keyName, int startRedPercentage, in

contents += '}';

WriteToPipe(contents);
return WriteToPipe(contents);
}

void _LogiLedStopEffectsOnKey(LogiLed::KeyName keyName)
bool _LogiLedStopEffectsOnKey(LogiLed::KeyName keyName)
{
std::string contents = "";
contents += "\"command\": \"StopEffectsOnKey\",";
contents += "\"command_data\": {";
contents += "\"key\": " + std::to_string(keyName);
contents += '}';

WriteToPipe(contents);
return WriteToPipe(contents);
}

bool LogiLedInitWithName(const char name[])
Expand Down Expand Up @@ -1369,9 +1379,7 @@ bool LogiLedSaveCurrentLighting()

bool LogiLedSetLighting(int redPercentage, int greenPercentage, int bluePercentage, int custom_mode = 0)
{
_LogiLedSetLighting(redPercentage, greenPercentage, bluePercentage, custom_mode);

return isInitialized;
return isInitialized &_LogiLedSetLighting(redPercentage, greenPercentage, bluePercentage, custom_mode);
}

bool LogiLedRestoreLighting()
Expand All @@ -1381,58 +1389,42 @@ bool LogiLedRestoreLighting()

bool LogiLedFlashLighting(int redPercentage, int greenPercentage, int bluePercentage, int milliSecondsDuration, int milliSecondsInterval)
{
_LogiLedFlashLighting(redPercentage, greenPercentage, bluePercentage, milliSecondsDuration, milliSecondsInterval);

return isInitialized;
return isInitialized & _LogiLedFlashLighting(redPercentage, greenPercentage, bluePercentage, milliSecondsDuration, milliSecondsInterval);
}

bool LogiLedPulseLighting(int redPercentage, int greenPercentage, int bluePercentage, int milliSecondsDuration, int milliSecondsInterval)
{
_LogiLedPulseLighting(redPercentage, greenPercentage, bluePercentage, milliSecondsDuration, milliSecondsInterval);

return isInitialized;
return isInitialized & _LogiLedPulseLighting(redPercentage, greenPercentage, bluePercentage, milliSecondsDuration, milliSecondsInterval);
}

bool LogiLedStopEffects()
{
_LogiLedStopEffects();

return isInitialized;
return isInitialized & _LogiLedStopEffects();
}

bool LogiLedSetLightingFromBitmap(unsigned char bitmap[])
{
_LogiLedSetLightingFromBitmap(bitmap);

return isInitialized;
return isInitialized & _LogiLedSetLightingFromBitmap(bitmap);
}

bool LogiLedSetLightingForKeyWithScanCode(int keyCode, int redPercentage, int greenPercentage, int bluePercentage)
{
_LogiLedSetLightingForKeyWithScanCode(keyCode, redPercentage, greenPercentage, bluePercentage);

return isInitialized;
return isInitialized & _LogiLedSetLightingForKeyWithScanCode(keyCode, redPercentage, greenPercentage, bluePercentage);
}

bool LogiLedSetLightingForKeyWithHidCode(int keyCode, int redPercentage, int greenPercentage, int bluePercentage)
{
_LogiLedSetLightingForKeyWithHidCode(keyCode, redPercentage, greenPercentage, bluePercentage);

return isInitialized;
return isInitialized & _LogiLedSetLightingForKeyWithHidCode(keyCode, redPercentage, greenPercentage, bluePercentage);
}

bool LogiLedSetLightingForKeyWithQuartzCode(int keyCode, int redPercentage, int greenPercentage, int bluePercentage)
{
_LogiLedSetLightingForKeyWithQuartzCode(keyCode, redPercentage, greenPercentage, bluePercentage);

return isInitialized;
return isInitialized & _LogiLedSetLightingForKeyWithQuartzCode(keyCode, redPercentage, greenPercentage, bluePercentage);
}

bool LogiLedSetLightingForKeyWithKeyName(LogiLed::KeyName keyName, int redPercentage, int greenPercentage, int bluePercentage)
{
_LogiLedSetLightingForKeyWithKeyName(keyName, redPercentage, greenPercentage, bluePercentage);

return isInitialized;
return isInitialized & _LogiLedSetLightingForKeyWithKeyName(keyName, redPercentage, greenPercentage, bluePercentage);
}

bool LogiLedSaveLightingForKey(LogiLed::KeyName keyName)
Expand All @@ -1447,23 +1439,17 @@ bool LogiLedRestoreLightingForKey(LogiLed::KeyName keyName)

bool LogiLedFlashSingleKey(LogiLed::KeyName keyName, int redPercentage, int greenPercentage, int bluePercentage, int msDuration, int msInterval)
{
_LogiLedFlashSingleKey(keyName, redPercentage, greenPercentage, bluePercentage, msDuration, msInterval);

return isInitialized;
return isInitialized & _LogiLedFlashSingleKey(keyName, redPercentage, greenPercentage, bluePercentage, msDuration, msInterval);
}

bool LogiLedPulseSingleKey(LogiLed::KeyName keyName, int startRedPercentage, int startGreenPercentage, int startBluePercentage, int finishRedPercentage, int finishGreenPercentage, int finishBluePercentage, int msDuration, bool isInfinite)
{
_LogiLedPulseSingleKey(keyName, startRedPercentage, startGreenPercentage, startBluePercentage, finishRedPercentage, finishGreenPercentage, finishBluePercentage, msDuration, isInfinite);

return isInitialized;
return isInitialized & _LogiLedPulseSingleKey(keyName, startRedPercentage, startGreenPercentage, startBluePercentage, finishRedPercentage, finishGreenPercentage, finishBluePercentage, msDuration, isInfinite);
}

bool LogiLedStopEffectsOnKey(LogiLed::KeyName keyName)
{
_LogiLedStopEffectsOnKey(keyName);

return isInitialized;
return isInitialized & _LogiLedStopEffectsOnKey(keyName);
}

void LogiLedShutdown()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Drawing;
using AuraServiceLib;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@
VerticalAlignment="Stretch"
Height="auto">
<StackPanel Orientation="Vertical">
<CheckBox Content="Enabled" Name="DeviceEnabledCheckBox" IsChecked="False"/>
<StackPanel Orientation="Horizontal" >
<CheckBox Content="Enabled" Name="DeviceEnabledCheckBox" IsChecked="False"/>
<Button Name="SetAllNone" Content="Set All None" DockPanel.Dock="Top" Click="SetAllNone_Click" ToolTip="Set all of the lights to NONE"/>
<Button Name="SetAllLogo" Content="Set All Logo" DockPanel.Dock="Top" Click="SetAllLogo_Click" ToolTip="Set all of the lights to PERIPHERAL_LOGO"/>
</StackPanel>
<StackPanel Orientation="Vertical" Name="AsusDeviceKeys">
<config:AsusKeyToDeviceKeyControl/>
</StackPanel>
Expand Down
Loading