diff --git a/Project-Aurora/Project-Aurora/Profiles/Osu/Control_Osu.xaml b/Project-Aurora/Project-Aurora/Profiles/Osu/Control_Osu.xaml index 4cf8fa855..6dae5b7ac 100644 --- a/Project-Aurora/Project-Aurora/Profiles/Osu/Control_Osu.xaml +++ b/Project-Aurora/Project-Aurora/Profiles/Osu/Control_Osu.xaml @@ -23,7 +23,7 @@ - Aurora GSI OsuSync plugin GitLab repo + Aurora GSI OsuSync plugin GitLab repo diff --git a/Project-Aurora/Project-Aurora/Settings/Configuration.cs b/Project-Aurora/Project-Aurora/Settings/Configuration.cs index b44d30017..2c6040e22 100755 --- a/Project-Aurora/Project-Aurora/Settings/Configuration.cs +++ b/Project-Aurora/Project-Aurora/Settings/Configuration.cs @@ -555,7 +555,7 @@ public Configuration() devices_disabled.Add(typeof(Devices.Dualshock.DualshockDevice)); devices_disabled.Add(typeof(Devices.AtmoOrbDevice.AtmoOrbDevice)); devices_disabled.Add(typeof(Devices.NZXT.NZXTDevice)); - OverlaysInPreview = false; + OverlaysInPreview = true; //Blackout and Night theme time_based_dimming_enabled = false; diff --git a/Project-Aurora/Project-Aurora/Settings/Layers/AmbilightLayerHandler.cs b/Project-Aurora/Project-Aurora/Settings/Layers/AmbilightLayerHandler.cs index 74069f507..3037f8837 100644 --- a/Project-Aurora/Project-Aurora/Settings/Layers/AmbilightLayerHandler.cs +++ b/Project-Aurora/Project-Aurora/Settings/Layers/AmbilightLayerHandler.cs @@ -176,7 +176,7 @@ public override void Default() this._Coordinates = new Rectangle(0, 0, 0, 0); this._AmbilightQuality = AmbilightQuality.Medium; this._BrightenImage = false; - this._BrightnessChange = 0.0f; + this._BrightnessChange = 1.0f; this._SaturateImage = false; this._SaturationChange = 1.0f; this._FlipVertically = false; diff --git a/Project-Aurora/Project-Aurora/Settings/Layers/Control_AnimationLayer.xaml.cs b/Project-Aurora/Project-Aurora/Settings/Layers/Control_AnimationLayer.xaml.cs index 0b9d9ea91..56d1fb25b 100644 --- a/Project-Aurora/Project-Aurora/Settings/Layers/Control_AnimationLayer.xaml.cs +++ b/Project-Aurora/Project-Aurora/Settings/Layers/Control_AnimationLayer.xaml.cs @@ -238,7 +238,7 @@ private void stackModeCb_SelectionChanged(object sender, SelectionChangedEventAr private void btnInfo_Click(object sender, RoutedEventArgs e) { // Open the online documentation for the Animation Trigger properties - Process.Start(new ProcessStartInfo(@"https://wibble199.github.io/Aurora-Docs/advanced-topics/animation-editor/")); + Process.Start(new ProcessStartInfo(@"https://aurora-rgb.github.io/Docs/advanced-topics/animation-editor/")); } private void whileKeyHeldTerminate_Checked(object sender, RoutedEventArgs e) { diff --git a/Project-Aurora/Project-Aurora/Settings/Overrides/Control_OverridesEditor.xaml.cs b/Project-Aurora/Project-Aurora/Settings/Overrides/Control_OverridesEditor.xaml.cs index a0a96f0c0..45a65d2e0 100644 --- a/Project-Aurora/Project-Aurora/Settings/Overrides/Control_OverridesEditor.xaml.cs +++ b/Project-Aurora/Project-Aurora/Settings/Overrides/Control_OverridesEditor.xaml.cs @@ -141,7 +141,7 @@ public void ForcePropertyListUpdate() { private void HelpButton_Click(object sender, RoutedEventArgs e) { // Open the overrides page on the documentation page - Process.Start(new ProcessStartInfo(@"https://wibble199.github.io/Aurora-Docs/advanced-topics/overrides-system/")); + Process.Start(new ProcessStartInfo(@"https://aurora-rgb.github.io/Docs/advanced-topics/overrides-system/")); } #endregion } diff --git a/Project-Aurora/Project-Aurora/Utils/HardwareMonitor.cs b/Project-Aurora/Project-Aurora/Utils/HardwareMonitor.cs index 1ed0fe2b9..1c903a1c7 100644 --- a/Project-Aurora/Project-Aurora/Utils/HardwareMonitor.cs +++ b/Project-Aurora/Project-Aurora/Utils/HardwareMonitor.cs @@ -75,28 +75,6 @@ public static bool TryDump() } } - private static ISensor FindSensor(this IHardware hardware, string identifier) - { - var result = hardware.Sensors.OrderBy(s => s.Identifier).FirstOrDefault(s => s.Identifier.ToString().Contains(identifier)); - if (result is null) - { - Global.logger.Error( - $"[HardwareMonitor] Failed to find sensor \"{identifier}\" in {hardware.Name} of type {hardware.HardwareType}."); - } - return result; - } - - private static ISensor FindSensor(this IHardware hardware, SensorType type) - { - var result = hardware.Sensors.OrderBy(s => s.Identifier).FirstOrDefault(s => s.SensorType == type); - if (result is null) - { - Global.logger.Error( - $"[HardwareMonitor] Failed to find sensor of type \"{type}\" in {hardware.Name} of type {hardware.HardwareType}."); - } - return result; - } - public abstract class HardwareUpdater { private const int MAX_QUEUE = 8; @@ -105,11 +83,11 @@ public abstract class HardwareUpdater private readonly Timer _useTimer; private readonly Timer _updateTimer; - private readonly Queue _values; + private readonly Dictionary> _queues; protected HardwareUpdater() { - _values = new Queue(MAX_QUEUE); + _queues = new Dictionary>(); _useTimer = new Timer(5000); _useTimer.Elapsed += (a, b) => { @@ -135,14 +113,43 @@ protected float GetValue(ISensor sensor) _useTimer.Stop(); _useTimer.Start(); - if (_values.Count == MAX_QUEUE) - _values.Dequeue(); - _values.Enqueue(sensor?.Value ?? 0); + if (!_queues.TryGetValue(sensor.Identifier, out var values)) + return 0; + + if (values.Count == MAX_QUEUE) + values.Dequeue(); + values.Enqueue(sensor?.Value ?? 0); - return Global.Configuration.HardwareMonitorUseAverageValues ? - _values.Average() : + return Global.Configuration.HardwareMonitorUseAverageValues ? + values.Average() : sensor?.Value ?? 0; } + + protected ISensor FindSensor(string identifier) + { + var result = hw.Sensors.OrderBy(s => s.Identifier).FirstOrDefault(s => s.Identifier.ToString().Contains(identifier)); + if (result is null) + { + Global.logger.Error( + $"[HardwareMonitor] Failed to find sensor \"{identifier}\" in {hw.Name} of type {hw.HardwareType}."); + return null; + } + _queues.Add(result.Identifier, new Queue(MAX_QUEUE)); + return result; + } + + protected ISensor FindSensor(SensorType type) + { + var result = hw.Sensors.OrderBy(s => s.Identifier).FirstOrDefault(s => s.SensorType == type); + if (result is null) + { + Global.logger.Error( + $"[HardwareMonitor] Failed to find sensor of type \"{type}\" in {hw.Name} of type {hw.HardwareType}."); + return null; + } + _queues.Add(result.Identifier, new Queue(MAX_QUEUE)); + return result; + } } public sealed class GPUUpdater : HardwareUpdater @@ -170,10 +177,10 @@ public GPUUpdater(IEnumerable hardware) Global.logger.Error("[HardwareMonitor] Could not find hardware of type GPU"); return; } - _GPULoad = hw.FindSensor(SensorType.Load); - _GPUTemp = hw.FindSensor(SensorType.Temperature); - _GPUFan = hw.FindSensor(SensorType.Fan); - _GPUPower = hw.FindSensor(SensorType.Power); + _GPULoad = FindSensor(SensorType.Load); + _GPUTemp = FindSensor(SensorType.Temperature); + _GPUFan = FindSensor(SensorType.Fan); + _GPUPower = FindSensor(SensorType.Power); } } @@ -198,9 +205,9 @@ public CPUUpdater(IEnumerable hardware) Global.logger.Error("[HardwareMonitor] Could not find hardware of type CPU"); return; } - _CPUTemp = hw.FindSensor(SensorType.Temperature); - _CPULoad = hw.FindSensor(SensorType.Load); - _CPUPower = hw.FindSensor(SensorType.Power); + _CPUTemp = FindSensor(SensorType.Temperature); + _CPULoad = FindSensor(SensorType.Load); + _CPUPower = FindSensor(SensorType.Power); } } @@ -222,8 +229,8 @@ public RAMUpdater(IEnumerable hws) Global.logger.Error("[HardwareMonitor] Could not find hardware of type RAM"); return; } - _RAMUsed = hw.FindSensor("data/0"); - _RAMFree = hw.FindSensor("data/1"); + _RAMUsed = FindSensor("data/0"); + _RAMFree = FindSensor("data/1"); } } @@ -248,9 +255,9 @@ public NETUpdater(IEnumerable hws) Global.logger.Error("[HardwareMonitor] Could not find hardware of type Network"); return; } - _BandwidthUsed = hw.FindSensor(SensorType.Load); - _UploadSpeed = hw.FindSensor("throughput/7"); - _DownloadSpeed = hw.FindSensor("throughput/8"); + _BandwidthUsed = FindSensor(SensorType.Load); + _UploadSpeed = FindSensor("throughput/7"); + _DownloadSpeed = FindSensor("throughput/8"); } } }