1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-13 05:48:35 +00:00

Corsair - Added Dominator Platinum RGB layout

Core - Improved startup logging
This commit is contained in:
SpoinkyNL 2020-06-21 23:50:43 +02:00
parent f18edc4f36
commit a93875e680
8 changed files with 236 additions and 19 deletions

View File

@ -17,6 +17,16 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<PropertyGroup>
<NrtRevisionFormat>2.0-{chash:6}</NrtRevisionFormat>
<NrtResolveSimpleAttributes>true</NrtResolveSimpleAttributes>
<NrtResolveInformationalAttribute>true</NrtResolveInformationalAttribute>
<NrtResolveCopyright>true</NrtResolveCopyright>
<NrtTagMatch>v[0-9]*</NrtTagMatch>
<NrtRemoveTagV>true</NrtRemoveTagV>
<NrtRequiredVcs>git</NrtRequiredVcs>
<NrtShowRevision>true</NrtShowRevision>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Artemis.Storage\Artemis.Storage.csproj">
<Private>false</Private>
@ -43,6 +53,10 @@
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0" />
<PackageReference Include="System.Reflection.Metadata" Version="1.8.0" />
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
<PackageReference Include="Unclassified.NetRevisionTask" Version="0.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Reference Include="RGB.NET.Brushes">

View File

@ -67,31 +67,51 @@ namespace Artemis.Core.Models.Surface
public double X
{
get => DeviceEntity.X;
set => DeviceEntity.X = value;
set
{
DeviceEntity.X = value;
NotifyOfPropertyChange(nameof(X));
}
}
public double Y
{
get => DeviceEntity.Y;
set => DeviceEntity.Y = value;
set
{
DeviceEntity.Y = value;
NotifyOfPropertyChange(nameof(Y));
}
}
public double Rotation
{
get => DeviceEntity.Rotation;
set => DeviceEntity.Rotation = value;
set
{
DeviceEntity.Rotation = value;
NotifyOfPropertyChange(nameof(Rotation));
}
}
public double Scale
{
get => DeviceEntity.Scale;
set => DeviceEntity.Scale = value;
set
{
DeviceEntity.Scale = value;
NotifyOfPropertyChange(nameof(Scale));
}
}
public int ZIndex
{
get => DeviceEntity.ZIndex;
set => DeviceEntity.ZIndex = value;
set
{
DeviceEntity.ZIndex = value;
NotifyOfPropertyChange(nameof(ZIndex));
}
}
public override string ToString()

View File

@ -1,11 +1,11 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using Artemis.Core.Events;
using Artemis.Core.Exceptions;
using Artemis.Core.JsonConverters;
using Artemis.Core.Ninject;
using Artemis.Core.Plugins.Abstract;
using Artemis.Core.Plugins.Models;
using Artemis.Core.Services.Interfaces;
using Artemis.Core.Services.Storage.Interfaces;
@ -15,6 +15,7 @@ using RGB.NET.Core;
using Serilog;
using Serilog.Events;
using SkiaSharp;
using Module = Artemis.Core.Plugins.Abstract.Module;
namespace Artemis.Core.Services
{
@ -73,7 +74,8 @@ namespace Artemis.Core.Services
if (IsInitialized)
throw new ArtemisCoreException("Cannot initialize the core as it is already initialized.");
_logger.Information("Initializing Artemis Core version {version}", typeof(CoreService).Assembly.GetName().Version);
var versionAttribute = typeof(CoreService).Assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>();
_logger.Information("Initializing Artemis Core version {version}", versionAttribute?.InformationalVersion);
ApplyLoggingLevel();
// Initialize the services

View File

@ -75,8 +75,7 @@ namespace Artemis.Core.Services
var metadataFile = Path.Combine(match.FullName, "plugin.json");
if (!File.Exists(metadataFile))
{
_logger.Information("Copying missing built-in plugin {name} version: {version}",
builtInPluginInfo.Name, builtInPluginInfo.Version);
_logger.Debug("Copying missing built-in plugin {builtInPluginInfo}", builtInPluginInfo);
CopyBuiltInPlugin(subDirectory);
}
else
@ -88,15 +87,13 @@ namespace Artemis.Core.Services
#if DEBUG
if (builtInPluginInfo.Version >= pluginInfo.Version)
{
_logger.Information("Copying updated built-in plugin {name} version: {version} (old version: {oldVersion})",
builtInPluginInfo.Name, builtInPluginInfo.Version, pluginInfo.Version);
_logger.Debug("Copying updated built-in plugin {builtInPluginInfo}", builtInPluginInfo);
CopyBuiltInPlugin(subDirectory);
}
#else
if (builtInPluginInfo.Version > pluginInfo.Version)
if (builtInPluginInfo.Version > pluginInfo.Version)
{
_logger.Information("Copying updated built-in plugin {name} version: {version} (old version: {oldVersion})",
builtInPluginInfo.Name, builtInPluginInfo.Version, pluginInfo.Version);
_logger.Debug("Copying updated built-in plugin from {pluginInfo} to {builtInPluginInfo}", pluginInfo, builtInPluginInfo);
CopyBuiltInPlugin(subDirectory);
}
#endif
@ -139,6 +136,8 @@ namespace Artemis.Core.Services
// Locate the main entry
var pluginInfo = JsonConvert.DeserializeObject<PluginInfo>(File.ReadAllText(metadataFile));
pluginInfo.Directory = subDirectory;
_logger.Debug("Loading plugin {pluginInfo}", pluginInfo);
OnPluginLoading(new PluginEventArgs(pluginInfo));
LoadPlugin(pluginInfo);
}
@ -165,11 +164,12 @@ namespace Artemis.Core.Services
var threwException = false;
try
{
_logger.Debug("Enabling plugin {pluginInfo}", pluginInfo);
pluginInfo.Instance.SetEnabled(true);
}
catch (Exception e)
{
_logger.Warning(new ArtemisPluginException(pluginInfo, "Failed to load enable plugin", e), "Plugin exception");
_logger.Warning(new ArtemisPluginException(pluginInfo, "Failed to enable plugin", e), "Plugin exception");
pluginInfo.Enabled = false;
threwException = true;
}

View File

@ -18,6 +18,16 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<DebugType>pdbonly</DebugType>
</PropertyGroup>
<PropertyGroup>
<NrtRevisionFormat>2.0-{chash:6}</NrtRevisionFormat>
<NrtResolveSimpleAttributes>true</NrtResolveSimpleAttributes>
<NrtResolveInformationalAttribute>true</NrtResolveInformationalAttribute>
<NrtResolveCopyright>true</NrtResolveCopyright>
<NrtTagMatch>v[0-9]*</NrtTagMatch>
<NrtRemoveTagV>true</NrtRemoveTagV>
<NrtRequiredVcs>git</NrtRequiredVcs>
<NrtShowRevision>true</NrtShowRevision>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AvalonEdit" Version="6.0.1" />
<PackageReference Include="Fody" Version="6.2.0">
@ -35,6 +45,10 @@
<PackageReference Include="Stylet" Version="1.3.2" />
<PackageReference Include="System.Buffers" Version="4.5.0" />
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0" />
<PackageReference Include="Unclassified.NetRevisionTask" Version="0.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="WriteableBitmapEx" Version="1.6.5" />
</ItemGroup>
<ItemGroup>

View File

@ -93,10 +93,7 @@ namespace Artemis.UI.Screens
private void UpdateWindowTitle()
{
var versionAttribute = typeof(RootViewModel).Assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>();
if (versionAttribute != null)
WindowTitle = $"Artemis {versionAttribute.InformationalVersion} - Frame time: {_coreService.FrameTime.TotalMilliseconds:F2} ms";
else
WindowTitle = $"Artemis - Frame time: {_coreService.FrameTime.TotalMilliseconds:F2} ms";
WindowTitle = $"Artemis {versionAttribute?.InformationalVersion} - Frame time: {_coreService.FrameTime.TotalMilliseconds:F2} ms";
}
private void SidebarViewModelOnPropertyChanged(object sender, PropertyChangedEventArgs e)

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

View File

@ -0,0 +1,170 @@
<?xml version="1.0"?>
<Device xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Name>Corsair Dominator Platinum RGB</Name>
<Description>Physical layout of Corsairs Dominator Platinum RGB</Description>
<Type>DRAM</Type>
<Lighting>Key</Lighting>
<Vendor>Corsair</Vendor>
<Model>GLAIVE RGB</Model>
<Width>9</Width>
<Height>135</Height>
<LedUnitWidth>6</LedUnitWidth>
<LedUnitHeight>6</LedUnitHeight>
<ImageBasePath>Images\Corsair\Memory</ImageBasePath>
<DeviceImage>DOMINATORPLATINUMRGB.png</DeviceImage>
<Leds>
<Led Id="DRAM1">
<X>1.5</X>
<Y>10.5</Y>
<Width>1</Width>
</Led>
<Led Id="DRAM2">
<X>=</X>
<Y>+1.6</Y>
</Led>
<Led Id="DRAM3">
<X>=</X>
<Y>+1.2</Y>
</Led>
<Led Id="DRAM4">
<X>=</X>
<Y>+1.7</Y>
</Led>
<Led Id="DRAM5">
<X>=</X>
<Y>+1.3</Y>
</Led>
<Led Id="DRAM6">
<X>=</X>
<Y>+5.5</Y>
<Height>2.4</Height>
</Led>
<Led Id="DRAM7">
<X>=</X>
<Y>+</Y>
<Height>2.4</Height>
</Led>
<Led Id="DRAM8">
<X>=</X>
<Y>+5.3</Y>
</Led>
<Led Id="DRAM9">
<X>=</X>
<Y>+1.8</Y>
</Led>
<Led Id="DRAM10">
<X>=</X>
<Y>+1.8</Y>
</Led>
<Led Id="DRAM11">
<X>=</X>
<Y>+1.5</Y>
</Led>
<Led Id="DRAM12">
<X>=</X>
<Y>+1.8</Y>
</Led>
</Leds>
<LedImageLayouts>
<LedImageLayout>
<LedImages>
<LedImage Id="DRAM1" />
</LedImages>
</LedImageLayout>
<LedImageLayout>
<LedImages>
<LedImage Id="DRAM2" />
</LedImages>
</LedImageLayout>
<LedImageLayout>
<LedImages>
<LedImage Id="DRAM3" />
</LedImages>
</LedImageLayout>
<LedImageLayout>
<LedImages>
<LedImage Id="DRAM4" />
</LedImages>
</LedImageLayout>
<LedImageLayout>
<LedImages>
<LedImage Id="DRAM5" />
</LedImages>
</LedImageLayout>
<LedImageLayout>
<LedImages>
<LedImage Id="DRAM6" />
</LedImages>
</LedImageLayout>
<LedImageLayout>
<LedImages>
<LedImage Id="DRAM7" />
</LedImages>
</LedImageLayout>
<LedImageLayout>
<LedImages>
<LedImage Id="DRAM8" />
</LedImages>
</LedImageLayout>
<LedImageLayout>
<LedImages>
<LedImage Id="DRAM9" />
</LedImages>
</LedImageLayout>
<LedImageLayout>
<LedImages>
<LedImage Id="DRAM10" />
</LedImages>
</LedImageLayout>
<LedImageLayout>
<LedImages>
<LedImage Id="DRAM11" />
</LedImages>
</LedImageLayout>
<LedImageLayout>
<LedImages>
<LedImage Id="DRAM12" />
</LedImages>
</LedImageLayout>
<LedImageLayout>
<LedImages>
<LedImage Id="DRAM1" />
</LedImages>
</LedImageLayout>
<LedImageLayout>
<LedImages>
<LedImage Id="DRAM2" />
</LedImages>
</LedImageLayout>
<LedImageLayout>
<LedImages>
<LedImage Id="DRAM3" />
</LedImages>
</LedImageLayout>
<LedImageLayout>
<LedImages>
<LedImage Id="DRAM4" />
</LedImages>
</LedImageLayout>
<LedImageLayout>
<LedImages>
<LedImage Id="DRAM5" />
</LedImages>
</LedImageLayout>
<LedImageLayout>
<LedImages>
<LedImage Id="DRAM6" />
</LedImages>
</LedImageLayout>
<LedImageLayout>
<LedImages>
<LedImage Id="DRAM7" />
</LedImages>
</LedImageLayout>
<LedImageLayout>
<LedImages>
<LedImage Id="DRAM8" />
</LedImages>
</LedImageLayout>
</LedImageLayouts>
</Device>