diff options
| author | Jacob Palecki <[email protected]> | 2020-09-01 02:18:41 -0700 |
|---|---|---|
| committer | Jacob Palecki <[email protected]> | 2020-09-01 02:18:41 -0700 |
| commit | 246fb772c5bf7dd6a85143fadebece3b4d9f1e04 (patch) | |
| tree | 454c869d44c69a0e7603ceb1e03de8a3e4f5e70a /grapher/Models/Serialized/DriverSettings.cs | |
| parent | Show xy charts only when accel applied by component (diff) | |
| download | rawaccel-246fb772c5bf7dd6a85143fadebece3b4d9f1e04.tar.xz rawaccel-246fb772c5bf7dd6a85143fadebece3b4d9f1e04.zip | |
Add constants class and separate classes into regions
Diffstat (limited to 'grapher/Models/Serialized/DriverSettings.cs')
| -rw-r--r-- | grapher/Models/Serialized/DriverSettings.cs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/grapher/Models/Serialized/DriverSettings.cs b/grapher/Models/Serialized/DriverSettings.cs index 91d7e9f..e0b5d4a 100644 --- a/grapher/Models/Serialized/DriverSettings.cs +++ b/grapher/Models/Serialized/DriverSettings.cs @@ -3,11 +3,17 @@ using System.Runtime.InteropServices; namespace grapher.Models.Serialized { + #region Enumerations + public enum AccelMode { linear, classic, natural, logarithmic, sigmoid, naturalgain, sigmoidgain, power, noaccel } + #endregion Enumerations + + #region Structs + [StructLayout(LayoutKind.Sequential)] public struct AccelArgs { @@ -31,10 +37,14 @@ namespace grapher.Models.Serialized public T y; } + #endregion Structs + [StructLayout(LayoutKind.Sequential)] [Serializable] public class DriverSettings { + #region Fields + private static readonly IntPtr UnmanagedSettingsHandle = Marshal.AllocHGlobal(Marshal.SizeOf<DriverSettings>()); @@ -45,6 +55,10 @@ namespace grapher.Models.Serialized public Vec2<double> sensitivity; public double minimumTime; + #endregion Fields + + #region Methods + public static DriverSettings GetActive() { DriverInterop.GetActiveSettings(UnmanagedSettingsHandle); @@ -83,5 +97,7 @@ namespace grapher.Models.Serialized */ return true; } + + #endregion Methods } } |