Added configurable LED sample size

This commit is contained in:
SpoinkyNL committed 2019-12-19 23:18:09 +01:00
1 parent 04bc8f013a
commit eb963eb409
10 files changed
+132 -17

No files matched your search

@@ -45,8 +45,13 @@ namespace Artemis.UI.Screens.Settings
TargetFrameRates = new List<Tuple<string, int>>();
for (var i = 10; i <= 30; i += 5)
TargetFrameRates.Add(new Tuple<string, int>(i + " FPS", i));
// Anything else is kinda broken right now
SampleSizes = new List<int> {1, 9};
}
public List<int> SampleSizes { get; set; }
public BindableCollection<DeviceSettingsViewModel> DeviceSettingsViewModels { get; set; }
public List<Tuple<string, double>> RenderScales { get; set; }
@@ -61,7 +66,7 @@ namespace Artemis.UI.Screens.Settings
{
get => TargetFrameRates.FirstOrDefault(t => Math.Abs(t.Item2 - TargetFrameRate) < 0.01);
set => TargetFrameRate = value.Item2;
}
}
public double RenderScale
{
@@ -85,6 +90,16 @@ namespace Artemis.UI.Screens.Settings
}
}
public int SampleSize
{
get => _settingsService.GetSetting("Core.SampleSize", 1).Value;
set
{
_settingsService.GetSetting("Core.SampleSize", 1).Value = value;
_settingsService.GetSetting("Core.SampleSize", 1).Save();
}
}
public string Title => "Settings";
protected override void OnActivate()