From 6f069482a253fe5f005b5770d342250bff75ee5e Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Wed, 12 Jul 2017 08:04:37 -0500 Subject: [PATCH 01/24] Minor optimizations --- DS4Windows/DS4Control/MouseCursor.cs | 4 +-- DS4Windows/DS4Control/ScpUtil.cs | 6 ++-- DS4Windows/DS4Forms/DS4Form.cs | 5 ++- DS4Windows/DS4Library/DS4Device.cs | 34 +++++++++----------- DS4Windows/DS4Library/DS4Sixaxis.cs | 46 ++++++---------------------- 5 files changed, 33 insertions(+), 62 deletions(-) diff --git a/DS4Windows/DS4Control/MouseCursor.cs b/DS4Windows/DS4Control/MouseCursor.cs index 2ad11da..0ab7284 100644 --- a/DS4Windows/DS4Control/MouseCursor.cs +++ b/DS4Windows/DS4Control/MouseCursor.cs @@ -36,8 +36,8 @@ namespace DS4Windows public virtual void sixaxisMoved(SixAxisEventArgs arg) { int deltaX = 0, deltaY = 0; - deltaX = -arg.sixAxis.gyroXFull; - deltaY = -arg.sixAxis.gyroYFull; + deltaX = -arg.sixAxis.gyroYawFull; + deltaY = -arg.sixAxis.gyroPitchFull; //Console.WriteLine(arg.sixAxis.deltaX); gyroSmooth = Global.getGyroSmoothing(deviceNumber); diff --git a/DS4Windows/DS4Control/ScpUtil.cs b/DS4Windows/DS4Control/ScpUtil.cs index aff4d60..4c2000e 100644 --- a/DS4Windows/DS4Control/ScpUtil.cs +++ b/DS4Windows/DS4Control/ScpUtil.cs @@ -1167,7 +1167,7 @@ namespace DS4Windows public double[] rainbow = { 0, 0, 0, 0, 0 }; public int[] flashAt = { 0, 0, 0, 0, 0 }; public bool[] mouseAccel = { true, true, true, true, true }; - public int[] btPollRate = { 0, 0, 0, 0, 0 }; + public int[] btPollRate = { 4, 4, 4, 4, 4 }; public int[] lsOutCurveMode = { 0, 0, 0, 0, 0 }; public int[] rsOutCurveMode = { 0, 0, 0, 0, 0 }; @@ -2440,7 +2440,7 @@ namespace DS4Windows int.TryParse(Item.InnerText, out temp); btPollRate[device] = (temp >= 0 && temp <= 16) ? temp : 0; } - catch { btPollRate[device] = 0; missingSetting = true; } + catch { btPollRate[device] = 4; missingSetting = true; } try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/LSOutputCurveMode"); lsOutCurveMode[device] = outputCurveId(Item.InnerText); } catch { lsOutCurveMode[device] = 0; missingSetting = true; } @@ -3449,7 +3449,7 @@ namespace DS4Windows rainbow[device] = 0; flashAt[device] = 0; mouseAccel[device] = true; - btPollRate[device] = 0; + btPollRate[device] = 4; m_LowLeds[device] = new DS4Color(Color.Black); diff --git a/DS4Windows/DS4Forms/DS4Form.cs b/DS4Windows/DS4Forms/DS4Form.cs index b60cbb1..afdd09a 100644 --- a/DS4Windows/DS4Forms/DS4Form.cs +++ b/DS4Windows/DS4Forms/DS4Form.cs @@ -1701,7 +1701,7 @@ namespace DS4Windows private void Profile_Changed_Menu(object sender, ToolStripItemClickedEventArgs e) { ToolStripMenuItem tS = (ToolStripMenuItem)sender; - int tdevice = Int32.Parse(tS.Tag.ToString()); + int tdevice = Convert.ToInt32(tS.Tag); if (!(e.ClickedItem is ToolStripSeparator)) { if (e.ClickedItem != tS.DropDownItems[tS.DropDownItems.Count - 1]) //if +New Profile not selected @@ -2223,6 +2223,9 @@ namespace DS4Windows blankControllerTab(); Program.rootHub.Stop(); } + + // Make sure to stop event generation routines. Should fix odd crashes on shutdown + Application.Exit(); } private void cBSwipeProfiles_CheckedChanged(object sender, EventArgs e) diff --git a/DS4Windows/DS4Library/DS4Device.cs b/DS4Windows/DS4Library/DS4Device.cs index d4fa8cf..d3f9668 100644 --- a/DS4Windows/DS4Library/DS4Device.cs +++ b/DS4Windows/DS4Library/DS4Device.cs @@ -133,7 +133,6 @@ namespace DS4Windows private byte[] accel = new byte[6]; private byte[] gyro = new byte[6]; private byte[] inputReport; - //private byte[] inputReport2; private byte[] btInputReport = null; private byte[] outputReportBuffer, outputReport; private readonly DS4Touchpad touchpad = null; @@ -164,7 +163,7 @@ namespace DS4Windows public event EventHandler Removal = null; public event EventHandler SyncChange = null; public event EventHandler SerialChange = null; - public event EventHandler PublishRemoval = null; + //public event EventHandler PublishRemoval = null; public HidDevice HidDevice => hDevice; public bool IsExclusive => HidDevice.IsExclusive; @@ -415,7 +414,6 @@ namespace DS4Windows if (conType == ConnectionType.USB || conType == ConnectionType.SONYWA) { inputReport = new byte[64]; - //inputReport2 = new byte[64]; outputReport = new byte[hDevice.Capabilities.OutputReportByteLength]; outputReportBuffer = new byte[hDevice.Capabilities.OutputReportByteLength]; if (conType == ConnectionType.USB) @@ -668,8 +666,6 @@ namespace DS4Windows { oldCharging = charging; currerror = string.Empty; - curTimeDouble = sw.Elapsed.TotalMilliseconds; - curtime = sw.ElapsedMilliseconds; if (tempLatencyCount >= 50) { @@ -677,12 +673,9 @@ namespace DS4Windows tempLatencyCount--; } - lastTimeElapsed = curtime - oldtime; - lastTimeElapsedDouble = (curTimeDouble - oldTimeDouble); latencyQueue.Enqueue(this.lastTimeElapsed); tempLatencyCount++; - oldtime = curtime; - oldTimeDouble = curTimeDouble; + Latency = latencyQueue.Average(); if (conType == ConnectionType.BT) @@ -691,7 +684,6 @@ namespace DS4Windows //HidDevice.ReadStatus res = hDevice.ReadAsyncWithFileStream(btInputReport, READ_STREAM_TIMEOUT); HidDevice.ReadStatus res = hDevice.ReadWithFileStream(btInputReport); timeoutEvent = false; - //HidDevice.ReadStatus res = hDevice.ReadFileOverlapped(btInputReport, READ_STREAM_TIMEOUT); if (res == HidDevice.ReadStatus.Success) { Array.Copy(btInputReport, 2, inputReport, 0, inputReport.Length); @@ -705,7 +697,7 @@ namespace DS4Windows else { int winError = Marshal.GetLastWin32Error(); - Console.WriteLine(Mac.ToString() + " " + System.DateTime.UtcNow.ToString("o") + "> disconnect due to read failure: " + winError); + Console.WriteLine(Mac.ToString() + " " + DateTime.UtcNow.ToString("o") + "> disconnect due to read failure: " + winError); //Log.LogToGui(Mac.ToString() + " disconnected due to read failure: " + winError, true); } @@ -730,7 +722,6 @@ namespace DS4Windows //Array.Clear(inputReport, 0, inputReport.Length); //HidDevice.ReadStatus res = hDevice.ReadAsyncWithFileStream(inputReport, READ_STREAM_TIMEOUT); HidDevice.ReadStatus res = hDevice.ReadWithFileStream(inputReport); - //HidDevice.ReadStatus res = hDevice.ReadFileOverlapped(inputReport, READ_STREAM_TIMEOUT); if (res != HidDevice.ReadStatus.Success) { if (res == HidDevice.ReadStatus.WaitTimedOut) @@ -740,7 +731,7 @@ namespace DS4Windows else { int winError = Marshal.GetLastWin32Error(); - Console.WriteLine(Mac.ToString() + " " + System.DateTime.UtcNow.ToString("o") + "> disconnect due to read failure: " + winError); + Console.WriteLine(Mac.ToString() + " " + DateTime.UtcNow.ToString("o") + "> disconnect due to read failure: " + winError); //Log.LogToGui(Mac.ToString() + " disconnected due to read failure: " + winError, true); } @@ -757,12 +748,17 @@ namespace DS4Windows timeoutExecuted = true; return; } - else - { - //Array.Copy(inputReport2, 0, inputReport, 0, inputReport.Length); - } } + curTimeDouble = sw.Elapsed.TotalMilliseconds; + curtime = sw.ElapsedMilliseconds; + + lastTimeElapsed = curtime - oldtime; + lastTimeElapsedDouble = (curTimeDouble - oldTimeDouble); + + oldtime = curtime; + oldTimeDouble = curTimeDouble; + if (conType == ConnectionType.BT && btInputReport[0] != 0x11) { //Received incorrect report, skip it @@ -996,7 +992,7 @@ namespace DS4Windows //outputReportBuffer[1] = 0x80; //outputReportBuffer[1] = 0x84; outputReportBuffer[1] = (byte)(0x80 | btPollRate); // input report rate - // enable lightbar, rumble, flash + // enable rumble (0x01), lightbar (0x02), flash (0x04) outputReportBuffer[3] = 0xf7; outputReportBuffer[6] = rightLightFastRumble; // fast motor outputReportBuffer[7] = leftHeavySlowRumble; // slow motor @@ -1009,7 +1005,7 @@ namespace DS4Windows else { outputReportBuffer[0] = 0x05; - // enable lightbar, rumble, flash + // enable rumble (0x01), lightbar (0x02), flash (0x04) outputReportBuffer[1] = 0xf7; outputReportBuffer[4] = rightLightFastRumble; // fast motor outputReportBuffer[5] = leftHeavySlowRumble; // slow motor diff --git a/DS4Windows/DS4Library/DS4Sixaxis.cs b/DS4Windows/DS4Library/DS4Sixaxis.cs index a715c8b..d58e2dc 100644 --- a/DS4Windows/DS4Library/DS4Sixaxis.cs +++ b/DS4Windows/DS4Library/DS4Sixaxis.cs @@ -16,7 +16,7 @@ namespace DS4Windows public class SixAxis { public readonly int gyroX, gyroY, gyroZ, deltaX, deltaY, deltaZ, accelX, accelY, accelZ; - public readonly int gyroXFull, gyroYFull, gyroZFull; + public readonly int gyroYawFull, gyroPitchFull, gyroRollFull; public readonly int accelXFull, accelYFull, accelZFull; public readonly byte touchID; public readonly SixAxis previousAxis; @@ -25,9 +25,9 @@ namespace DS4Windows gyroX = X / 256; gyroY = Y / 256; gyroZ = Z / 256; - gyroXFull = X; - gyroYFull = Y; - gyroZFull = Z; + gyroYawFull = X; + gyroPitchFull = Y; + gyroRollFull = Z; accelX = aX / 64; accelY = aY / 64; @@ -56,42 +56,14 @@ namespace DS4Windows public void handleSixaxis(byte[] gyro, byte[] accel, DS4State state) { - //bool touchPadIsDown = sensors.TouchButton; - /*if (!PacketChanged(data, touchPacketOffset) && touchPadIsDown == lastTouchPadIsDown) - { - if (SixAxisUnchanged != null) - SixAxisUnchanged(this, EventArgs.Empty); - return; - }*/ - /* byte touchID1 = (byte)(data[0 + TOUCHPAD_DATA_OFFSET + touchPacketOffset] & 0x7F); - byte touchID2 = (byte)(data[4 + TOUCHPAD_DATA_OFFSET + touchPacketOffset] & 0x7F);*/ - - int currentX = (short)((ushort)(gyro[3] << 8) | gyro[2]); // Gyro Pitch - int currentY = (short)((ushort)(gyro[1] << 8) | gyro[0]); // Gyro Yaw + int currentX = (short)((ushort)(gyro[3] << 8) | gyro[2]); // Gyro Yaw + int currentY = (short)((ushort)(gyro[1] << 8) | gyro[0]); // Gyro Pitch int currentZ = (short)((ushort)(gyro[5] << 8) | gyro[4]); // Gyro Roll - int AccelX = (short)((ushort)(accel[1] << 8) | accel[0]); // Accel Pitch - int AccelY = (short)((ushort)(accel[3] << 8) | accel[2]); // Accel Roll - int AccelZ = (short)((ushort)(accel[5] << 8) | accel[4]); // Accel Yaw + int AccelX = (short)((ushort)(accel[1] << 8) | accel[0]); + int AccelY = (short)((ushort)(accel[3] << 8) | accel[2]); + int AccelZ = (short)((ushort)(accel[5] << 8) | accel[4]); SixAxisEventArgs args; - //if (sensors.Touch1 || sensors.Touch2) - { - /* if (SixAxisMoved != null) - { - SixAxis sPrev, now; - sPrev = new SixAxis(lastGyroX, lastGyroY, lastGyroZ, lastAX,lastAY,lastAZ); - now = new SixAxis(currentX, currentY, currentZ, AccelX, AccelY, AccelZ, sPrev); - args = new SixAxisEventArgs(state.ReportTimeStamp, now); - SixAxisMoved(this, args); - } - - lastGyroX = currentX; - lastGyroY = currentY; - lastGyroZ = currentZ; - lastAX = AccelX; - lastAY = AccelY; - lastAZ = AccelZ;*/ - } if (AccelX != 0 || AccelY != 0 || AccelZ != 0) { if (SixAccelMoved != null) From c0403fa7ab860e47db63d9fd2402d21e0b5c0654 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Wed, 12 Jul 2017 22:39:46 -0500 Subject: [PATCH 02/24] Add touchpad mouse axis inverting. Related to issue #83. --- DS4Windows/DS4Control/MouseCursor.cs | 10 +- DS4Windows/DS4Control/ScpUtil.cs | 17 +- DS4Windows/DS4Forms/Options.Designer.cs | 144 +- DS4Windows/DS4Forms/Options.cs | 21 + DS4Windows/DS4Forms/Options.resx | 4040 +++++------------------ 5 files changed, 1028 insertions(+), 3204 deletions(-) diff --git a/DS4Windows/DS4Control/MouseCursor.cs b/DS4Windows/DS4Control/MouseCursor.cs index 0ab7284..c65ffe5 100644 --- a/DS4Windows/DS4Control/MouseCursor.cs +++ b/DS4Windows/DS4Control/MouseCursor.cs @@ -32,6 +32,7 @@ namespace DS4Windows double verticalScale = 0.0; bool gyroSmooth = false; //double gyroSmoothWeight = 0.0; + int tempInt = 0; public virtual void sixaxisMoved(SixAxisEventArgs arg) { @@ -279,7 +280,7 @@ namespace DS4Windows } } - double coefficient = Global.TouchSensitivity[deviceNumber] / 100.0; + double coefficient = Global.TouchSensitivity[deviceNumber] * 0.01; // Collect rounding errors instead of losing motion. double xMotion = coefficient * deltaX; if (xMotion > 0.0) @@ -309,6 +310,13 @@ namespace DS4Windows int yAction = (int)yMotion; verticalRemainder = yMotion - yAction; + int touchpadInvert = tempInt = Global.getTouchpadInvert(deviceNumber); + if ((touchpadInvert & 0x02) == 2) + xAction *= -1; + + if ((touchpadInvert & 0x01) == 1) + yAction *= -1; + if (yAction != 0 || xAction != 0) InputMethods.MoveCursorBy(xAction, yAction); diff --git a/DS4Windows/DS4Control/ScpUtil.cs b/DS4Windows/DS4Control/ScpUtil.cs index 4c2000e..0d931c4 100644 --- a/DS4Windows/DS4Control/ScpUtil.cs +++ b/DS4Windows/DS4Control/ScpUtil.cs @@ -658,7 +658,13 @@ namespace DS4Windows } public static bool[] LowerRCOn => m_Config.lowerRCOn; - public static bool[] TouchpadJitterCompensation => m_Config.touchpadJitterCompensation; + public static bool[] TouchpadJitterCompensation => m_Config.touchpadJitterCompensation; + + public static int[] TouchpadInvert => m_Config.touchpadInvert; + public static int getTouchpadInvert(int index) + { + return m_Config.touchpadInvert[index]; + } public static byte[] L2Deadzone => m_Config.l2Deadzone; public static byte getL2Deadzone(int index) @@ -1164,6 +1170,7 @@ namespace DS4Windows public Byte[] tapSensitivity = { 0, 0, 0, 0, 0 }; public bool[] doubleTap = { false, false, false, false, false }; public int[] scrollSensitivity = { 0, 0, 0, 0, 0 }; + public int[] touchpadInvert = { 0, 0, 0, 0, 0 }; public double[] rainbow = { 0, 0, 0, 0, 0 }; public int[] flashAt = { 0, 0, 0, 0, 0 }; public bool[] mouseAccel = { true, true, true, true, true }; @@ -1447,6 +1454,7 @@ namespace DS4Windows XmlNode xmlScrollSensitivity = m_Xdoc.CreateNode(XmlNodeType.Element, "scrollSensitivity", null); xmlScrollSensitivity.InnerText = scrollSensitivity[device].ToString(); Node.AppendChild(xmlScrollSensitivity); XmlNode xmlLeftTriggerMiddle = m_Xdoc.CreateNode(XmlNodeType.Element, "LeftTriggerMiddle", null); xmlLeftTriggerMiddle.InnerText = l2Deadzone[device].ToString(); Node.AppendChild(xmlLeftTriggerMiddle); XmlNode xmlRightTriggerMiddle = m_Xdoc.CreateNode(XmlNodeType.Element, "RightTriggerMiddle", null); xmlRightTriggerMiddle.InnerText = r2Deadzone[device].ToString(); Node.AppendChild(xmlRightTriggerMiddle); + XmlNode xmlTouchpadInvert = m_Xdoc.CreateNode(XmlNodeType.Element, "TouchpadInvert", null); xmlTouchpadInvert.InnerText = touchpadInvert[device].ToString(); Node.AppendChild(xmlTouchpadInvert); XmlNode xmlL2AD = m_Xdoc.CreateNode(XmlNodeType.Element, "L2AntiDeadZone", null); xmlL2AD.InnerText = l2AntiDeadzone[device].ToString(); Node.AppendChild(xmlL2AD); XmlNode xmlR2AD = m_Xdoc.CreateNode(XmlNodeType.Element, "R2AntiDeadZone", null); xmlR2AD.InnerText = r2AntiDeadzone[device].ToString(); Node.AppendChild(xmlR2AD); XmlNode xmlL2Maxzone = m_Xdoc.CreateNode(XmlNodeType.Element, "L2MaxZone", null); xmlL2Maxzone.InnerText = l2Maxzone[device].ToString(); Node.AppendChild(xmlL2Maxzone); @@ -2190,12 +2198,18 @@ namespace DS4Windows catch { missingSetting = true; } try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/scrollSensitivity"); int.TryParse(Item.InnerText, out scrollSensitivity[device]); } catch { missingSetting = true; } + + try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/TouchpadInvert"); int temp = 0; int.TryParse(Item.InnerText, out temp); touchpadInvert[device] = Math.Min(Math.Max(temp, 0), 3); } + catch { touchpadInvert[device] = 0; missingSetting = true; } + try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/LeftTriggerMiddle"); byte.TryParse(Item.InnerText, out l2Deadzone[device]); } catch { missingSetting = true; } try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/RightTriggerMiddle"); byte.TryParse(Item.InnerText, out r2Deadzone[device]); } catch { missingSetting = true; } + try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/L2AntiDeadZone"); int.TryParse(Item.InnerText, out l2AntiDeadzone[device]); } catch { l2AntiDeadzone[device] = 0; missingSetting = true; } + try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/R2AntiDeadZone"); int.TryParse(Item.InnerText, out r2AntiDeadzone[device]); } catch { r2AntiDeadzone[device] = 0; missingSetting = true; } @@ -3446,6 +3460,7 @@ namespace DS4Windows tapSensitivity[device] = 0; doubleTap[device] = false; scrollSensitivity[device] = 0; + touchpadInvert[device] = 0; rainbow[device] = 0; flashAt[device] = 0; mouseAccel[device] = true; diff --git a/DS4Windows/DS4Forms/Options.Designer.cs b/DS4Windows/DS4Forms/Options.Designer.cs index 9403069..c9121b5 100644 --- a/DS4Windows/DS4Forms/Options.Designer.cs +++ b/DS4Windows/DS4Forms/Options.Designer.cs @@ -282,6 +282,11 @@ this.lsOutCurveComboBox = new System.Windows.Forms.ComboBox(); this.label10 = new System.Windows.Forms.Label(); this.label9 = new System.Windows.Forms.Label(); + this.tpRotation = new System.Windows.Forms.TabPage(); + this.nUDRSRotation = new System.Windows.Forms.NumericUpDown(); + this.label14 = new System.Windows.Forms.Label(); + this.nUDLSRotation = new System.Windows.Forms.NumericUpDown(); + this.label13 = new System.Windows.Forms.Label(); this.fLPSettings = new System.Windows.Forms.FlowLayoutPanel(); this.gBGyro = new System.Windows.Forms.GroupBox(); this.rBSAControls = new System.Windows.Forms.RadioButton(); @@ -337,11 +342,8 @@ this.pSToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.alwaysOnToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.advColorDialog = new DS4Windows.AdvancedColorDialog(); - this.tpRotation = new System.Windows.Forms.TabPage(); - this.label13 = new System.Windows.Forms.Label(); - this.nUDLSRotation = new System.Windows.Forms.NumericUpDown(); - this.label14 = new System.Windows.Forms.Label(); - this.nUDRSRotation = new System.Windows.Forms.NumericUpDown(); + this.touchpadInvertComboBox = new System.Windows.Forms.ComboBox(); + this.label15 = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.nUDRainbow)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.tBBlueBar)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.tBGreenBar)).BeginInit(); @@ -412,6 +414,9 @@ ((System.ComponentModel.ISupportInitialize)(this.nUDLSCurve)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nUDRSCurve)).BeginInit(); this.tPOutCurve.SuspendLayout(); + this.tpRotation.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.nUDRSRotation)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nUDLSRotation)).BeginInit(); this.fLPSettings.SuspendLayout(); this.gBGyro.SuspendLayout(); this.pnlSAMouse.SuspendLayout(); @@ -426,9 +431,6 @@ ((System.ComponentModel.ISupportInitialize)(this.nUDSXS)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nUDSZS)).BeginInit(); this.cMGyroTriggers.SuspendLayout(); - this.tpRotation.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nUDLSRotation)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.nUDRSRotation)).BeginInit(); this.SuspendLayout(); // // lowColorChooserButton @@ -887,6 +889,8 @@ // // pnlTPMouse // + this.pnlTPMouse.Controls.Add(this.label15); + this.pnlTPMouse.Controls.Add(this.touchpadInvertComboBox); this.pnlTPMouse.Controls.Add(this.nUDScroll); this.pnlTPMouse.Controls.Add(this.cBDoubleTap); this.pnlTPMouse.Controls.Add(this.cBScroll); @@ -2990,6 +2994,58 @@ resources.ApplyResources(this.label9, "label9"); this.label9.Name = "label9"; // + // tpRotation + // + this.tpRotation.Controls.Add(this.nUDRSRotation); + this.tpRotation.Controls.Add(this.label14); + this.tpRotation.Controls.Add(this.nUDLSRotation); + this.tpRotation.Controls.Add(this.label13); + resources.ApplyResources(this.tpRotation, "tpRotation"); + this.tpRotation.Name = "tpRotation"; + this.tpRotation.UseVisualStyleBackColor = true; + // + // nUDRSRotation + // + resources.ApplyResources(this.nUDRSRotation, "nUDRSRotation"); + this.nUDRSRotation.Maximum = new decimal(new int[] { + 180, + 0, + 0, + 0}); + this.nUDRSRotation.Minimum = new decimal(new int[] { + 180, + 0, + 0, + -2147483648}); + this.nUDRSRotation.Name = "nUDRSRotation"; + this.nUDRSRotation.ValueChanged += new System.EventHandler(this.nUDRSRotation_ValueChanged); + // + // label14 + // + resources.ApplyResources(this.label14, "label14"); + this.label14.Name = "label14"; + // + // nUDLSRotation + // + resources.ApplyResources(this.nUDLSRotation, "nUDLSRotation"); + this.nUDLSRotation.Maximum = new decimal(new int[] { + 180, + 0, + 0, + 0}); + this.nUDLSRotation.Minimum = new decimal(new int[] { + 180, + 0, + 0, + -2147483648}); + this.nUDLSRotation.Name = "nUDLSRotation"; + this.nUDLSRotation.ValueChanged += new System.EventHandler(this.nUDLSRotation_ValueChanged); + // + // label13 + // + resources.ApplyResources(this.label13, "label13"); + this.label13.Name = "label13"; + // // fLPSettings // resources.ApplyResources(this.fLPSettings, "fLPSettings"); @@ -3575,57 +3631,23 @@ resources.ApplyResources(this.alwaysOnToolStripMenuItem, "alwaysOnToolStripMenuItem"); this.alwaysOnToolStripMenuItem.CheckedChanged += new System.EventHandler(this.SATrigger_CheckedChanged); // - // tpRotation + // touchpadInvertComboBox // - this.tpRotation.Controls.Add(this.nUDRSRotation); - this.tpRotation.Controls.Add(this.label14); - this.tpRotation.Controls.Add(this.nUDLSRotation); - this.tpRotation.Controls.Add(this.label13); - resources.ApplyResources(this.tpRotation, "tpRotation"); - this.tpRotation.Name = "tpRotation"; - this.tpRotation.UseVisualStyleBackColor = true; + this.touchpadInvertComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.touchpadInvertComboBox.FormattingEnabled = true; + this.touchpadInvertComboBox.Items.AddRange(new object[] { + resources.GetString("touchpadInvertComboBox.Items"), + resources.GetString("touchpadInvertComboBox.Items1"), + resources.GetString("touchpadInvertComboBox.Items2"), + resources.GetString("touchpadInvertComboBox.Items3")}); + resources.ApplyResources(this.touchpadInvertComboBox, "touchpadInvertComboBox"); + this.touchpadInvertComboBox.Name = "touchpadInvertComboBox"; + this.touchpadInvertComboBox.SelectedIndexChanged += new System.EventHandler(this.touchpadInvertComboBox_SelectedIndexChanged); // - // label13 + // label15 // - resources.ApplyResources(this.label13, "label13"); - this.label13.Name = "label13"; - // - // nUDLSRotation - // - resources.ApplyResources(this.nUDLSRotation, "nUDLSRotation"); - this.nUDLSRotation.Maximum = new decimal(new int[] { - 180, - 0, - 0, - 0}); - this.nUDLSRotation.Minimum = new decimal(new int[] { - 180, - 0, - 0, - -2147483648}); - this.nUDLSRotation.Name = "nUDLSRotation"; - this.nUDLSRotation.ValueChanged += new System.EventHandler(this.nUDLSRotation_ValueChanged); - // - // label14 - // - resources.ApplyResources(this.label14, "label14"); - this.label14.Name = "label14"; - // - // nUDRSRotation - // - resources.ApplyResources(this.nUDRSRotation, "nUDRSRotation"); - this.nUDRSRotation.Maximum = new decimal(new int[] { - 180, - 0, - 0, - 0}); - this.nUDRSRotation.Minimum = new decimal(new int[] { - 180, - 0, - 0, - -2147483648}); - this.nUDRSRotation.Name = "nUDRSRotation"; - this.nUDRSRotation.ValueChanged += new System.EventHandler(this.nUDRSRotation_ValueChanged); + resources.ApplyResources(this.label15, "label15"); + this.label15.Name = "label15"; // // Options // @@ -3723,6 +3745,10 @@ ((System.ComponentModel.ISupportInitialize)(this.nUDRSCurve)).EndInit(); this.tPOutCurve.ResumeLayout(false); this.tPOutCurve.PerformLayout(); + this.tpRotation.ResumeLayout(false); + this.tpRotation.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.nUDRSRotation)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nUDLSRotation)).EndInit(); this.fLPSettings.ResumeLayout(false); this.gBGyro.ResumeLayout(false); this.gBGyro.PerformLayout(); @@ -3740,10 +3766,6 @@ ((System.ComponentModel.ISupportInitialize)(this.nUDSXS)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.nUDSZS)).EndInit(); this.cMGyroTriggers.ResumeLayout(false); - this.tpRotation.ResumeLayout(false); - this.tpRotation.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nUDLSRotation)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.nUDRSRotation)).EndInit(); this.ResumeLayout(false); } @@ -4064,5 +4086,7 @@ private System.Windows.Forms.Label label14; private System.Windows.Forms.NumericUpDown nUDLSRotation; private System.Windows.Forms.Label label13; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.ComboBox touchpadInvertComboBox; } } \ No newline at end of file diff --git a/DS4Windows/DS4Forms/Options.cs b/DS4Windows/DS4Forms/Options.cs index c770d06..6782383 100644 --- a/DS4Windows/DS4Forms/Options.cs +++ b/DS4Windows/DS4Forms/Options.cs @@ -30,6 +30,9 @@ namespace DS4Windows private Dictionary hoverIndexDict = new Dictionary(); private Dictionary hoverImageDict = new Dictionary(); private Dictionary hoverLabelDict = new Dictionary(); + private int[] touchpadInvertToValue = new int[4] { 0, 2, 1, 3 }; + + int tempInt = 0; public Options(DS4Form rt) { @@ -338,6 +341,10 @@ namespace DS4Windows cBTap.Checked = TapSensitivity[device] > 0; cBDoubleTap.Checked = DoubleTap[device]; cBTouchpadJitterCompensation.Checked = TouchpadJitterCompensation[device]; + + tempInt = TouchpadInvert[device]; + touchpadInvertComboBox.SelectedIndex = touchpadInvertToValue[tempInt]; + cBlowerRCOn.Checked = LowerRCOn[device]; cBFlushHIDQueue.Checked = FlushHIDQueue[device]; enableTouchToggleCheckbox.Checked = getEnableTouchToggle(device); @@ -643,6 +650,7 @@ namespace DS4Windows cBTap.Checked = false; cBDoubleTap.Checked = false; cBTouchpadJitterCompensation.Checked = true; + touchpadInvertComboBox.SelectedIndex = 0; cBlowerRCOn.Checked = false; cBFlushHIDQueue.Checked = false; enableTouchToggleCheckbox.Checked = true; @@ -1312,6 +1320,10 @@ namespace DS4Windows ScrollSensitivity[device] = (int)nUDScroll.Value; DoubleTap[device] = cBDoubleTap.Checked; TapSensitivity[device] = (byte)nUDTap.Value; + + tempInt = touchpadInvertComboBox.SelectedIndex; + TouchpadInvert[device] = touchpadInvertToValue[tempInt]; + IdleDisconnectTimeout[device] = (int)(nUDIdleDisconnect.Value * 60); Rainbow[device] = (int)nUDRainbow.Value; RSDeadzone[device] = (int)Math.Round((nUDRS.Value * 127), 0); @@ -2893,6 +2905,15 @@ namespace DS4Windows } } + private void touchpadInvertComboBox_SelectedIndexChanged(object sender, EventArgs e) + { + if (!loading) + { + tempInt = touchpadInvertToValue[touchpadInvertComboBox.SelectedIndex]; + TouchpadInvert[device] = tempInt; + } + } + private void Options_Resize(object sender, EventArgs e) { fLPSettings.AutoScroll = false; diff --git a/DS4Windows/DS4Forms/Options.resx b/DS4Windows/DS4Forms/Options.resx index 8cddb5c..f2a75e6 100644 --- a/DS4Windows/DS4Forms/Options.resx +++ b/DS4Windows/DS4Forms/Options.resx @@ -430,7 +430,7 @@ pnlTPMouse - 1 + 3 True @@ -463,7 +463,7 @@ pnlTPMouse - 6 + 8 63, 39 @@ -484,7 +484,7 @@ pnlTPMouse - 4 + 6 True @@ -517,7 +517,7 @@ pnlTPMouse - 2 + 4 True @@ -550,7 +550,7 @@ pnlTPMouse - 7 + 9 167, 9 @@ -571,7 +571,7 @@ pnlTPMouse - 0 + 2 63, 9 @@ -592,7 +592,7 @@ pnlTPMouse - 8 + 10 True @@ -658,7 +658,7 @@ pnlTPMouse - 5 + 7 True @@ -691,7 +691,7 @@ pnlTPMouse - 3 + 5 True @@ -1335,113 +1335,65 @@ 1 - + + True + + + 141, 66 + + + 37, 13 + + + 235 + + + Invert: + + + label15 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + pnlTPMouse - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBTouchpad - - + 0 - - rBTPControls + + None - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + X Axis - - gBTouchpad + + Y Axis - - 1 + + Both X and Y Axes - - rBTPMouse + + 144, 82 - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 121, 21 - - gBTouchpad + + 234 - - 2 + + touchpadInvertComboBox - - fLPTouchSwipe + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBTouchpad - - - 3 - - - 2, 259 - - - 270, 182 - - - 246 - - - Touchpad - - - gBTouchpad - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPControls - - - 1 - - - cbStartTouchpadOff - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - + pnlTPMouse - - 9 - - - -3, 50 - - - 2, 2, 2, 2 - - - 267, 128 - - - 257 - - - pnlTPMouse - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBTouchpad - - - 0 + + 1 True @@ -1471,7 +1423,31 @@ pnlTPMouse - 9 + 11 + + + -3, 39 + + + 2, 2, 2, 2 + + + 267, 129 + + + 257 + + + pnlTPMouse + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBTouchpad + + + 0 True @@ -1539,126 +1515,156 @@ 2 - - bnSwipeUp - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPTouchSwipe - - - 0 - - - lbSwipeUp - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPTouchSwipe - - - 1 - - - bnSwipeDown - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPTouchSwipe - - - 2 - - - lbSwipeDown - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPTouchSwipe - - - 3 - - - bnSwipeLeft - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPTouchSwipe - - - 4 - - - lbSwipeLeft - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPTouchSwipe - - - 5 - - - bnSwipeRight - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPTouchSwipe - - - 6 - - - lbSwipeRight - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPTouchSwipe - - - 7 - - - 4, 55 - - - 260, 121 - - - 256 - - - fLPTouchSwipe - - - System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBTouchpad - - - 3 - 326, 13 + + False + + + 117, 22 + + + Control + + + 114, 6 + + + 117, 22 + + + Default + + + 127, 22 + + + Inverted + + + 127, 22 + + + Inverted X + + + 127, 22 + + + Inverted Y + + + 117, 22 + + + Dpad + + + 127, 22 + + + Inverted + + + 127, 22 + + + Inverted X + + + 127, 22 + + + Inverted Y + + + 117, 22 + + + Left Stick + + + 127, 22 + + + Inverted + + + 127, 22 + + + Inverted X + + + 127, 22 + + + Inverted Y + + + 117, 22 + + + Right Stick + + + 117, 22 + + + Face Buttons + + + 147, 22 + + + w/ Scan Code + + + False + + + 117, 22 + + + WASD + + + 147, 22 + + + w/ Scan Code + + + 117, 22 + + + Arrow Keys + + + 127, 22 + + + Inverted + + + 127, 22 + + + Inverted X + + + 127, 22 + + + Inverted Y + + + 117, 22 + + + Mouse + 118, 208 @@ -1698,153 +1704,6 @@ 0 - - False - - - 117, 22 - - - Control - - - 114, 6 - - - 117, 22 - - - Default - - - 117, 22 - - - Dpad - - - 127, 22 - - - Inverted - - - 127, 22 - - - Inverted X - - - 127, 22 - - - Inverted Y - - - 117, 22 - - - Left Stick - - - 127, 22 - - - Inverted - - - 127, 22 - - - Inverted X - - - 127, 22 - - - Inverted Y - - - 117, 22 - - - Right Stick - - - 127, 22 - - - Inverted - - - 127, 22 - - - Inverted X - - - 127, 22 - - - Inverted Y - - - 117, 22 - - - Face Buttons - - - False - - - 117, 22 - - - WASD - - - 147, 22 - - - w/ Scan Code - - - 117, 22 - - - Arrow Keys - - - 147, 22 - - - w/ Scan Code - - - 117, 22 - - - Mouse - - - 127, 22 - - - Inverted - - - 127, 22 - - - Inverted X - - - 127, 22 - - - Inverted Y - NoControl @@ -2067,173 +1926,50 @@ 7 - - btPollRateLabel + + 4, 55 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 260, 121 - - gBOther + + 256 - - 0 + + fLPTouchSwipe - - btPollRateComboBox + + System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + gBTouchpad - - gBOther - - - 1 - - - enableTouchToggleCheckbox - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBOther - - - 2 - - - cBDinput - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBOther - - + 3 - - pBProgram + + 2, 259 - - System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 270, 182 - - gBOther + + 246 - - 4 + + Touchpad - - cBLaunchProgram + + gBTouchpad - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBOther - - - 5 - - - btnBrowse - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBOther - - - 6 - - - lbUseController - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBOther - - - 7 - - - cBMouseAccel - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBOther - - - 8 - - - nUDSixaxis - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBOther - - - 9 - - - cBControllerInput - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBOther - - - 10 - - - cBIdleDisconnect - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBOther - - - 12 - - - 281, 221 - - - 272, 256 - - - 247 - - - Other - - - gBOther - - + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - fLPSettings + + tPControls - - 5 + + 1 True @@ -2647,149 +2383,29 @@ with profile 12 - - btnRainbow + + 281, 221 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 272, 256 - - gBLightbar - - - 0 - - - lbRainbowB - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBLightbar - - - 1 - - - nUDRainbowB - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBLightbar - - - 2 - - - cBFlashType - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBLightbar - - - 3 - - - cBWhileCharging - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBLightbar - - - 4 - - - btnFlashColor - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBLightbar - - - 5 - - - btnChargingColor - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBLightbar - - - 6 - - - lbWhileCharging - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBLightbar - - - 7 - - - lbPercentFlashBar - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBLightbar - - - 8 - - - nUDflashLED - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBLightbar - - - 9 - - - 3, 3 - - - 272, 244 - - + 247 - - Lightbar + + Other - - gBLightbar + + gBOther - + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + fLPSettings - - 0 + + 5 NoControl @@ -3076,53 +2692,29 @@ with profile 9 - - lbPercentRumble + + 3, 3 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 272, 244 - - gBRumble - - - 0 - - - btnRumbleLightTest - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBRumble - - - 1 - - - 281, 3 - - - 272, 46 - - + 247 - - Rumble + + Lightbar - - gBRumble + + gBLightbar - + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + fLPSettings - - 2 + + 0 True @@ -3181,6 +2773,30 @@ with profile 1 + + 281, 3 + + + 272, 46 + + + 247 + + + Rumble + + + gBRumble + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + fLPSettings + + + 2 + True @@ -3289,225 +2905,6 @@ with profile 153, 17 - - pnlSATrack - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - lbL2TrackS - - - 0 - - - lbL2Track - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - lbL2TrackS - - - 1 - - - lbRSTip - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - lbL2TrackS - - - 2 - - - lbInputDelay - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - lbL2TrackS - - - 3 - - - lbR2Track - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - lbL2TrackS - - - 4 - - - lbLSTip - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - lbL2TrackS - - - 5 - - - lbSATip - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - lbL2TrackS - - - 6 - - - tBR2 - - - System.Windows.Forms.TrackBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - lbL2TrackS - - - 7 - - - tBL2 - - - System.Windows.Forms.TrackBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - lbL2TrackS - - - 8 - - - pnlSixaxis - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - lbL2TrackS - - - 9 - - - pnlLSTrack - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - lbL2TrackS - - - 10 - - - pnlRSTrack - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - lbL2TrackS - - - 11 - - - 4, 22 - - - 3, 3, 3, 3 - - - 438, 455 - - - 2 - - - Controller Readings - - - lbL2TrackS - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tCControls - - - 2 - - - btnSATrack - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSATrack - - - 0 - - - btnSATrackS - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSATrack - - - 1 - - - 300, 88 - - - 2, 2, 2, 2 - - - 125, 125 - - - 252 - - - pnlSATrack - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - lbL2TrackS - - - 0 - False @@ -3571,6 +2968,30 @@ with profile 1 + + 300, 88 + + + 2, 2, 2, 2 + + + 125, 125 + + + 252 + + + pnlSATrack + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + lbL2TrackS + + + 0 + True @@ -3835,123 +3256,6 @@ with profile 8 - - tBsixaxisAccelX - - - System.Windows.Forms.TrackBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSixaxis - - - 0 - - - lb6Accel - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSixaxis - - - 1 - - - tBsixaxisGyroX - - - System.Windows.Forms.TrackBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSixaxis - - - 2 - - - lb6Gryo - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSixaxis - - - 3 - - - tBsixaxisGyroY - - - System.Windows.Forms.TrackBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSixaxis - - - 4 - - - tBsixaxisGyroZ - - - System.Windows.Forms.TrackBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSixaxis - - - 5 - - - tBsixaxisAccelY - - - System.Windows.Forms.TrackBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSixaxis - - - 6 - - - tBsixaxisAccelZ - - - System.Windows.Forms.TrackBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSixaxis - - - 7 - - - 300, 233 - - - 125, 125 - - - 236 - - - pnlSixaxis - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - lbL2TrackS - - - 9 - False @@ -4174,53 +3478,26 @@ with profile 7 - - btnLSTrack + + 300, 233 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlLSTrack - - - 0 - - - btnLSTrackS - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlLSTrack - - - 1 - - - 5, 88 - - - 2, 2, 2, 2 - - + 125, 125 - - 250 + + 236 - - pnlLSTrack + + pnlSixaxis - + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + lbL2TrackS - - 10 + + 9 False @@ -4285,53 +3562,29 @@ with profile 1 - - btnRSTrackS + + 5, 88 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlRSTrack - - - 0 - - - btnRSTrack - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlRSTrack - - - 1 - - - 151, 88 - - + 2, 2, 2, 2 - + 125, 125 - - 251 + + 250 - - pnlRSTrack + + pnlLSTrack - + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + lbL2TrackS - - 11 + + 10 False @@ -4396,122 +3649,56 @@ with profile 1 - - bnGyroZN + + 151, 88 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 2, 2, 2, 2 - - fLPTiltControls + + 125, 125 - - 0 + + 251 - - lbGyroZN + + pnlRSTrack - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - fLPTiltControls + + lbL2TrackS - - 1 + + 11 - - bnGyroZP + + 4, 22 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 3, 3, 3, 3 - - fLPTiltControls + + 438, 455 - + 2 - - lbGyroZP + + Controller Readings - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + lbL2TrackS - - fLPTiltControls + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 3 + + tCControls - - bnGyroXP - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPTiltControls - - - 4 - - - lbGyroXP - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPTiltControls - - - 5 - - - bnGyroXN - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPTiltControls - - - 6 - - - lbGyroXN - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPTiltControls - - - 7 - - - 6, 51 - - - 271, 167 - - - 254 - - - fLPTiltControls - - - System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBGyro - - - 3 + + 2 NoControl @@ -4729,120 +3916,30 @@ with profile 7 - - tPControls + + 6, 51 - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 271, 167 - - tCControls + + 254 - - 0 + + fLPTiltControls - - tPSpecial + + System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + gBGyro - - tCControls - - - 1 - - - Left - - - 0, 0 - - - 446, 481 - - - 253 - - - tCControls - - - System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - + 3 True - - lBControls - - - System.Windows.Forms.ListBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPControls - - - 0 - - - lbControlTip - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPControls - - - 2 - - - pnlController - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPControls - - - 3 - - - 4, 22 - - - 3, 3, 3, 3 - - - 438, 455 - - - 0 - - - Controls - - - tPControls - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tCControls - - - 0 - Top, Bottom, Left @@ -5002,654 +4099,6 @@ with profile Zoom - - pBHoveredButton - - - System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 0 - - - lbLRS - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 1 - - - lbLLS - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 2 - - - bnRSDown - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 3 - - - lbLTouchUpper - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 4 - - - lbLTouchRight - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 5 - - - bnL3 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 6 - - - lbLTouchLM - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 7 - - - bnRSUp - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 8 - - - lbLR2 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 9 - - - bnRSRight - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 10 - - - lbLL2 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 11 - - - bnR3 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 12 - - - lbLR1 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 13 - - - bnRSLeft - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 14 - - - lbLL1 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 15 - - - bnLSLeft - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 16 - - - lbLPS - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 17 - - - bnLSUp - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 18 - - - lbLLeft - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 19 - - - bnLSRight - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 20 - - - lbLright - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 21 - - - bnLSDown - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 22 - - - lbLDown - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 23 - - - bnR2 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 24 - - - bnUp - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 25 - - - bnDown - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 26 - - - bnTriangle - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 27 - - - bnR1 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 28 - - - bnSquare - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 29 - - - bnRight - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 30 - - - lbLUp - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 31 - - - bnLeft - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 32 - - - lbLShare - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 33 - - - bnOptions - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 34 - - - bnShare - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 35 - - - lbLOptions - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 36 - - - bnL1 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 37 - - - bnTouchRight - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 38 - - - bnL2 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 39 - - - lbLTriangle - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 40 - - - bnTouchLeft - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 41 - - - lbLSquare - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 42 - - - bnTouchMulti - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 43 - - - lbLCircle - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 44 - - - lbLCross - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 45 - - - bnTouchUpper - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 46 - - - btnLightbar - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 47 - - - bnPS - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 48 - - - bnCross - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 49 - - - bnCircle - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 50 - - - lbControlName - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 51 - - - 2, 2 - - - 2, 2, 2, 2 - - - 422, 230 - - - 282 - - - pnlController - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPControls - - - 3 - False @@ -7300,90 +5749,75 @@ with profile 51 - - pnlActions + + 2, 2 - + + 2, 2, 2, 2 + + + 422, 230 + + + 282 + + + pnlController + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - tPSpecial + + tPControls - - 0 - - - 4, 22 - - - 438, 455 - - + 3 - - Special Actions + + 4, 22 - - tPSpecial + + 3, 3, 3, 3 - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tCControls - - - 1 - - - lVActions - - - System.Windows.Forms.ListView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlActions - - - 0 - - - panel2 - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlActions - - - 1 - - - Fill - - - 0, 0 - - + 438, 455 - - 15 - - - pnlActions - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPSpecial - - + 0 + + Controls + + + tPControls + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tCControls + + + 0 + + + Name + + + 140 + + + Trigger + + + 105 + + + Action + + + 100 + Fill @@ -7408,135 +5842,6 @@ with profile 0 - - Name - - - 140 - - - Trigger - - - 105 - - - Action - - - 100 - - - fLPActionButtons - - - System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panel2 - - - 0 - - - lbActionsTip - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panel2 - - - 1 - - - Top - - - 0, 0 - - - 2, 2, 2, 2 - - - 438, 66 - - - 16 - - - panel2 - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlActions - - - 1 - - - btnNewAction - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPActionButtons - - - 0 - - - btnEditAction - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPActionButtons - - - 1 - - - btnRemAction - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPActionButtons - - - 2 - - - Fill - - - 0, 28 - - - 438, 38 - - - 15 - - - fLPActionButtons - - - System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panel2 - - - 0 - NoControl @@ -7618,6 +5923,30 @@ with profile 2 + + Fill + + + 0, 28 + + + 438, 38 + + + 15 + + + fLPActionButtons + + + System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel2 + + + 0 + Top @@ -7651,6 +5980,105 @@ with profile 1 + + Top + + + 0, 0 + + + 2, 2, 2, 2 + + + 438, 66 + + + 16 + + + panel2 + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlActions + + + 1 + + + Fill + + + 0, 0 + + + 438, 455 + + + 15 + + + pnlActions + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPSpecial + + + 0 + + + 4, 22 + + + 438, 455 + + + 3 + + + Special Actions + + + tPSpecial + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tCControls + + + 1 + + + Left + + + 0, 0 + + + 446, 481 + + + 253 + + + tCControls + + + System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 3 + 4, 22 @@ -7678,567 +6106,6 @@ with profile 0 - - nUDR2AntiDead - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - antiDeadzoneTabPage - - - 0 - - - label3 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - antiDeadzoneTabPage - - - 1 - - - nUDL2AntiDead - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - antiDeadzoneTabPage - - - 2 - - - label4 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - antiDeadzoneTabPage - - - 3 - - - nUDRSAntiDead - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - antiDeadzoneTabPage - - - 4 - - - label2 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - antiDeadzoneTabPage - - - 5 - - - nUDLSAntiDead - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - antiDeadzoneTabPage - - - 6 - - - label1 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - antiDeadzoneTabPage - - - 7 - - - 4, 22 - - - 3, 3, 3, 3 - - - 264, 52 - - - 2 - - - Anti-Deadzone - - - antiDeadzoneTabPage - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tCSens - - - 1 - - - nUDR2Maxzone - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - maxZoneTabPage - - - 0 - - - nUDL2Maxzone - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - maxZoneTabPage - - - 1 - - - label8 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - maxZoneTabPage - - - 2 - - - label7 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - maxZoneTabPage - - - 3 - - - nUDRSMaxZone - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - maxZoneTabPage - - - 4 - - - label6 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - maxZoneTabPage - - - 5 - - - nUDLSMaxZone - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - maxZoneTabPage - - - 6 - - - label5 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - maxZoneTabPage - - - 7 - - - 4, 22 - - - 3, 3, 3, 3 - - - 264, 52 - - - 3 - - - Max Zone - - - maxZoneTabPage - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tCSens - - - 2 - - - nUDLSCurve - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPCurve - - - 0 - - - nUDRSCurve - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPCurve - - - 1 - - - lbRSCurve - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPCurve - - - 2 - - - lbRSCurvePercent - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPCurve - - - 3 - - - lbLSCurvePercent - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPCurve - - - 4 - - - lbLSCurve - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPCurve - - - 5 - - - 4, 22 - - - 3, 3, 3, 3 - - - 264, 52 - - - 1 - - - Curve (Input) - - - tPCurve - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tCSens - - - 3 - - - rsOutCurveComboBox - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPOutCurve - - - 0 - - - lsOutCurveComboBox - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPOutCurve - - - 1 - - - label10 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPOutCurve - - - 2 - - - label9 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPOutCurve - - - 3 - - - 4, 22 - - - 264, 52 - - - 4 - - - Output Curve - - - tPOutCurve - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tCSens - - - 4 - - - 160, 21 - - - 74, 20 - - - 219 - - - nUDRSRotation - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tpRotation - - - 0 - - - True - - - 125, 23 - - - 25, 13 - - - 218 - - - RS: - - - label14 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tpRotation - - - 1 - - - 42, 20 - - - 68, 20 - - - 217 - - - nUDLSRotation - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tpRotation - - - 2 - - - True - - - 4, 22 - - - 23, 13 - - - 216 - - - LS: - - - label13 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tpRotation - - - 3 - - - 4, 22 - - - 3, 3, 3, 3 - - - 264, 52 - - - 5 - - - Rotation - - - tpRotation - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tCSens - - - 5 - - - 281, 55 - - - 272, 78 - - - 234 - - - tCSens - - - System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPSettings - - - 3 - 158, 30 @@ -8443,6 +6310,33 @@ with profile 7 + + 4, 22 + + + 3, 3, 3, 3 + + + 264, 52 + + + 2 + + + Anti-Deadzone + + + antiDeadzoneTabPage + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tCSens + + + 1 + 161, 29 @@ -8647,6 +6541,33 @@ with profile 7 + + 4, 22 + + + 3, 3, 3, 3 + + + 264, 52 + + + 3 + + + Max Zone + + + maxZoneTabPage + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tCSens + + + 2 + 36, 16 @@ -8815,6 +6736,33 @@ with profile 5 + + 4, 22 + + + 3, 3, 3, 3 + + + 264, 52 + + + 1 + + + Curve (Input) + + + tPCurve + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tCSens + + + 3 + Linear @@ -8941,266 +6889,176 @@ with profile 3 - + + 4, 22 + + + 264, 52 + + + 4 + + + Output Curve + + + tPOutCurve + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tCSens + + + 4 + + + 160, 21 + + + 74, 20 + + + 219 + + + nUDRSRotation + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpRotation + + + 0 + + True - - rBSAControls + + 125, 23 - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 25, 13 - - gBGyro + + 218 - - 0 + + RS: - - rBSAMouse + + label14 - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBGyro - - - 1 - - - pnlSAMouse - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBGyro - - - 2 - - - 3, 253 - - - 272, 224 - - - 248 - - - Gyro - - - gBGyro - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPSettings - - - 1 - - - lbL2S - - + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - gBSensitivity + + tpRotation - - 0 - - - nUDL2S - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBSensitivity - - + 1 - - nUDLSS + + 42, 20 - + + 68, 20 + + + 217 + + + nUDLSRotation + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - gBSensitivity + + tpRotation - + 2 - - lbSixaxisXS + + True - + + 4, 22 + + + 23, 13 + + + 216 + + + LS: + + + label13 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - gBSensitivity + + tpRotation - + 3 - - nUDR2S + + 4, 22 - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 3, 3, 3, 3 - - gBSensitivity + + 264, 52 - - 4 - - - lbSixaxisZS - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBSensitivity - - + 5 - - nUDRSS + + Rotation - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + tpRotation - - gBSensitivity + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 6 + + tCSens - - lbR2LS + + 5 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 281, 55 - - gBSensitivity + + 272, 78 - - 7 + + 234 - - nUDSXS + + tCSens - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - gBSensitivity - - - 8 - - - lbRSS - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBSensitivity - - - 9 - - - lbLSS - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBSensitivity - - - 10 - - - nUDSZS - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBSensitivity - - - 11 - - - 281, 139 - - - 272, 76 - - - 257 - - - Sensitivity - - - gBSensitivity - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - + fLPSettings - - 4 + + 3 - - Fill - - - TopDown - - - 446, 0 - - - 2, 2, 2, 2 - - - 564, 481 - - - 254 - - - fLPSettings - - - System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 2 + + True True @@ -9268,210 +7126,6 @@ with profile 1 - - lbGyroSmooth - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 0 - - - cBGyroSmooth - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 1 - - - lbSmoothWeight - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 2 - - - nUDGyroSmoothWeight - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 3 - - - label12 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 4 - - - nUDGyroMouseVertScale - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 5 - - - label11 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 6 - - - gyroTriggerBehavior - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 7 - - - cBGyroInvertY - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 8 - - - cBGyroInvertX - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 9 - - - lbGyroInvert - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 10 - - - lbGyroTriggers - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 11 - - - btnGyroTriggers - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 12 - - - nUDGyroSensitivity - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 13 - - - lbGyroSens - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 14 - - - 6, 43 - - - 2, 2, 2, 2 - - - 263, 170 - - - 259 - - - pnlSAMouse - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBGyro - - - 2 - True @@ -9913,6 +7567,54 @@ with profile 14 + + 6, 43 + + + 2, 2, 2, 2 + + + 263, 170 + + + 259 + + + pnlSAMouse + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBGyro + + + 2 + + + 3, 253 + + + 272, 224 + + + 248 + + + Gyro + + + gBGyro + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + fLPSettings + + + 1 + True @@ -10231,18 +7933,63 @@ with profile 11 + + 281, 139 + + + 272, 76 + + + 257 + + + Sensitivity + + + gBSensitivity + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + fLPSettings + + + 4 + + + Fill + + + TopDown + + + 446, 0 + + + 2, 2, 2, 2 + + + 565, 481 + + + 254 + + + fLPSettings + + + System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 2 + 482, 17 - - 195, 444 - - - cMGyroTriggers - - - System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 194, 22 @@ -10363,6 +8110,15 @@ with profile Always on + + 195, 444 + + + cMGyroTriggers + + + System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + 647, 17 @@ -10376,7 +8132,7 @@ with profile True - 1010, 481 + 1011, 481 4, 4, 4, 4 @@ -10682,7 +8438,7 @@ with profile advColorDialog - DS4Windows.AdvancedColorDialog, DS4Windows, Version=1.4.82.0, Culture=neutral, PublicKeyToken=null + DS4Windows.AdvancedColorDialog, DS4Windows, Version=1.4.84.0, Culture=neutral, PublicKeyToken=null Options From c5dd97ebe518bec185e19d03e95c3cb8e78f5dff Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Thu, 13 Jul 2017 07:27:25 -0500 Subject: [PATCH 03/24] Preserve minor optimizations before next test --- DS4Windows/DS4Control/MouseCursor.cs | 10 +++++----- DS4Windows/DS4Library/DS4Sixaxis.cs | 4 ++-- DS4Windows/DS4Library/DS4State.cs | 3 ++- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/DS4Windows/DS4Control/MouseCursor.cs b/DS4Windows/DS4Control/MouseCursor.cs index c65ffe5..61cd440 100644 --- a/DS4Windows/DS4Control/MouseCursor.cs +++ b/DS4Windows/DS4Control/MouseCursor.cs @@ -37,7 +37,7 @@ namespace DS4Windows public virtual void sixaxisMoved(SixAxisEventArgs arg) { int deltaX = 0, deltaY = 0; - deltaX = -arg.sixAxis.gyroYawFull; + deltaX = arg.sixAxis.gyroYawFull; deltaY = -arg.sixAxis.gyroPitchFull; //Console.WriteLine(arg.sixAxis.deltaX); @@ -61,12 +61,12 @@ namespace DS4Windows int signX = System.Math.Sign(deltaX); int signY = System.Math.Sign(deltaY); - if ((hRemainder > 0) != (deltaX > 0)) + if (deltaX == 0 || (hRemainder > 0 != deltaX > 0)) { hRemainder = 0.0; } - if ((vRemainder > 0) != (deltaY > 0)) + if (deltaY == 0 || (vRemainder > 0 != deltaY > 0)) { vRemainder = 0.0; } @@ -170,10 +170,10 @@ namespace DS4Windows //vRemainder -= (int)vRemainder; int gyroInvert = Global.getGyroInvert(deviceNumber); - if (gyroInvert == 2 || gyroInvert == 3) + if ((gyroInvert & 0x02) == 2) xAction *= -1; - if (gyroInvert == 1 || gyroInvert == 3) + if ((gyroInvert & 0x01) == 1) yAction *= -1; if (yAction != 0 || xAction != 0) diff --git a/DS4Windows/DS4Library/DS4Sixaxis.cs b/DS4Windows/DS4Library/DS4Sixaxis.cs index d58e2dc..c2a4015 100644 --- a/DS4Windows/DS4Library/DS4Sixaxis.cs +++ b/DS4Windows/DS4Library/DS4Sixaxis.cs @@ -25,9 +25,9 @@ namespace DS4Windows gyroX = X / 256; gyroY = Y / 256; gyroZ = Z / 256; - gyroYawFull = X; + gyroYawFull = -X; gyroPitchFull = Y; - gyroRollFull = Z; + gyroRollFull = -Z; accelX = aX / 64; accelY = aY / 64; diff --git a/DS4Windows/DS4Library/DS4State.cs b/DS4Windows/DS4Library/DS4State.cs index 9971291..4b75b5f 100644 --- a/DS4Windows/DS4Library/DS4State.cs +++ b/DS4Windows/DS4Library/DS4State.cs @@ -8,7 +8,8 @@ namespace DS4Windows public bool Square, Triangle, Circle, Cross; public bool DpadUp, DpadDown, DpadLeft, DpadRight; public bool L1, L3, R1, R3; - public bool Share, Options, PS, Touch1, Touch2, TouchButton, TouchRight, TouchLeft, Touch1Finger, Touch2Fingers; + public bool Share, Options, PS, Touch1, Touch2, TouchButton, TouchRight, + TouchLeft, Touch1Finger, Touch2Fingers; public byte Touch1Identifier, Touch2Identifier; public byte LX, RX, LY, RY, L2, R2; public byte FrameCounter; // 0, 1, 2...62, 63, 0.... From 56fff28f65b90668c46ba7af034f93b119279ba3 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Thu, 13 Jul 2017 08:17:00 -0500 Subject: [PATCH 04/24] Try to correct some problems with imu data usage --- DS4Windows/DS4Control/DS4StateFieldMapping.cs | 4 +- DS4Windows/DS4Control/Mapping.cs | 40 +++++++------- DS4Windows/DS4Forms/Options.cs | 14 ++--- DS4Windows/DS4Library/DS4Sixaxis.cs | 1 - DS4Windows/DS4Library/DS4StateExposed.cs | 55 +++---------------- 5 files changed, 38 insertions(+), 76 deletions(-) diff --git a/DS4Windows/DS4Control/DS4StateFieldMapping.cs b/DS4Windows/DS4Control/DS4StateFieldMapping.cs index e345e50..6dca486 100644 --- a/DS4Windows/DS4Control/DS4StateFieldMapping.cs +++ b/DS4Windows/DS4Control/DS4StateFieldMapping.cs @@ -90,11 +90,11 @@ namespace DS4Windows buttons[(int)DS4Controls.TouchUpper] = tp != null ? (!priorMouse ? tp.upperDown : tp.priorUpperDown) : false; buttons[(int)DS4Controls.TouchMulti] = tp != null ? (!priorMouse ? tp.multiDown : tp.priorMultiDown) : false; - int gyroX = exposeState.getGyroX(); + int gyroX = exposeState.getAccelX(); gryodirs[(int)DS4Controls.GyroXPos] = gyroX > 0 ? gyroX : 0; gryodirs[(int)DS4Controls.GyroXNeg] = gyroX < 0 ? gyroX : 0; - int gyroZ = exposeState.getGyroZ(); + int gyroZ = exposeState.getAccelZ(); gryodirs[(int)DS4Controls.GyroZPos] = gyroZ > 0 ? gyroZ : 0; gryodirs[(int)DS4Controls.GyroZNeg] = gyroZ < 0 ? gyroZ : 0; diff --git a/DS4Windows/DS4Control/Mapping.cs b/DS4Windows/DS4Control/Mapping.cs index cdcfb5f..a7214ca 100644 --- a/DS4Windows/DS4Control/Mapping.cs +++ b/DS4Windows/DS4Control/Mapping.cs @@ -2760,25 +2760,25 @@ namespace DS4Windows { case DS4Controls.GyroXPos: { - int gyroX = eState.GyroX; + int gyroX = eState.AccelX; result = (byte)(!sOff && sxsens * gyroX > SXD * 10 ? Math.Min(255, sxsens * gyroX * 2) : 0); break; } case DS4Controls.GyroXNeg: { - int gyroX = eState.GyroX; + int gyroX = eState.AccelX; result = (byte)(!sOff && sxsens * gyroX < -SXD * 10 ? Math.Min(255, sxsens * -gyroX * 2) : 0); break; } case DS4Controls.GyroZPos: { - int gyroZ = eState.GyroZ; + int gyroZ = eState.AccelZ; result = (byte)(!sOff && szsens * gyroZ > SZD * 10 ? Math.Min(255, szsens * gyroZ * 2) : 0); break; } case DS4Controls.GyroZNeg: { - int gyroZ = eState.GyroZ; + int gyroZ = eState.AccelZ; result = (byte)(!sOff && szsens * gyroZ < -SZD * 10 ? Math.Min(255, szsens * -gyroZ * 2) : 0); break; } @@ -2882,10 +2882,10 @@ namespace DS4Windows switch (control) { - case DS4Controls.GyroXPos: result = !sOff ? SXSens[device] * eState.GyroX > 67 : false; break; - case DS4Controls.GyroXNeg: result = !sOff ? SXSens[device] * eState.GyroX < -67 : false; break; - case DS4Controls.GyroZPos: result = !sOff ? SZSens[device] * eState.GyroZ > 67 : false; break; - case DS4Controls.GyroZNeg: result = !sOff ? SZSens[device] * eState.GyroZ < -67 : false; break; + case DS4Controls.GyroXPos: result = !sOff ? SXSens[device] * eState.AccelX > 67 : false; break; + case DS4Controls.GyroXNeg: result = !sOff ? SXSens[device] * eState.AccelX < -67 : false; break; + case DS4Controls.GyroZPos: result = !sOff ? SZSens[device] * eState.AccelZ > 67 : false; break; + case DS4Controls.GyroZNeg: result = !sOff ? SZSens[device] * eState.AccelZ < -67 : false; break; default: break; } } @@ -3309,10 +3309,10 @@ namespace DS4Windows switch (control) { - case DS4Controls.GyroXPos: result = !sOff ? SXSens[device] * eState.GyroX > 67 : false; break; - case DS4Controls.GyroXNeg: result = !sOff ? SXSens[device] * eState.GyroX < -67 : false; break; - case DS4Controls.GyroZPos: result = !sOff ? SZSens[device] * eState.GyroZ > 67 : false; break; - case DS4Controls.GyroZNeg: result = !sOff ? SZSens[device] * eState.GyroZ < -67 : false; break; + case DS4Controls.GyroXPos: result = !sOff ? SXSens[device] * eState.AccelX > 67 : false; break; + case DS4Controls.GyroXNeg: result = !sOff ? SXSens[device] * eState.AccelX < -67 : false; break; + case DS4Controls.GyroZPos: result = !sOff ? SZSens[device] * eState.AccelZ > 67 : false; break; + case DS4Controls.GyroZNeg: result = !sOff ? SZSens[device] * eState.AccelZ < -67 : false; break; default: break; } } @@ -3548,36 +3548,36 @@ namespace DS4Windows { case DS4Controls.GyroXPos: { - if (!sOff && eState.GyroX > SXD * 10) + if (!sOff && eState.AccelX > SXD * 10) { - if (alt) result = (byte)Math.Min(255, 127 + SXSens[device] * eState.GyroX); else result = (byte)Math.Max(0, 127 - SXSens[device] * eState.GyroX); + if (alt) result = (byte)Math.Min(255, 127 + SXSens[device] * eState.AccelX); else result = (byte)Math.Max(0, 127 - SXSens[device] * eState.AccelX); } else result = falseVal; break; } case DS4Controls.GyroXNeg: { - if (!sOff && eState.GyroX < -SXD * 10) + if (!sOff && eState.AccelX < -SXD * 10) { - if (alt) result = (byte)Math.Min(255, 127 + SXSens[device] * -eState.GyroX); else result = (byte)Math.Max(0, 127 - SXSens[device] * -eState.GyroX); + if (alt) result = (byte)Math.Min(255, 127 + SXSens[device] * -eState.AccelX); else result = (byte)Math.Max(0, 127 - SXSens[device] * -eState.AccelX); } else result = falseVal; break; } case DS4Controls.GyroZPos: { - if (!sOff && eState.GyroZ > SZD * 10) + if (!sOff && eState.AccelZ > SZD * 10) { - if (alt) result = (byte)Math.Min(255, 127 + SZSens[device] * eState.GyroZ); else result = (byte)Math.Max(0, 127 - SZSens[device] * eState.GyroZ); + if (alt) result = (byte)Math.Min(255, 127 + SZSens[device] * eState.AccelZ); else result = (byte)Math.Max(0, 127 - SZSens[device] * eState.AccelZ); } else return falseVal; break; } case DS4Controls.GyroZNeg: { - if (!sOff && eState.GyroZ < -SZD * 10) + if (!sOff && eState.AccelZ < -SZD * 10) { - if (alt) result = (byte)Math.Min(255, 127 + SZSens[device] * -eState.GyroZ); else result = (byte)Math.Max(0, 127 - SZSens[device] * -eState.GyroZ); + if (alt) result = (byte)Math.Min(255, 127 + SZSens[device] * -eState.AccelZ); else result = (byte)Math.Max(0, 127 - SZSens[device] * -eState.AccelZ); } else result = falseVal; break; diff --git a/DS4Windows/DS4Forms/Options.cs b/DS4Windows/DS4Forms/Options.cs index 6782383..125e9ef 100644 --- a/DS4Windows/DS4Forms/Options.cs +++ b/DS4Windows/DS4Forms/Options.cs @@ -805,11 +805,11 @@ namespace DS4Windows else { EnableReadings(true); - SetDynamicTrackBarValue(tBsixaxisGyroX, (Program.rootHub.ExposedState[tempDeviceNum].GyroX + tBsixaxisGyroX.Value * 2) / 3); - SetDynamicTrackBarValue(tBsixaxisGyroY, (Program.rootHub.ExposedState[tempDeviceNum].GyroY + tBsixaxisGyroY.Value * 2) / 3); - SetDynamicTrackBarValue(tBsixaxisGyroZ, (Program.rootHub.ExposedState[tempDeviceNum].GyroZ + tBsixaxisGyroZ.Value * 2) / 3); - SetDynamicTrackBarValue(tBsixaxisAccelX, (int)(Program.rootHub.ExposedState[tempDeviceNum].AccelX + tBsixaxisAccelX.Value * 2) / 3); - SetDynamicTrackBarValue(tBsixaxisAccelY, (int)(Program.rootHub.ExposedState[tempDeviceNum].AccelY + tBsixaxisAccelY.Value * 2) / 3); + SetDynamicTrackBarValue(tBsixaxisGyroX, (-Program.rootHub.ExposedState[tempDeviceNum].GyroYaw + tBsixaxisGyroX.Value * 2) / 3); + SetDynamicTrackBarValue(tBsixaxisGyroY, (Program.rootHub.ExposedState[tempDeviceNum].GyroPitch + tBsixaxisGyroY.Value * 2) / 3); + SetDynamicTrackBarValue(tBsixaxisGyroZ, (-Program.rootHub.ExposedState[tempDeviceNum].GyroRoll + tBsixaxisGyroZ.Value * 2) / 3); + SetDynamicTrackBarValue(tBsixaxisAccelX, (int)(-Program.rootHub.ExposedState[tempDeviceNum].AccelX + tBsixaxisAccelX.Value * 2) / 3); + SetDynamicTrackBarValue(tBsixaxisAccelY, (int)(-Program.rootHub.ExposedState[tempDeviceNum].AccelY + tBsixaxisAccelY.Value * 2) / 3); SetDynamicTrackBarValue(tBsixaxisAccelZ, (int)(Program.rootHub.ExposedState[tempDeviceNum].AccelZ + tBsixaxisAccelZ.Value * 2) / 3); int x = Program.rootHub.getDS4State(tempDeviceNum).LX; @@ -902,8 +902,8 @@ namespace DS4Windows (int)(tempRSS * (btnRSTrack.Location.Y - pnlRSTrack.Size.Height / 2f) + pnlRSTrack.Size.Height / 2f)); } - x = -Program.rootHub.ExposedState[tempDeviceNum].GyroX + 127; - y = Program.rootHub.ExposedState[tempDeviceNum].GyroZ + 127; + x = -Program.rootHub.ExposedState[tempDeviceNum].AccelX + 127; + y = Program.rootHub.ExposedState[tempDeviceNum].AccelZ + 127; btnSATrack.Location = new Point((int)(dpix * Global.Clamp(0, x / 2.09, pnlSATrack.Size.Width)), (int)(dpiy * Global.Clamp(0, y / 2.09, pnlSATrack.Size.Height))); double tempSXS = (double)nUDSXS.Value; diff --git a/DS4Windows/DS4Library/DS4Sixaxis.cs b/DS4Windows/DS4Library/DS4Sixaxis.cs index c2a4015..e152633 100644 --- a/DS4Windows/DS4Library/DS4Sixaxis.cs +++ b/DS4Windows/DS4Library/DS4Sixaxis.cs @@ -48,7 +48,6 @@ namespace DS4Windows public class DS4SixAxis { - //public event EventHandler SixAxisMoved = null; // deltaX/deltaY are set because one or both fingers were already down on a prior sensor reading public event EventHandler SixAccelMoved = null; // no status change for the touchpad itself... but other sensors may have changed, or you may just want to do some processing internal int lastGyroX, lastGyroY, lastGyroZ, lastAX, lastAY, lastAZ; // tracks 0, 1 or 2 touches; we maintain touch 1 and 2 separately diff --git a/DS4Windows/DS4Library/DS4StateExposed.cs b/DS4Windows/DS4Library/DS4StateExposed.cs index 924cc4a..a820821 100644 --- a/DS4Windows/DS4Library/DS4StateExposed.cs +++ b/DS4Windows/DS4Library/DS4StateExposed.cs @@ -44,74 +44,37 @@ namespace DS4Windows byte R2 { get { return _state.R2; } } int Battery { get { return _state.Battery; } } - /// Holds raw DS4 input data from 14 to 19 public byte[] Accel { set { accel = value; } } public void setAccel(byte[] value) { accel = value; } - /// Holds raw DS4 input data from 20 to 25 public byte[] Gyro { set { gyro = value; } } public void setGyro(byte[] value) { gyro = value; } - /// Yaw leftward/counter-clockwise/turn to port or larboard side - /// Add double the previous result to this delta and divide by three. - //public int AccelX { get { return (short)((ushort)(accel[2] << 8) | accel[3]) / 256; } } - //public int AccelX { get { return (short)((ushort)(accel[1] << 8) | accel[0]) / 64; } } - public int AccelX { get { return (short)((ushort)(gyro[3] << 8) | gyro[2]) / 256; } } + public int GyroYaw { get { return (short)((ushort)(gyro[3] << 8) | gyro[2]) / 256; } } + public int GyroPitch { get { return (short)((ushort)(gyro[1] << 8) | gyro[0]) / 256; } } + public int GyroRoll { get { return (short)((ushort)(gyro[5] << 8) | gyro[4]) / 256; } } - /// Pitch upward/backward - /// Add double the previous result to this delta and divide by three. - //public int AccelY { get { return (short)((ushort)(accel[0] << 8) | accel[1] ) / 256; } } - //public int AccelY { get { return (short)((ushort)(accel[3] << 8) | accel[2]) / 64; } } - public int AccelY { get { return (short)((ushort)(gyro[1] << 8) | gyro[0]) / 256; } } - - /// roll left/L side of controller down/starboard raising up - /// Add double the previous result to this delta and divide by three. - //public int AccelZ { get { return (short)((ushort)(accel[4] << 8) | accel[5]) / 256; } } - //public int AccelZ { get { return (short)((ushort)(accel[5] << 8) | accel[4]) / 64; } } - public int AccelZ { get { return (short)((ushort)(gyro[5] << 8) | gyro[4]) / 256; } } - - /// R side of controller upward - /// Add double the previous result to this delta and divide by three. - //public int GyroX { get { return (short)((ushort)(gyro[0] << 8) | gyro[1]) / 64; } } - //public int GyroX { get { return (short)((ushort)(gyro[3] << 8) | gyro[2]) / 256; } } - public int GyroX { get { return (short)((ushort)(accel[1] << 8) | accel[0]) / 64; } } - - public int getGyroX() + public int AccelX { get { return (short)((ushort)(accel[1] << 8) | accel[0]) / 64; } } + public int getAccelX() { - //return (short)((ushort)(gyro[0] << 8) | gyro[1]) / 64; - //return (short)((ushort)(gyro[3] << 8) | gyro[2]) / 256; return (short)((ushort)(accel[1] << 8) | accel[0]) / 64; } - /// touchpad and button face side of controller upward - /// Add double the previous result to this delta and divide by three. - //public int GyroY { get { return (short)((ushort)(gyro[2] << 8) | gyro[3]) / 64; } } - //public int GyroY { get { return (short)((ushort)(gyro[1] << 8) | gyro[0]) / 256; } } - public int GyroY { get { return (short)((ushort)(accel[3] << 8) | accel[2]) / 64; } } - - public int getGyroY() + public int AccelY { get { return (short)((ushort)(accel[3] << 8) | accel[2]) / 64; } } + public int getAccelY() { - //return (short)((ushort)(gyro[2] << 8) | gyro[3]) / 64; - //return (short)((ushort)(gyro[1] << 8) | gyro[0]) / 256; return (short)((ushort)(accel[3] << 8) | accel[2]) / 64; } - /// Audio/expansion ports upward and light bar/shoulders/bumpers/USB port downward - /// Add double the previous result to this delta and divide by three. - //public int GyroZ { get { return (short)((ushort)(gyro[4] << 8) | gyro[5]) / 64; } } - //public int GyroZ { get { return (short)((ushort)(gyro[5] << 8) | gyro[4]) / 256; } } - public int GyroZ { get { return (short)((ushort)(accel[5] << 8) | accel[4]) / 64; } } - - public int getGyroZ() + public int AccelZ { get { return (short)((ushort)(accel[5] << 8) | accel[4]) / 64; } } + public int getAccelZ() { - //return (short)((ushort)(gyro[4] << 8) | gyro[5]) / 64; - //return (short)((ushort)(gyro[5] << 8) | gyro[4]) / 256; return (short)((ushort)(accel[5] << 8) | accel[4]) / 64; } } From 53b0de087c342bf5cf84515d31d1afc174d3f4d2 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Fri, 14 Jul 2017 07:46:45 -0500 Subject: [PATCH 05/24] Allow gyro roll to control mouse x axis. Related to issue #90. --- DS4Windows/DS4Control/MouseCursor.cs | 3 +- DS4Windows/DS4Control/ScpUtil.cs | 12 ++++ DS4Windows/DS4Forms/Options.Designer.cs | 54 +++++++++++----- DS4Windows/DS4Forms/Options.cs | 80 ++++++++++++----------- DS4Windows/DS4Forms/Options.resx | 84 ++++++++++++++++++++----- 5 files changed, 164 insertions(+), 69 deletions(-) diff --git a/DS4Windows/DS4Control/MouseCursor.cs b/DS4Windows/DS4Control/MouseCursor.cs index 61cd440..435d050 100644 --- a/DS4Windows/DS4Control/MouseCursor.cs +++ b/DS4Windows/DS4Control/MouseCursor.cs @@ -37,7 +37,8 @@ namespace DS4Windows public virtual void sixaxisMoved(SixAxisEventArgs arg) { int deltaX = 0, deltaY = 0; - deltaX = arg.sixAxis.gyroYawFull; + deltaX = Global.getGyroMouseHorizontalAxis(deviceNumber) == 0 ? arg.sixAxis.gyroYawFull : + arg.sixAxis.gyroRollFull; deltaY = -arg.sixAxis.gyroPitchFull; //Console.WriteLine(arg.sixAxis.deltaX); diff --git a/DS4Windows/DS4Control/ScpUtil.cs b/DS4Windows/DS4Control/ScpUtil.cs index 0d931c4..38cfaaa 100644 --- a/DS4Windows/DS4Control/ScpUtil.cs +++ b/DS4Windows/DS4Control/ScpUtil.cs @@ -608,6 +608,12 @@ namespace DS4Windows return m_Config.gyroSmoothWeight[index]; } + public static int[] GyroMouseHorizontalAxis => m_Config.gyroMouseHorizontalAxis; + public static int getGyroMouseHorizontalAxis(int index) + { + return m_Config.gyroMouseHorizontalAxis[index]; + } + public static DS4Color[] MainColor => m_Config.m_Leds; public static DS4Color getMainColor(int index) { @@ -1274,6 +1280,7 @@ namespace DS4Windows public bool[] gyroTriggerTurns = { true, true, true, true, true }; public bool[] gyroSmoothing = { false, false, false, false, false }; public double[] gyroSmoothWeight = { 0.5, 0.5, 0.5, 0.5, 0.5 }; + public int[] gyroMouseHorizontalAxis = new int[5] { 0, 0, 0, 0, 0 }; bool tempBool = false; @@ -1492,6 +1499,7 @@ namespace DS4Windows XmlNode xmlGyroTriggerTurns = m_Xdoc.CreateNode(XmlNodeType.Element, "GyroTriggerTurns", null); xmlGyroTriggerTurns.InnerText = gyroTriggerTurns[device].ToString(); Node.AppendChild(xmlGyroTriggerTurns); XmlNode xmlGyroSmoothWeight = m_Xdoc.CreateNode(XmlNodeType.Element, "GyroSmoothingWeight", null); xmlGyroSmoothWeight.InnerText = Convert.ToInt32(gyroSmoothWeight[device] * 100).ToString(); Node.AppendChild(xmlGyroSmoothWeight); XmlNode xmlGyroSmoothing = m_Xdoc.CreateNode(XmlNodeType.Element, "GyroSmoothing", null); xmlGyroSmoothing.InnerText = gyroSmoothing[device].ToString(); Node.AppendChild(xmlGyroSmoothing); + XmlNode xmlGyroMouseHAxis = m_Xdoc.CreateNode(XmlNodeType.Element, "GyroMouseHAxis", null); xmlGyroMouseHAxis.InnerText = gyroMouseHorizontalAxis[device].ToString(); Node.AppendChild(xmlGyroMouseHAxis); XmlNode xmlLSC = m_Xdoc.CreateNode(XmlNodeType.Element, "LSCurve", null); xmlLSC.InnerText = lsCurve[device].ToString(); Node.AppendChild(xmlLSC); XmlNode xmlRSC = m_Xdoc.CreateNode(XmlNodeType.Element, "RSCurve", null); xmlRSC.InnerText = rsCurve[device].ToString(); Node.AppendChild(xmlRSC); XmlNode xmlProfileActions = m_Xdoc.CreateNode(XmlNodeType.Element, "ProfileActions", null); xmlProfileActions.InnerText = string.Join("/", profileActions[device]); Node.AppendChild(xmlProfileActions); @@ -2442,6 +2450,9 @@ namespace DS4Windows try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/GyroSmoothingWeight"); int temp = 0; int.TryParse(Item.InnerText, out temp); gyroSmoothWeight[device] = Math.Min(Math.Max(0.0, Convert.ToDouble(temp * 0.01)), 1.0); } catch { gyroSmoothWeight[device] = 0.5; missingSetting = true; } + try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/GyroMouseHAxis"); int temp = 0; int.TryParse(Item.InnerText, out temp); gyroMouseHorizontalAxis[device] = Math.Min(Math.Max(0, temp), 1); } + catch { gyroMouseHorizontalAxis[device] = 0; missingSetting = true; } + try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/LSCurve"); int.TryParse(Item.InnerText, out lsCurve[device]); } catch { lsCurve[device] = 0; missingSetting = true; } @@ -3499,6 +3510,7 @@ namespace DS4Windows gyroTriggerTurns[device] = true; gyroSmoothing[device] = false; gyroSmoothWeight[device] = 0.5; + gyroMouseHorizontalAxis[device] = 0; lsOutCurveMode[device] = 0; rsOutCurveMode[device] = 0; } diff --git a/DS4Windows/DS4Forms/Options.Designer.cs b/DS4Windows/DS4Forms/Options.Designer.cs index c9121b5..8ab5c04 100644 --- a/DS4Windows/DS4Forms/Options.Designer.cs +++ b/DS4Windows/DS4Forms/Options.Designer.cs @@ -76,6 +76,8 @@ this.nUDL2 = new System.Windows.Forms.NumericUpDown(); this.gBTouchpad = new System.Windows.Forms.GroupBox(); this.pnlTPMouse = new System.Windows.Forms.Panel(); + this.label15 = new System.Windows.Forms.Label(); + this.touchpadInvertComboBox = new System.Windows.Forms.ComboBox(); this.cbStartTouchpadOff = new System.Windows.Forms.CheckBox(); this.rBTPControls = new System.Windows.Forms.RadioButton(); this.rBTPMouse = new System.Windows.Forms.RadioButton(); @@ -342,8 +344,8 @@ this.pSToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.alwaysOnToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.advColorDialog = new DS4Windows.AdvancedColorDialog(); - this.touchpadInvertComboBox = new System.Windows.Forms.ComboBox(); - this.label15 = new System.Windows.Forms.Label(); + this.label16 = new System.Windows.Forms.Label(); + this.cBGyroMouseXAxis = new System.Windows.Forms.ComboBox(); ((System.ComponentModel.ISupportInitialize)(this.nUDRainbow)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.tBBlueBar)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.tBGreenBar)).BeginInit(); @@ -904,6 +906,24 @@ resources.ApplyResources(this.pnlTPMouse, "pnlTPMouse"); this.pnlTPMouse.Name = "pnlTPMouse"; // + // label15 + // + resources.ApplyResources(this.label15, "label15"); + this.label15.Name = "label15"; + // + // touchpadInvertComboBox + // + this.touchpadInvertComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.touchpadInvertComboBox.FormattingEnabled = true; + this.touchpadInvertComboBox.Items.AddRange(new object[] { + resources.GetString("touchpadInvertComboBox.Items"), + resources.GetString("touchpadInvertComboBox.Items1"), + resources.GetString("touchpadInvertComboBox.Items2"), + resources.GetString("touchpadInvertComboBox.Items3")}); + resources.ApplyResources(this.touchpadInvertComboBox, "touchpadInvertComboBox"); + this.touchpadInvertComboBox.Name = "touchpadInvertComboBox"; + this.touchpadInvertComboBox.SelectedIndexChanged += new System.EventHandler(this.touchpadInvertComboBox_SelectedIndexChanged); + // // cbStartTouchpadOff // resources.ApplyResources(this.cbStartTouchpadOff, "cbStartTouchpadOff"); @@ -3087,6 +3107,8 @@ // // pnlSAMouse // + this.pnlSAMouse.Controls.Add(this.cBGyroMouseXAxis); + this.pnlSAMouse.Controls.Add(this.label16); this.pnlSAMouse.Controls.Add(this.lbGyroSmooth); this.pnlSAMouse.Controls.Add(this.cBGyroSmooth); this.pnlSAMouse.Controls.Add(this.lbSmoothWeight); @@ -3631,23 +3653,21 @@ resources.ApplyResources(this.alwaysOnToolStripMenuItem, "alwaysOnToolStripMenuItem"); this.alwaysOnToolStripMenuItem.CheckedChanged += new System.EventHandler(this.SATrigger_CheckedChanged); // - // touchpadInvertComboBox + // label16 // - this.touchpadInvertComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.touchpadInvertComboBox.FormattingEnabled = true; - this.touchpadInvertComboBox.Items.AddRange(new object[] { - resources.GetString("touchpadInvertComboBox.Items"), - resources.GetString("touchpadInvertComboBox.Items1"), - resources.GetString("touchpadInvertComboBox.Items2"), - resources.GetString("touchpadInvertComboBox.Items3")}); - resources.ApplyResources(this.touchpadInvertComboBox, "touchpadInvertComboBox"); - this.touchpadInvertComboBox.Name = "touchpadInvertComboBox"; - this.touchpadInvertComboBox.SelectedIndexChanged += new System.EventHandler(this.touchpadInvertComboBox_SelectedIndexChanged); + resources.ApplyResources(this.label16, "label16"); + this.label16.Name = "label16"; // - // label15 + // cBGyroMouseXAxis // - resources.ApplyResources(this.label15, "label15"); - this.label15.Name = "label15"; + this.cBGyroMouseXAxis.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cBGyroMouseXAxis.FormattingEnabled = true; + this.cBGyroMouseXAxis.Items.AddRange(new object[] { + resources.GetString("cBGyroMouseXAxis.Items"), + resources.GetString("cBGyroMouseXAxis.Items1")}); + resources.ApplyResources(this.cBGyroMouseXAxis, "cBGyroMouseXAxis"); + this.cBGyroMouseXAxis.Name = "cBGyroMouseXAxis"; + this.cBGyroMouseXAxis.SelectedIndexChanged += new System.EventHandler(this.cBGyroMouseXAxis_SelectedIndexChanged); // // Options // @@ -4088,5 +4108,7 @@ private System.Windows.Forms.Label label13; private System.Windows.Forms.Label label15; private System.Windows.Forms.ComboBox touchpadInvertComboBox; + private System.Windows.Forms.ComboBox cBGyroMouseXAxis; + private System.Windows.Forms.Label label16; } } \ No newline at end of file diff --git a/DS4Windows/DS4Forms/Options.cs b/DS4Windows/DS4Forms/Options.cs index 125e9ef..520a6db 100644 --- a/DS4Windows/DS4Forms/Options.cs +++ b/DS4Windows/DS4Forms/Options.cs @@ -574,27 +574,28 @@ namespace DS4Windows string[] satriggers = SATriggers[device].Split(','); List s = new List(); + int gyroTriggerCount = cMGyroTriggers.Items.Count; for (int i = 0, satrigLen = satriggers.Length; i < satrigLen; i++) { - int tr; + int tr = 0; if (int.TryParse(satriggers[i], out tr)) { - if (tr < cMGyroTriggers.Items.Count && tr > -1) + if (tr < gyroTriggerCount && tr > -1) { ((ToolStripMenuItem)cMGyroTriggers.Items[tr]).Checked = true; s.Add(cMGyroTriggers.Items[tr].Text); } else { - ((ToolStripMenuItem)cMGyroTriggers.Items[cMGyroTriggers.Items.Count - 1]).Checked = true; - s.Add(cMGyroTriggers.Items[cMGyroTriggers.Items.Count - 1].Text); + ((ToolStripMenuItem)cMGyroTriggers.Items[gyroTriggerCount - 1]).Checked = true; + s.Add(cMGyroTriggers.Items[gyroTriggerCount - 1].Text); break; } } else { - ((ToolStripMenuItem)cMGyroTriggers.Items[cMGyroTriggers.Items.Count - 1]).Checked = true; - s.Add(cMGyroTriggers.Items[cMGyroTriggers.Items.Count - 1].Text); + ((ToolStripMenuItem)cMGyroTriggers.Items[gyroTriggerCount - 1]).Checked = true; + s.Add(cMGyroTriggers.Items[gyroTriggerCount - 1].Text); break; } } @@ -602,13 +603,14 @@ namespace DS4Windows gyroTriggerBehavior.Checked = GyroTriggerTurns[device]; nUDGyroMouseVertScale.Value = GyroSensVerticalScale[device]; int invert = GyroInvert[device]; - cBGyroInvertX.Checked = invert == 2 || invert == 3; - cBGyroInvertY.Checked = invert == 1 || invert == 3; + cBGyroInvertX.Checked = (invert & 0x02) == 2; + cBGyroInvertY.Checked = (invert & 0x01) == 1; if (s.Count > 0) btnGyroTriggers.Text = string.Join(", ", s); cBGyroSmooth.Checked = nUDGyroSmoothWeight.Enabled = GyroSmoothing[device]; nUDGyroSmoothWeight.Value = (decimal)(GyroSmoothingWeight[device]); + cBGyroMouseXAxis.SelectedIndex = GyroMouseHorizontalAxis[device]; } else { @@ -700,6 +702,7 @@ namespace DS4Windows cBGyroInvertY.Checked = false; cBGyroSmooth.Checked = false; nUDGyroSmoothWeight.Value = 0.5m; + cBGyroMouseXAxis.SelectedIndex = 0; Set(); } @@ -724,7 +727,7 @@ namespace DS4Windows case "Macro": lvi.SubItems.Add(Properties.Resources.Macro + (action.keyType.HasFlag(DS4KeyType.ScanCode) ? " (" + Properties.Resources.ScanCode + ")" : "")); break; case "Program": lvi.SubItems.Add(Properties.Resources.LaunchProgram.Replace("*program*", Path.GetFileNameWithoutExtension(action.details))); break; case "Profile": lvi.SubItems.Add(Properties.Resources.LoadProfile.Replace("*profile*", action.details)); break; - case "Key": lvi.SubItems.Add(((Keys)int.Parse(action.details)).ToString() + (action.uTrigger.Count > 0 ? " (Toggle)" : "")); break; + case "Key": lvi.SubItems.Add(((Keys)Convert.ToInt32(action.details)).ToString() + (action.uTrigger.Count > 0 ? " (Toggle)" : "")); break; case "DisconnectBT": lvi.SubItems.Add(Properties.Resources.DisconnectBT); break; @@ -762,18 +765,7 @@ namespace DS4Windows } } - /*public double Clamp(double min, double value, double max) - { - if (value > max) - return max; - else if (value < min) - return min; - else - return value; - } - */ - - void EnableReadings(bool on) + private void EnableReadings(bool on) { lbL2Track.Enabled = on; lbR2Track.Enabled = on; @@ -788,13 +780,14 @@ namespace DS4Windows btnSATrackS.Visible = on; } - void ControllerReadout_Tick(object sender, EventArgs e) + private void ControllerReadout_Tick(object sender, EventArgs e) { // MEMS gyro data is all calibrated to roughly -1G..1G for values -0x2000..0x1fff // Enough additional acceleration and we are no longer mostly measuring Earth's gravity... // We should try to indicate setpoints of the calibration when exposing this measurement.... int tempDeviceNum = (int)nUDSixaxis.Value - 1; DS4Device ds = Program.rootHub.DS4Controllers[tempDeviceNum]; + if (ds == null) { EnableReadings(false); @@ -805,15 +798,19 @@ namespace DS4Windows else { EnableReadings(true); - SetDynamicTrackBarValue(tBsixaxisGyroX, (-Program.rootHub.ExposedState[tempDeviceNum].GyroYaw + tBsixaxisGyroX.Value * 2) / 3); - SetDynamicTrackBarValue(tBsixaxisGyroY, (Program.rootHub.ExposedState[tempDeviceNum].GyroPitch + tBsixaxisGyroY.Value * 2) / 3); - SetDynamicTrackBarValue(tBsixaxisGyroZ, (-Program.rootHub.ExposedState[tempDeviceNum].GyroRoll + tBsixaxisGyroZ.Value * 2) / 3); - SetDynamicTrackBarValue(tBsixaxisAccelX, (int)(-Program.rootHub.ExposedState[tempDeviceNum].AccelX + tBsixaxisAccelX.Value * 2) / 3); - SetDynamicTrackBarValue(tBsixaxisAccelY, (int)(-Program.rootHub.ExposedState[tempDeviceNum].AccelY + tBsixaxisAccelY.Value * 2) / 3); - SetDynamicTrackBarValue(tBsixaxisAccelZ, (int)(Program.rootHub.ExposedState[tempDeviceNum].AccelZ + tBsixaxisAccelZ.Value * 2) / 3); - int x = Program.rootHub.getDS4State(tempDeviceNum).LX; - int y = Program.rootHub.getDS4State(tempDeviceNum).LY; + DS4StateExposed exposeState = Program.rootHub.ExposedState[tempDeviceNum]; + DS4State baseState = Program.rootHub.getDS4State(tempDeviceNum); + + SetDynamicTrackBarValue(tBsixaxisGyroX, (-exposeState.GyroYaw + tBsixaxisGyroX.Value * 2) / 3); + SetDynamicTrackBarValue(tBsixaxisGyroY, (exposeState.GyroPitch + tBsixaxisGyroY.Value * 2) / 3); + SetDynamicTrackBarValue(tBsixaxisGyroZ, (-exposeState.GyroRoll + tBsixaxisGyroZ.Value * 2) / 3); + SetDynamicTrackBarValue(tBsixaxisAccelX, (-exposeState.AccelX + tBsixaxisAccelX.Value * 2) / 3); + SetDynamicTrackBarValue(tBsixaxisAccelY, (-exposeState.AccelY + tBsixaxisAccelY.Value * 2) / 3); + SetDynamicTrackBarValue(tBsixaxisAccelZ, (exposeState.AccelZ + tBsixaxisAccelZ.Value * 2) / 3); + + int x = baseState.LX; + int y = baseState.LY; double tempLSS = (double)nUDLSS.Value; btnLSTrackS.Visible = tempLSS != 1; @@ -857,8 +854,8 @@ namespace DS4Windows (int)(tempLSS * (btnLSTrack.Location.Y - pnlLSTrack.Size.Height / 2f) + pnlLSTrack.Size.Height / 2f)); } - x = Program.rootHub.getDS4State(tempDeviceNum).RX; - y = Program.rootHub.getDS4State(tempDeviceNum).RY; + x = baseState.RX; + y = baseState.RY; double tempRSS = (double)nUDRSS.Value; btnRSTrackS.Visible = tempRSS != 1; @@ -902,8 +899,8 @@ namespace DS4Windows (int)(tempRSS * (btnRSTrack.Location.Y - pnlRSTrack.Size.Height / 2f) + pnlRSTrack.Size.Height / 2f)); } - x = -Program.rootHub.ExposedState[tempDeviceNum].AccelX + 127; - y = Program.rootHub.ExposedState[tempDeviceNum].AccelZ + 127; + x = -exposeState.AccelX + 127; + y = exposeState.AccelZ + 127; btnSATrack.Location = new Point((int)(dpix * Global.Clamp(0, x / 2.09, pnlSATrack.Size.Width)), (int)(dpiy * Global.Clamp(0, y / 2.09, pnlSATrack.Size.Height))); double tempSXS = (double)nUDSXS.Value; @@ -917,7 +914,7 @@ namespace DS4Windows double tempL2 = (double)nUDL2.Value; double tempL2S = (double)nUDL2S.Value; - tBL2.Value = Program.rootHub.getDS4State(tempDeviceNum).L2; + tBL2.Value = baseState.L2; lbL2Track.Location = new Point(tBL2.Location.X - (int)(dpix * 25), Math.Max((int)(((tBL2.Location.Y + tBL2.Size.Height) - (tBL2.Value * tempL2S) / (tBL2.Size.Height * .0209f / Math.Pow(dpix, 2))) - dpix * 20), (int)(1 * ((tBL2.Location.Y + tBL2.Size.Height) - 255 / (tBL2.Size.Height * .0209f / Math.Pow(dpix, 2))) - dpix * 20))); @@ -931,7 +928,7 @@ namespace DS4Windows double tempR2 = (double)nUDR2.Value; double tempR2S = (double)nUDR2S.Value; - tBR2.Value = Program.rootHub.getDS4State(tempDeviceNum).R2; + tBR2.Value = baseState.R2; lbR2Track.Location = new Point(tBR2.Location.X + (int)(dpix * 25), Math.Max((int)(1 * ((tBR2.Location.Y + tBR2.Size.Height) - (tBR2.Value * tempR2S) / (tBR2.Size.Height * .0209f / Math.Pow(dpix, 2))) - dpix * 20), (int)(1 * ((tBR2.Location.Y + tBR2.Size.Height) - 255 / (tBR2.Size.Height * .0209f / Math.Pow(dpix, 2))) - dpix * 20))); @@ -951,7 +948,7 @@ namespace DS4Windows lbInputDelay.BackColor = Color.Red; lbInputDelay.ForeColor = Color.White; } - else if (latency > (warnInterval / 2)) + else if (latency > (warnInterval * 0.5)) { lbInputDelay.BackColor = Color.Yellow; lbInputDelay.ForeColor = Color.Black; @@ -1367,6 +1364,7 @@ namespace DS4Windows GyroSensVerticalScale[device] = (int)nUDGyroMouseVertScale.Value; GyroSmoothing[device] = cBGyroSmooth.Checked; GyroSmoothingWeight[device] = (double)nUDGyroSmoothWeight.Value; + GyroMouseHorizontalAxis[device] = cBGyroMouseXAxis.SelectedIndex; int invert = 0; if (cBGyroInvertX.Checked) @@ -2914,6 +2912,14 @@ namespace DS4Windows } } + private void cBGyroMouseXAxis_SelectedIndexChanged(object sender, EventArgs e) + { + if (!loading) + { + GyroMouseHorizontalAxis[device] = cBGyroMouseXAxis.SelectedIndex; + } + } + private void Options_Resize(object sender, EventArgs e) { fLPSettings.AutoScroll = false; diff --git a/DS4Windows/DS4Forms/Options.resx b/DS4Windows/DS4Forms/Options.resx index f2a75e6..acab86f 100644 --- a/DS4Windows/DS4Forms/Options.resx +++ b/DS4Windows/DS4Forms/Options.resx @@ -7126,6 +7126,60 @@ with profile 1 + + Yaw + + + Roll + + + 170, 93 + + + 74, 21 + + + 271 + + + cBGyroMouseXAxis + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSAMouse + + + 0 + + + True + + + 167, 74 + + + 39, 13 + + + 270 + + + X Axis: + + + label16 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSAMouse + + + 1 + True @@ -7151,7 +7205,7 @@ with profile pnlSAMouse - 0 + 2 True @@ -7181,7 +7235,7 @@ with profile pnlSAMouse - 1 + 3 True @@ -7211,7 +7265,7 @@ with profile pnlSAMouse - 2 + 4 False @@ -7235,7 +7289,7 @@ with profile pnlSAMouse - 3 + 5 True @@ -7265,7 +7319,7 @@ with profile pnlSAMouse - 4 + 6 96, 93 @@ -7286,7 +7340,7 @@ with profile pnlSAMouse - 5 + 7 True @@ -7316,7 +7370,7 @@ with profile pnlSAMouse - 6 + 8 True @@ -7349,7 +7403,7 @@ with profile pnlSAMouse - 7 + 9 True @@ -7382,7 +7436,7 @@ with profile pnlSAMouse - 8 + 10 True @@ -7415,7 +7469,7 @@ with profile pnlSAMouse - 9 + 11 True @@ -7448,7 +7502,7 @@ with profile pnlSAMouse - 10 + 12 True @@ -7481,7 +7535,7 @@ with profile pnlSAMouse - 11 + 13 NoControl @@ -7511,7 +7565,7 @@ with profile pnlSAMouse - 12 + 14 96, 67 @@ -7532,7 +7586,7 @@ with profile pnlSAMouse - 13 + 15 True @@ -7565,7 +7619,7 @@ with profile pnlSAMouse - 14 + 16 6, 43 From e8f92b6b6ee995c5a07e84ed2be8db8de4d57473 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Fri, 14 Jul 2017 22:34:12 -0500 Subject: [PATCH 06/24] Update README with note regarding pull requests --- README.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d075ac2..d8b7f55 100644 --- a/README.md +++ b/README.md @@ -6,14 +6,24 @@ DS4Windows is a portable program that allows you to get the best DualShock 4 exp You can find the latest and older versions [here](https://github.com/Ryochan7/DS4Windows/releases). +This project is a fork of the work of Jays2Kings. You can find the old project +website at [ds4windows.com](http://ds4windows.com). + ## Requirements - [Microsoft .NET 4.5 or higher (needed to unzip the driver and for macros to work properly)](http://www.microsoft.com/en-us/download/details.aspx?id=42642) -- DS4 Driver (Downloaded & Installed with DS4Windows) +- SCP Virtual Bus Driver (Downloaded & Installed with DS4Windows) - Microsoft 360 Driver (link inside DS4Windows, already installed on Windows 7 SP1 and higher or if you've used a 360 controller before) - Sony DualShock 4 (This should be obvious) - Micro USB cable - (Optional)Bluetooth 2.1+, via adapter or built in pc [(My recommendation)](http://www.amazon.com/gp/product/B004LNXO28/ref=oh_aui_search_detailpage?ie=UTF8&psc=1) (Toshiba's bluetooth & Bluetooth adapters using CSR currently does not work) -Note: Hide DS4 currently doesn't work on Windows 10 without a workaround (disabling Network list service and restarting, but this causes serious issues with windows, use caution). -You can find more info out at [ds4windows.com](http://ds4windows.com). +## Pull Requests + +Pull requests for DS4Windows are welcome. Before making a pull request, please +test your changes to ensure that the changes made do not negatively affect +the performance of other parts of the application. Some consideration will +be made during code review to try to tweak the changes in order to improve +application performance. However, there is a chance that a pull request will be +rejected if no reasonable solution can be found to incorporate code changes. + From 10621b8c690de9b00972818cec815dcf30db263f Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Fri, 14 Jul 2017 22:41:00 -0500 Subject: [PATCH 07/24] Change trackbar value for gyro --- DS4Windows/DS4Forms/Options.cs | 4 ++-- DS4Windows/DS4Library/DS4StateExposed.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DS4Windows/DS4Forms/Options.cs b/DS4Windows/DS4Forms/Options.cs index 520a6db..f36d37e 100644 --- a/DS4Windows/DS4Forms/Options.cs +++ b/DS4Windows/DS4Forms/Options.cs @@ -802,9 +802,9 @@ namespace DS4Windows DS4StateExposed exposeState = Program.rootHub.ExposedState[tempDeviceNum]; DS4State baseState = Program.rootHub.getDS4State(tempDeviceNum); - SetDynamicTrackBarValue(tBsixaxisGyroX, (-exposeState.GyroYaw + tBsixaxisGyroX.Value * 2) / 3); + SetDynamicTrackBarValue(tBsixaxisGyroX, (exposeState.GyroYaw + tBsixaxisGyroX.Value * 2) / 3); SetDynamicTrackBarValue(tBsixaxisGyroY, (exposeState.GyroPitch + tBsixaxisGyroY.Value * 2) / 3); - SetDynamicTrackBarValue(tBsixaxisGyroZ, (-exposeState.GyroRoll + tBsixaxisGyroZ.Value * 2) / 3); + SetDynamicTrackBarValue(tBsixaxisGyroZ, (exposeState.GyroRoll + tBsixaxisGyroZ.Value * 2) / 3); SetDynamicTrackBarValue(tBsixaxisAccelX, (-exposeState.AccelX + tBsixaxisAccelX.Value * 2) / 3); SetDynamicTrackBarValue(tBsixaxisAccelY, (-exposeState.AccelY + tBsixaxisAccelY.Value * 2) / 3); SetDynamicTrackBarValue(tBsixaxisAccelZ, (exposeState.AccelZ + tBsixaxisAccelZ.Value * 2) / 3); diff --git a/DS4Windows/DS4Library/DS4StateExposed.cs b/DS4Windows/DS4Library/DS4StateExposed.cs index a820821..bc9e1a0 100644 --- a/DS4Windows/DS4Library/DS4StateExposed.cs +++ b/DS4Windows/DS4Library/DS4StateExposed.cs @@ -56,9 +56,9 @@ namespace DS4Windows gyro = value; } - public int GyroYaw { get { return (short)((ushort)(gyro[3] << 8) | gyro[2]) / 256; } } + public int GyroYaw { get { return -(short)((ushort)(gyro[3] << 8) | gyro[2]) / 256; } } public int GyroPitch { get { return (short)((ushort)(gyro[1] << 8) | gyro[0]) / 256; } } - public int GyroRoll { get { return (short)((ushort)(gyro[5] << 8) | gyro[4]) / 256; } } + public int GyroRoll { get { return -(short)((ushort)(gyro[5] << 8) | gyro[4]) / 256; } } public int AccelX { get { return (short)((ushort)(accel[1] << 8) | accel[0]) / 64; } } public int getAccelX() From c5158d66c86805388fd8d8506c9d6c09eca07667 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Fri, 14 Jul 2017 22:58:52 -0500 Subject: [PATCH 08/24] Version 1.4.85 --- DS4Windows/Properties/AssemblyInfo.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DS4Windows/Properties/AssemblyInfo.cs b/DS4Windows/Properties/AssemblyInfo.cs index 0111199..d841a79 100644 --- a/DS4Windows/Properties/AssemblyInfo.cs +++ b/DS4Windows/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.4.84")] -[assembly: AssemblyFileVersion("1.4.84")] +[assembly: AssemblyVersion("1.4.85")] +[assembly: AssemblyFileVersion("1.4.85")] From 6e1b9004def68247418c6525ad2178fe188cb4d5 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Sat, 15 Jul 2017 08:50:38 -0500 Subject: [PATCH 09/24] Minor optimizations --- DS4Windows/DS4Forms/DS4Form.cs | 62 +++++++++++----------------------- 1 file changed, 19 insertions(+), 43 deletions(-) diff --git a/DS4Windows/DS4Forms/DS4Form.cs b/DS4Windows/DS4Forms/DS4Form.cs index afdd09a..3d5f323 100644 --- a/DS4Windows/DS4Forms/DS4Form.cs +++ b/DS4Windows/DS4Forms/DS4Form.cs @@ -56,10 +56,8 @@ namespace DS4Windows public bool mAllowVisible; bool contextclose; string logFile = appdatapath + @"\DS4Service.log"; - //StreamWriter logWriter; bool turnOffTemp; bool runningBat; - //bool outputlog = false; Dictionary hoverTextDict = new Dictionary(); // 0 index is used for application version text. 1 - 4 indices are used for controller status string[] notifyText = { "DS4Windows v" + FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).FileVersion, @@ -114,6 +112,7 @@ namespace DS4Windows (ToolStripMenuItem)notifyIcon1.ContextMenuStrip.Items[1], (ToolStripMenuItem)notifyIcon1.ContextMenuStrip.Items[2], (ToolStripMenuItem)notifyIcon1.ContextMenuStrip.Items[3] }; + SystemEvents.PowerModeChanged += OnPowerChange; tSOptions.Visible = false; bool firstrun = false; @@ -184,16 +183,14 @@ namespace DS4Windows Log.GuiLog += On_Debug; logFile = appdatapath + "\\DS4Windows.log"; - //logWriter = File.AppendText(logFile); Log.TrayIconLog += ShowNotification; - // tmrUpdate.Enabled = true; TODO remove tmrUpdate and leave tick() Directory.CreateDirectory(appdatapath); Global.Load(); if (!Save()) //if can't write to file { if (MessageBox.Show("Cannot write at current location\nCopy Settings to appdata?", "DS4Windows", - MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == System.Windows.Forms.DialogResult.Yes) + MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes) { try { @@ -270,12 +267,14 @@ namespace DS4Windows if (Path.GetExtension(s) == ".xml") { xDoc.Load(s); - XmlNode el = xDoc.SelectSingleNode("DS4Windows/ProfileActions"); //.CreateElement("Action"); + XmlNode el = xDoc.SelectSingleNode("DS4Windows/ProfileActions"); if (el != null) + { if (string.IsNullOrEmpty(el.InnerText)) el.InnerText = "Disconnect Controller"; else el.InnerText += "/Disconnect Controller"; + } else { XmlNode Node = xDoc.SelectSingleNode("DS4Windows"); @@ -283,6 +282,7 @@ namespace DS4Windows el.InnerText = "Disconnect Controller"; Node.AppendChild(el); } + xDoc.Save(s); LoadActions(); } @@ -312,11 +312,10 @@ namespace DS4Windows Form_Resize(null, null); RefreshProfiles(); opt = new Options(this); - //opt.Text = "Options for Controller " + (devID + 1); opt.Icon = this.Icon; opt.TopLevel = false; opt.Dock = DockStyle.Fill; - opt.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + opt.FormBorderStyle = FormBorderStyle.None; tabProfiles.Controls.Add(opt); for (int i = 0; i < 4; i++) @@ -1374,7 +1373,7 @@ namespace DS4Windows private void pBStatus_MouseClick(object sender, MouseEventArgs e) { - int i = Int32.Parse(((PictureBox)sender).Tag.ToString()); + int i = Convert.ToInt32(((PictureBox)sender).Tag); DS4Device d = Program.rootHub.DS4Controllers[i]; if (d != null) { @@ -1412,8 +1411,6 @@ namespace DS4Windows protected void On_Debug(object sender, DebugEventArgs e) { - //logWriter.WriteLine(e.Time + ":\t" + e.Data); - //logWriter.Flush(); LogDebug(e.Time, e.Data, e.Warning); } @@ -1613,7 +1610,7 @@ namespace DS4Windows this.Show(); WindowState = FormWindowState.Normal; ToolStripMenuItem em = (ToolStripMenuItem)sender; - int i = Int32.Parse(em.Tag.ToString()); + int i = Convert.ToInt32(em.Tag); if (em.Text == Properties.Resources.ContextNew.Replace("*number*", (i + 1).ToString())) ShowOptions(i, ""); else @@ -1668,7 +1665,7 @@ namespace DS4Windows private void Profile_Changed(object sender, EventArgs e) //cbs[i] changed { ComboBox cb = (ComboBox)sender; - int tdevice = Int32.Parse(cb.Tag.ToString()); + int tdevice = Convert.ToInt32(cb.Tag); if (cb.Items[cb.Items.Count - 1].ToString() == "+" + Properties.Resources.PlusNewProfile) { if (cb.SelectedIndex < cb.Items.Count - 1) @@ -1835,12 +1832,6 @@ namespace DS4Windows lbLastMessage.Text = lvDebug.Items[lvDebug.Items.Count - 1].SubItems[1].Text; else lbLastMessage.Text = ""; - - /*if (tabMain.SelectedIndex != 1 || !opt.Visible) - opt.inputtimer.Stop(); - else if (opt.Visible && tabMain.SelectedIndex == 1) - opt.inputtimer.Start(); - */ } private void Items_MouseHover(object sender, EventArgs e) @@ -1853,23 +1844,6 @@ namespace DS4Windows } lbLastMessage.Text = hoverText; - - /*switch (((System.Windows.Forms.Control)sender).Name) - { - //if (File.Exists(appdatapath + "\\Auto Profiles.xml")) - case "linkUninstall": lbLastMessage.Text = Properties.Resources.IfRemovingDS4Windows; break; - case "cBSwipeProfiles": lbLastMessage.Text = Properties.Resources.TwoFingerSwipe; break; - case "cBQuickCharge": lbLastMessage.Text = Properties.Resources.QuickCharge; break; - case "pnlXIPorts": lbLastMessage.Text = Properties.Resources.XinputPorts; break; - case "lbUseXIPorts": lbLastMessage.Text = Properties.Resources.XinputPorts; break; - case "nUDXIPorts": lbLastMessage.Text = Properties.Resources.XinputPorts; break; - case "lbLastXIPort": lbLastMessage.Text = Properties.Resources.XinputPorts; break; - case "cBCloseMini": lbLastMessage.Text = Properties.Resources.CloseMinimize; break; - default: lbLastMessage.Text = Properties.Resources.HoverOverItems; break; - } - */ - - //if (lbLastMessage.Text != Properties.Resources.HoverOverItems) if (hoverText != Properties.Resources.HoverOverItems) lbLastMessage.ForeColor = Color.Black; else @@ -2299,7 +2273,7 @@ namespace DS4Windows private void Pads_MouseHover(object sender, EventArgs e) { Label lb = (Label)sender; - int i = Int32.Parse(lb.Tag.ToString()); + int i = Convert.ToInt32(lb.Tag); DS4Device d = Program.rootHub.DS4Controllers[i]; if (d != null && d.ConnectionType == ConnectionType.BT) { @@ -2334,10 +2308,12 @@ namespace DS4Windows int currentCustomLed; private void EditCustomLed(object sender, EventArgs e) { - currentCustomLed = int.Parse(((Button)sender).Tag.ToString()); - useCustomColorToolStripMenuItem.Checked = UseCustomLed[currentCustomLed]; - useProfileColorToolStripMenuItem.Checked = !UseCustomLed[currentCustomLed]; - cMCustomLed.Show((Button)sender, new Point(0, ((Button)sender).Height)); + Button btn = (Button)sender; + currentCustomLed = Convert.ToInt32(btn.Tag); + bool customLedChecked = UseCustomLed[currentCustomLed]; + useCustomColorToolStripMenuItem.Checked = customLedChecked; + useProfileColorToolStripMenuItem.Checked = !customLedChecked; + cMCustomLed.Show(btn, new Point(0, btn.Height)); } private void useProfileColorToolStripMenuItem_Click(object sender, EventArgs e) @@ -2425,7 +2401,7 @@ namespace DS4Windows if (principal.IsInRole(WindowsBuiltInRole.Administrator)) { TaskService ts = new TaskService(); - Microsoft.Win32.TaskScheduler.Task tasker = ts.FindTask("RunDS4Windows"); + Task tasker = ts.FindTask("RunDS4Windows"); if (tasker != null) { ts.RootFolder.DeleteTask("RunDS4Windows"); @@ -2447,7 +2423,7 @@ namespace DS4Windows if (principal.IsInRole(WindowsBuiltInRole.Administrator)) { TaskService ts = new TaskService(); - Microsoft.Win32.TaskScheduler.Task tasker = ts.FindTask("RunDS4Windows"); + Task tasker = ts.FindTask("RunDS4Windows"); if (tasker != null) { ts.RootFolder.DeleteTask("RunDS4Windows"); From 817505a9891c01e605cebe4fe53f60175299f50a Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Sun, 16 Jul 2017 02:22:21 -0500 Subject: [PATCH 10/24] Take poll time into account for gyro mouse --- DS4Windows/DS4Control/MouseCursor.cs | 31 ++++++++++------------------ DS4Windows/DS4Library/DS4Device.cs | 2 +- DS4Windows/DS4Library/DS4Sixaxis.cs | 18 +++++++++------- 3 files changed, 23 insertions(+), 28 deletions(-) diff --git a/DS4Windows/DS4Control/MouseCursor.cs b/DS4Windows/DS4Control/MouseCursor.cs index 435d050..a7683aa 100644 --- a/DS4Windows/DS4Control/MouseCursor.cs +++ b/DS4Windows/DS4Control/MouseCursor.cs @@ -31,8 +31,9 @@ namespace DS4Windows double coefficient = 0.0; double verticalScale = 0.0; bool gyroSmooth = false; - //double gyroSmoothWeight = 0.0; + int tempInt = 0; + double tempDouble = 0.0; public virtual void sixaxisMoved(SixAxisEventArgs arg) { @@ -40,7 +41,7 @@ namespace DS4Windows deltaX = Global.getGyroMouseHorizontalAxis(deviceNumber) == 0 ? arg.sixAxis.gyroYawFull : arg.sixAxis.gyroRollFull; deltaY = -arg.sixAxis.gyroPitchFull; - //Console.WriteLine(arg.sixAxis.deltaX); + tempDouble = arg.sixAxis.elapsed * 0.001 * 250.0; gyroSmooth = Global.getGyroSmoothing(deviceNumber); double gyroSmoothWeight = 0.0; @@ -95,32 +96,23 @@ namespace DS4Windows deltaY = 0; } - double xMotion = deltaX != 0 ? coefficient * deltaX + (normX * (offset * signX)) : 0; + double xMotion = deltaX != 0 ? coefficient * (deltaX * tempDouble) + + (normX * (offset * signX)) : 0; + int xAction = 0; if (xMotion != 0.0) { xMotion += hRemainder; - //xAction = (int)xMotion; - //hRemainder = xMotion - xAction; - } - else - { - //hRemainder = 0.0; } - //hRemainder -= (int)hRemainder; verticalScale = Global.getGyroSensVerticalScale(deviceNumber) * 0.01; - double yMotion = deltaY != 0 ? (coefficient * verticalScale) * deltaY + (normY * (offset * signY)) : 0; + double yMotion = deltaY != 0 ? (coefficient * verticalScale) * (deltaY * tempDouble) + + (normY * (offset * signY)) : 0; + int yAction = 0; if (yMotion != 0.0) { yMotion += vRemainder; - //yAction = (int)yMotion; - //vRemainder = yMotion - yAction; - } - else - { - //vRemainder = 0.0; } if (gyroSmooth) @@ -133,9 +125,10 @@ namespace DS4Windows double currentWeight = 1.0; double finalWeight = 0.0; double x_out = 0.0, y_out = 0.0; + int idx = 0; for (int i = 0; i < SMOOTH_BUFFER_LEN; i++) { - int idx = System.Math.Abs(smoothBufferTail - i - 1) % SMOOTH_BUFFER_LEN; + idx = System.Math.Abs(smoothBufferTail - i - 1) % SMOOTH_BUFFER_LEN; x_out += xSmoothBuffer[idx] * currentWeight; y_out += ySmoothBuffer[idx] * currentWeight; finalWeight += currentWeight; @@ -168,8 +161,6 @@ namespace DS4Windows vRemainder = 0.0; } - //vRemainder -= (int)vRemainder; - int gyroInvert = Global.getGyroInvert(deviceNumber); if ((gyroInvert & 0x02) == 2) xAction *= -1; diff --git a/DS4Windows/DS4Library/DS4Device.cs b/DS4Windows/DS4Library/DS4Device.cs index d3f9668..1f1f623 100644 --- a/DS4Windows/DS4Library/DS4Device.cs +++ b/DS4Windows/DS4Library/DS4Device.cs @@ -851,7 +851,7 @@ namespace DS4Windows // Store Gyro and Accel values Array.Copy(inputReport, 13, gyro, 0, 6); Array.Copy(inputReport, 19, accel, 0, 6); - sixAxis.handleSixaxis(gyro, accel, cState); + sixAxis.handleSixaxis(gyro, accel, cState, lastTimeElapsedDouble); /* Debug output of incoming HID data: if (cState.L2 == 0xff && cState.R2 == 0xff) diff --git a/DS4Windows/DS4Library/DS4Sixaxis.cs b/DS4Windows/DS4Library/DS4Sixaxis.cs index e152633..c9201e9 100644 --- a/DS4Windows/DS4Library/DS4Sixaxis.cs +++ b/DS4Windows/DS4Library/DS4Sixaxis.cs @@ -19,8 +19,9 @@ namespace DS4Windows public readonly int gyroYawFull, gyroPitchFull, gyroRollFull; public readonly int accelXFull, accelYFull, accelZFull; public readonly byte touchID; - public readonly SixAxis previousAxis; - public SixAxis(int X, int Y, int Z, int aX, int aY, int aZ, SixAxis prevAxis = null) + public readonly double elapsed; + public readonly SixAxis previousAxis = null; + public SixAxis(int X, int Y, int Z, int aX, int aY, int aZ, double milliseconds, SixAxis prevAxis = null) { gyroX = X / 256; gyroY = Y / 256; @@ -35,6 +36,7 @@ namespace DS4Windows accelXFull = aX; accelYFull = aY; accelZFull = aZ; + elapsed = milliseconds; previousAxis = prevAxis; if (previousAxis != null) @@ -51,9 +53,10 @@ namespace DS4Windows public event EventHandler SixAccelMoved = null; // no status change for the touchpad itself... but other sensors may have changed, or you may just want to do some processing internal int lastGyroX, lastGyroY, lastGyroZ, lastAX, lastAY, lastAZ; // tracks 0, 1 or 2 touches; we maintain touch 1 and 2 separately + internal double lastMilliseconds; internal byte[] previousPacket = new byte[8]; - public void handleSixaxis(byte[] gyro, byte[] accel, DS4State state) + public void handleSixaxis(byte[] gyro, byte[] accel, DS4State state, double milliseconds) { int currentX = (short)((ushort)(gyro[3] << 8) | gyro[2]); // Gyro Yaw int currentY = (short)((ushort)(gyro[1] << 8) | gyro[0]); // Gyro Pitch @@ -62,14 +65,14 @@ namespace DS4Windows int AccelY = (short)((ushort)(accel[3] << 8) | accel[2]); int AccelZ = (short)((ushort)(accel[5] << 8) | accel[4]); - SixAxisEventArgs args; + SixAxisEventArgs args = null; if (AccelX != 0 || AccelY != 0 || AccelZ != 0) { if (SixAccelMoved != null) { - SixAxis sPrev, now; - sPrev = new SixAxis(lastGyroX, lastGyroY, lastGyroZ, lastAX, lastAY, lastAZ); - now = new SixAxis(currentX, currentY, currentZ, AccelX, AccelY, AccelZ, sPrev); + SixAxis sPrev = null, now = null; + sPrev = new SixAxis(lastGyroX, lastGyroY, lastGyroZ, lastAX, lastAY, lastAZ, lastMilliseconds); + now = new SixAxis(currentX, currentY, currentZ, AccelX, AccelY, AccelZ, milliseconds, sPrev); args = new SixAxisEventArgs(state.ReportTimeStamp, now); SixAccelMoved(this, args); } @@ -80,6 +83,7 @@ namespace DS4Windows lastAX = AccelX; lastAY = AccelY; lastAZ = AccelZ; + lastMilliseconds = milliseconds; } } } From 887a4fbdbd15a644348b41e05d7bfb2cb196ad26 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Sun, 16 Jul 2017 03:30:49 -0500 Subject: [PATCH 11/24] Make imu data part of the DS4State --- DS4Windows/DS4Control/ControlService.cs | 2 +- DS4Windows/DS4Library/DS4Device.cs | 7 ++--- DS4Windows/DS4Library/DS4Sixaxis.cs | 1 + DS4Windows/DS4Library/DS4State.cs | 4 +++ DS4Windows/DS4Library/DS4StateExposed.cs | 33 +++++++----------------- 5 files changed, 20 insertions(+), 27 deletions(-) diff --git a/DS4Windows/DS4Control/ControlService.cs b/DS4Windows/DS4Control/ControlService.cs index 9999089..b304c0c 100644 --- a/DS4Windows/DS4Control/ControlService.cs +++ b/DS4Windows/DS4Control/ControlService.cs @@ -747,7 +747,7 @@ namespace DS4Windows } } - device.getExposedState(ExposedState[ind], CurrentState[ind]); + device.getCurrentState(CurrentState[ind]); DS4State cState = CurrentState[ind]; device.getPreviousState(PreviousState[ind]); DS4State pState = PreviousState[ind]; diff --git a/DS4Windows/DS4Library/DS4Device.cs b/DS4Windows/DS4Library/DS4Device.cs index 1f1f623..dee478e 100644 --- a/DS4Windows/DS4Library/DS4Device.cs +++ b/DS4Windows/DS4Library/DS4Device.cs @@ -1196,12 +1196,13 @@ namespace DS4Windows return pState.Clone(); } - public void getExposedState(DS4StateExposed expState, DS4State state) + /*public void getExposedState(DS4StateExposed expState, DS4State state) { cState.CopyTo(state); - expState.setAccel(accel); - expState.setGyro(gyro); + //expState.setAccel(accel); + //expState.setGyro(gyro); } + */ public void getCurrentState(DS4State state) { diff --git a/DS4Windows/DS4Library/DS4Sixaxis.cs b/DS4Windows/DS4Library/DS4Sixaxis.cs index c9201e9..705c43b 100644 --- a/DS4Windows/DS4Library/DS4Sixaxis.cs +++ b/DS4Windows/DS4Library/DS4Sixaxis.cs @@ -74,6 +74,7 @@ namespace DS4Windows sPrev = new SixAxis(lastGyroX, lastGyroY, lastGyroZ, lastAX, lastAY, lastAZ, lastMilliseconds); now = new SixAxis(currentX, currentY, currentZ, AccelX, AccelY, AccelZ, milliseconds, sPrev); args = new SixAxisEventArgs(state.ReportTimeStamp, now); + state.Motion = now; SixAccelMoved(this, args); } diff --git a/DS4Windows/DS4Library/DS4State.cs b/DS4Windows/DS4Library/DS4State.cs index 4b75b5f..73ccb6a 100644 --- a/DS4Windows/DS4Library/DS4State.cs +++ b/DS4Windows/DS4Library/DS4State.cs @@ -23,6 +23,7 @@ namespace DS4Windows public double LYUnit; public double RXUnit; public double RYUnit; + public SixAxis Motion = null; public static readonly int DEFAULT_AXISDIR_VALUE = 127; public DS4State() @@ -45,6 +46,7 @@ namespace DS4Windows LYUnit = 0.0; RXUnit = 0.0; RYUnit = 0.0; + Motion = null; } public DS4State(DS4State state) @@ -91,6 +93,7 @@ namespace DS4Windows LYUnit = state.LYUnit; RXUnit = state.RXUnit; RYUnit = state.RYUnit; + Motion = state.Motion; } public DS4State Clone() @@ -142,6 +145,7 @@ namespace DS4Windows state.LYUnit = LYUnit; state.RXUnit = RXUnit; state.RYUnit = RYUnit; + state.Motion = Motion; } public void calculateStickAngles() diff --git a/DS4Windows/DS4Library/DS4StateExposed.cs b/DS4Windows/DS4Library/DS4StateExposed.cs index bc9e1a0..d5ef8b8 100644 --- a/DS4Windows/DS4Library/DS4StateExposed.cs +++ b/DS4Windows/DS4Library/DS4StateExposed.cs @@ -4,13 +4,12 @@ namespace DS4Windows public class DS4StateExposed { private DS4State _state; - private byte[] accel = new byte[] { 0, 0, 0, 0, 0, 0 }, - gyro = new byte[] { 0, 0, 0, 0, 0, 0 }; public DS4StateExposed() { _state = new DS4State(); } + public DS4StateExposed(DS4State state) { _state = state; @@ -44,38 +43,26 @@ namespace DS4Windows byte R2 { get { return _state.R2; } } int Battery { get { return _state.Battery; } } - public byte[] Accel { set { accel = value; } } - public void setAccel(byte[] value) - { - accel = value; - } + public int GyroYaw { get { return -_state.Motion.gyroX; } } + public int GyroPitch { get { return _state.Motion.gyroY; } } + public int GyroRoll { get { return -_state.Motion.gyroZ; } } - public byte[] Gyro { set { gyro = value; } } - public void setGyro(byte[] value) - { - gyro = value; - } - - public int GyroYaw { get { return -(short)((ushort)(gyro[3] << 8) | gyro[2]) / 256; } } - public int GyroPitch { get { return (short)((ushort)(gyro[1] << 8) | gyro[0]) / 256; } } - public int GyroRoll { get { return -(short)((ushort)(gyro[5] << 8) | gyro[4]) / 256; } } - - public int AccelX { get { return (short)((ushort)(accel[1] << 8) | accel[0]) / 64; } } + public int AccelX { get { return _state.Motion.accelX; } } public int getAccelX() { - return (short)((ushort)(accel[1] << 8) | accel[0]) / 64; + return _state.Motion.accelX; } - public int AccelY { get { return (short)((ushort)(accel[3] << 8) | accel[2]) / 64; } } + public int AccelY { get { return _state.Motion.accelY; } } public int getAccelY() { - return (short)((ushort)(accel[3] << 8) | accel[2]) / 64; + return _state.Motion.accelY; } - public int AccelZ { get { return (short)((ushort)(accel[5] << 8) | accel[4]) / 64; } } + public int AccelZ { get { return _state.Motion.accelZ; } } public int getAccelZ() { - return (short)((ushort)(accel[5] << 8) | accel[4]) / 64; + return _state.Motion.accelZ; } } } From dba2b1bbb3bdae739cd5acf1cabbd1c7451eebe4 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Sun, 16 Jul 2017 07:11:58 -0500 Subject: [PATCH 12/24] Tweaks to how imu data is used --- DS4Windows/DS4Control/DS4StateFieldMapping.cs | 12 ++++++------ DS4Windows/DS4Control/Mapping.cs | 16 ++++++++-------- DS4Windows/DS4Control/MouseCursor.cs | 4 ++-- DS4Windows/DS4Forms/Options.cs | 6 +++--- DS4Windows/DS4Library/DS4Sixaxis.cs | 12 ++++++------ DS4Windows/DS4Library/DS4State.cs | 2 +- DS4Windows/DS4Library/DS4StateExposed.cs | 4 ++-- 7 files changed, 28 insertions(+), 28 deletions(-) diff --git a/DS4Windows/DS4Control/DS4StateFieldMapping.cs b/DS4Windows/DS4Control/DS4StateFieldMapping.cs index 6dca486..e8d88c7 100644 --- a/DS4Windows/DS4Control/DS4StateFieldMapping.cs +++ b/DS4Windows/DS4Control/DS4StateFieldMapping.cs @@ -90,13 +90,13 @@ namespace DS4Windows buttons[(int)DS4Controls.TouchUpper] = tp != null ? (!priorMouse ? tp.upperDown : tp.priorUpperDown) : false; buttons[(int)DS4Controls.TouchMulti] = tp != null ? (!priorMouse ? tp.multiDown : tp.priorMultiDown) : false; - int gyroX = exposeState.getAccelX(); - gryodirs[(int)DS4Controls.GyroXPos] = gyroX > 0 ? gyroX : 0; - gryodirs[(int)DS4Controls.GyroXNeg] = gyroX < 0 ? gyroX : 0; + int sixAxisX = -exposeState.getAccelX(); + gryodirs[(int)DS4Controls.GyroXPos] = sixAxisX > 0 ? sixAxisX : 0; + gryodirs[(int)DS4Controls.GyroXNeg] = sixAxisX < 0 ? sixAxisX : 0; - int gyroZ = exposeState.getAccelZ(); - gryodirs[(int)DS4Controls.GyroZPos] = gyroZ > 0 ? gyroZ : 0; - gryodirs[(int)DS4Controls.GyroZNeg] = gyroZ < 0 ? gyroZ : 0; + int sixAxisZ = exposeState.getAccelZ(); + gryodirs[(int)DS4Controls.GyroZPos] = sixAxisZ > 0 ? sixAxisZ : 0; + gryodirs[(int)DS4Controls.GyroZNeg] = sixAxisZ < 0 ? sixAxisZ : 0; swipedirs[(int)DS4Controls.SwipeLeft] = tp != null ? (!priorMouse ? tp.swipeLeftB : tp.priorSwipeLeftB): (byte)0; swipedirs[(int)DS4Controls.SwipeRight] = tp != null ? (!priorMouse ? tp.swipeRightB : tp.priorSwipeRightB) : (byte)0; diff --git a/DS4Windows/DS4Control/Mapping.cs b/DS4Windows/DS4Control/Mapping.cs index a7214ca..2513e51 100644 --- a/DS4Windows/DS4Control/Mapping.cs +++ b/DS4Windows/DS4Control/Mapping.cs @@ -2760,13 +2760,13 @@ namespace DS4Windows { case DS4Controls.GyroXPos: { - int gyroX = eState.AccelX; + int gyroX = -eState.AccelX; result = (byte)(!sOff && sxsens * gyroX > SXD * 10 ? Math.Min(255, sxsens * gyroX * 2) : 0); break; } case DS4Controls.GyroXNeg: { - int gyroX = eState.AccelX; + int gyroX = -eState.AccelX; result = (byte)(!sOff && sxsens * gyroX < -SXD * 10 ? Math.Min(255, sxsens * -gyroX * 2) : 0); break; } @@ -2882,8 +2882,8 @@ namespace DS4Windows switch (control) { - case DS4Controls.GyroXPos: result = !sOff ? SXSens[device] * eState.AccelX > 67 : false; break; - case DS4Controls.GyroXNeg: result = !sOff ? SXSens[device] * eState.AccelX < -67 : false; break; + case DS4Controls.GyroXPos: result = !sOff ? SXSens[device] * -eState.AccelX > 67 : false; break; + case DS4Controls.GyroXNeg: result = !sOff ? SXSens[device] * -eState.AccelX < -67 : false; break; case DS4Controls.GyroZPos: result = !sOff ? SZSens[device] * eState.AccelZ > 67 : false; break; case DS4Controls.GyroZNeg: result = !sOff ? SZSens[device] * eState.AccelZ < -67 : false; break; default: break; @@ -3548,18 +3548,18 @@ namespace DS4Windows { case DS4Controls.GyroXPos: { - if (!sOff && eState.AccelX > SXD * 10) + if (!sOff && -eState.AccelX > SXD * 10) { - if (alt) result = (byte)Math.Min(255, 127 + SXSens[device] * eState.AccelX); else result = (byte)Math.Max(0, 127 - SXSens[device] * eState.AccelX); + if (alt) result = (byte)Math.Min(255, 127 + SXSens[device] * -eState.AccelX); else result = (byte)Math.Max(0, 127 - SXSens[device] * -eState.AccelX); } else result = falseVal; break; } case DS4Controls.GyroXNeg: { - if (!sOff && eState.AccelX < -SXD * 10) + if (!sOff && -eState.AccelX < -SXD * 10) { - if (alt) result = (byte)Math.Min(255, 127 + SXSens[device] * -eState.AccelX); else result = (byte)Math.Max(0, 127 - SXSens[device] * -eState.AccelX); + if (alt) result = (byte)Math.Min(255, 127 + SXSens[device] * eState.AccelX); else result = (byte)Math.Max(0, 127 - SXSens[device] * eState.AccelX); } else result = falseVal; break; diff --git a/DS4Windows/DS4Control/MouseCursor.cs b/DS4Windows/DS4Control/MouseCursor.cs index a7683aa..1cd64ad 100644 --- a/DS4Windows/DS4Control/MouseCursor.cs +++ b/DS4Windows/DS4Control/MouseCursor.cs @@ -21,7 +21,7 @@ namespace DS4Windows private double GYRO_MOUSE_COEFFICIENT = 0.0095; private int GYRO_MOUSE_DEADZONE = 12; private double GYRO_MOUSE_OFFSET = 0.1463; - private double GYRO_SMOOTH_MOUSE_OFFSET = 0.14698; + private double GYRO_SMOOTH_MOUSE_OFFSET = 0.14695; private const int SMOOTH_BUFFER_LEN = 3; private double[] xSmoothBuffer = new double[SMOOTH_BUFFER_LEN]; @@ -41,7 +41,7 @@ namespace DS4Windows deltaX = Global.getGyroMouseHorizontalAxis(deviceNumber) == 0 ? arg.sixAxis.gyroYawFull : arg.sixAxis.gyroRollFull; deltaY = -arg.sixAxis.gyroPitchFull; - tempDouble = arg.sixAxis.elapsed * 0.001 * 250.0; + tempDouble = arg.sixAxis.elapsed * 0.001 * 250.0; // Base default speed on 4 ms gyroSmooth = Global.getGyroSmoothing(deviceNumber); double gyroSmoothWeight = 0.0; diff --git a/DS4Windows/DS4Forms/Options.cs b/DS4Windows/DS4Forms/Options.cs index f36d37e..249a496 100644 --- a/DS4Windows/DS4Forms/Options.cs +++ b/DS4Windows/DS4Forms/Options.cs @@ -805,8 +805,8 @@ namespace DS4Windows SetDynamicTrackBarValue(tBsixaxisGyroX, (exposeState.GyroYaw + tBsixaxisGyroX.Value * 2) / 3); SetDynamicTrackBarValue(tBsixaxisGyroY, (exposeState.GyroPitch + tBsixaxisGyroY.Value * 2) / 3); SetDynamicTrackBarValue(tBsixaxisGyroZ, (exposeState.GyroRoll + tBsixaxisGyroZ.Value * 2) / 3); - SetDynamicTrackBarValue(tBsixaxisAccelX, (-exposeState.AccelX + tBsixaxisAccelX.Value * 2) / 3); - SetDynamicTrackBarValue(tBsixaxisAccelY, (-exposeState.AccelY + tBsixaxisAccelY.Value * 2) / 3); + SetDynamicTrackBarValue(tBsixaxisAccelX, (exposeState.AccelX + tBsixaxisAccelX.Value * 2) / 3); + SetDynamicTrackBarValue(tBsixaxisAccelY, (exposeState.AccelY + tBsixaxisAccelY.Value * 2) / 3); SetDynamicTrackBarValue(tBsixaxisAccelZ, (exposeState.AccelZ + tBsixaxisAccelZ.Value * 2) / 3); int x = baseState.LX; @@ -899,7 +899,7 @@ namespace DS4Windows (int)(tempRSS * (btnRSTrack.Location.Y - pnlRSTrack.Size.Height / 2f) + pnlRSTrack.Size.Height / 2f)); } - x = -exposeState.AccelX + 127; + x = exposeState.AccelX + 127; y = exposeState.AccelZ + 127; btnSATrack.Location = new Point((int)(dpix * Global.Clamp(0, x / 2.09, pnlSATrack.Size.Width)), (int)(dpiy * Global.Clamp(0, y / 2.09, pnlSATrack.Size.Height))); diff --git a/DS4Windows/DS4Library/DS4Sixaxis.cs b/DS4Windows/DS4Library/DS4Sixaxis.cs index 705c43b..d7840ca 100644 --- a/DS4Windows/DS4Library/DS4Sixaxis.cs +++ b/DS4Windows/DS4Library/DS4Sixaxis.cs @@ -23,18 +23,18 @@ namespace DS4Windows public readonly SixAxis previousAxis = null; public SixAxis(int X, int Y, int Z, int aX, int aY, int aZ, double milliseconds, SixAxis prevAxis = null) { - gyroX = X / 256; + gyroX = -X / 256; gyroY = Y / 256; - gyroZ = Z / 256; + gyroZ = -Z / 256; gyroYawFull = -X; gyroPitchFull = Y; gyroRollFull = -Z; - accelX = aX / 64; - accelY = aY / 64; + accelX = -aX / 64; + accelY = -aY / 64; accelZ = aZ / 64; - accelXFull = aX; - accelYFull = aY; + accelXFull = -aX; + accelYFull = -aY; accelZFull = aZ; elapsed = milliseconds; diff --git a/DS4Windows/DS4Library/DS4State.cs b/DS4Windows/DS4Library/DS4State.cs index 73ccb6a..21e1e55 100644 --- a/DS4Windows/DS4Library/DS4State.cs +++ b/DS4Windows/DS4Library/DS4State.cs @@ -46,7 +46,7 @@ namespace DS4Windows LYUnit = 0.0; RXUnit = 0.0; RYUnit = 0.0; - Motion = null; + Motion = new SixAxis(0, 0, 0, 0, 0, 0, 0.0); } public DS4State(DS4State state) diff --git a/DS4Windows/DS4Library/DS4StateExposed.cs b/DS4Windows/DS4Library/DS4StateExposed.cs index d5ef8b8..b675768 100644 --- a/DS4Windows/DS4Library/DS4StateExposed.cs +++ b/DS4Windows/DS4Library/DS4StateExposed.cs @@ -43,9 +43,9 @@ namespace DS4Windows byte R2 { get { return _state.R2; } } int Battery { get { return _state.Battery; } } - public int GyroYaw { get { return -_state.Motion.gyroX; } } + public int GyroYaw { get { return _state.Motion.gyroX; } } public int GyroPitch { get { return _state.Motion.gyroY; } } - public int GyroRoll { get { return -_state.Motion.gyroZ; } } + public int GyroRoll { get { return _state.Motion.gyroZ; } } public int AccelX { get { return _state.Motion.accelX; } } public int getAccelX() From 9972e85e13542f953bb628079835403b41f73b3d Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Sun, 16 Jul 2017 19:42:43 -0500 Subject: [PATCH 13/24] More minor gyro changes --- DS4Windows/DS4Control/MouseCursor.cs | 2 +- DS4Windows/DS4Library/DS4Sixaxis.cs | 43 ++++++++++++++---------- DS4Windows/DS4Library/DS4StateExposed.cs | 6 ++-- 3 files changed, 30 insertions(+), 21 deletions(-) diff --git a/DS4Windows/DS4Control/MouseCursor.cs b/DS4Windows/DS4Control/MouseCursor.cs index 1cd64ad..51805e1 100644 --- a/DS4Windows/DS4Control/MouseCursor.cs +++ b/DS4Windows/DS4Control/MouseCursor.cs @@ -21,7 +21,7 @@ namespace DS4Windows private double GYRO_MOUSE_COEFFICIENT = 0.0095; private int GYRO_MOUSE_DEADZONE = 12; private double GYRO_MOUSE_OFFSET = 0.1463; - private double GYRO_SMOOTH_MOUSE_OFFSET = 0.14695; + private double GYRO_SMOOTH_MOUSE_OFFSET = 0.14696; private const int SMOOTH_BUFFER_LEN = 3; private double[] xSmoothBuffer = new double[SMOOTH_BUFFER_LEN]; diff --git a/DS4Windows/DS4Library/DS4Sixaxis.cs b/DS4Windows/DS4Library/DS4Sixaxis.cs index d7840ca..91e565b 100644 --- a/DS4Windows/DS4Library/DS4Sixaxis.cs +++ b/DS4Windows/DS4Library/DS4Sixaxis.cs @@ -15,7 +15,7 @@ namespace DS4Windows public class SixAxis { - public readonly int gyroX, gyroY, gyroZ, deltaX, deltaY, deltaZ, accelX, accelY, accelZ; + public readonly int gyroYaw, gyroPitch, gyroRoll, deltaX, deltaY, deltaZ, accelX, accelY, accelZ; public readonly int gyroYawFull, gyroPitchFull, gyroRollFull; public readonly int accelXFull, accelYFull, accelZFull; public readonly byte touchID; @@ -23,16 +23,18 @@ namespace DS4Windows public readonly SixAxis previousAxis = null; public SixAxis(int X, int Y, int Z, int aX, int aY, int aZ, double milliseconds, SixAxis prevAxis = null) { - gyroX = -X / 256; - gyroY = Y / 256; - gyroZ = -Z / 256; + gyroYaw = -X / 256; + gyroPitch = Y / 256; + gyroRoll = -Z / 256; gyroYawFull = -X; gyroPitchFull = Y; gyroRollFull = -Z; + // Put accel ranges between 0 - 128 abs accelX = -aX / 64; accelY = -aY / 64; accelZ = aZ / 64; + accelXFull = -aX; accelYFull = -aY; accelZFull = aZ; @@ -41,26 +43,29 @@ namespace DS4Windows previousAxis = prevAxis; if (previousAxis != null) { - deltaX = gyroX - previousAxis.gyroX; - deltaY = gyroY - previousAxis.gyroY; - deltaZ = gyroZ - previousAxis.gyroZ; + deltaX = gyroYaw - previousAxis.gyroYaw; + deltaY = gyroPitch - previousAxis.gyroPitch; + deltaZ = gyroRoll - previousAxis.gyroRoll; } } } public class DS4SixAxis { - public event EventHandler SixAccelMoved = null; // no status change for the touchpad itself... but other sensors may have changed, or you may just want to do some processing + // no status change for the touchpad itself... but other sensors may have changed, or you may just want to do some processing + public event EventHandler SixAccelMoved = null; + + internal int lastGyroYaw, lastGyroPitch, lastGyroRoll, + lastAX, lastAY, lastAZ; // tracks 0, 1 or 2 touches; we maintain touch 1 and 2 separately - internal int lastGyroX, lastGyroY, lastGyroZ, lastAX, lastAY, lastAZ; // tracks 0, 1 or 2 touches; we maintain touch 1 and 2 separately internal double lastMilliseconds; internal byte[] previousPacket = new byte[8]; public void handleSixaxis(byte[] gyro, byte[] accel, DS4State state, double milliseconds) { - int currentX = (short)((ushort)(gyro[3] << 8) | gyro[2]); // Gyro Yaw - int currentY = (short)((ushort)(gyro[1] << 8) | gyro[0]); // Gyro Pitch - int currentZ = (short)((ushort)(gyro[5] << 8) | gyro[4]); // Gyro Roll + int currentYaw = (short)((ushort)(gyro[3] << 8) | gyro[2]); // Gyro Yaw + int currentPitch = (short)((ushort)(gyro[1] << 8) | gyro[0]); // Gyro Pitch + int currentRoll = (short)((ushort)(gyro[5] << 8) | gyro[4]); // Gyro Roll int AccelX = (short)((ushort)(accel[1] << 8) | accel[0]); int AccelY = (short)((ushort)(accel[3] << 8) | accel[2]); int AccelZ = (short)((ushort)(accel[5] << 8) | accel[4]); @@ -71,16 +76,20 @@ namespace DS4Windows if (SixAccelMoved != null) { SixAxis sPrev = null, now = null; - sPrev = new SixAxis(lastGyroX, lastGyroY, lastGyroZ, lastAX, lastAY, lastAZ, lastMilliseconds); - now = new SixAxis(currentX, currentY, currentZ, AccelX, AccelY, AccelZ, milliseconds, sPrev); + sPrev = new SixAxis(lastGyroYaw, lastGyroPitch, lastGyroRoll, + lastAX, lastAY, lastAZ, lastMilliseconds); + + now = new SixAxis(currentYaw, currentPitch, currentRoll, + AccelX, AccelY, AccelZ, milliseconds, sPrev); + args = new SixAxisEventArgs(state.ReportTimeStamp, now); state.Motion = now; SixAccelMoved(this, args); } - lastGyroX = currentX; - lastGyroY = currentY; - lastGyroZ = currentZ; + lastGyroYaw = currentYaw; + lastGyroPitch = currentPitch; + lastGyroRoll = currentRoll; lastAX = AccelX; lastAY = AccelY; lastAZ = AccelZ; diff --git a/DS4Windows/DS4Library/DS4StateExposed.cs b/DS4Windows/DS4Library/DS4StateExposed.cs index b675768..c2ccd27 100644 --- a/DS4Windows/DS4Library/DS4StateExposed.cs +++ b/DS4Windows/DS4Library/DS4StateExposed.cs @@ -43,9 +43,9 @@ namespace DS4Windows byte R2 { get { return _state.R2; } } int Battery { get { return _state.Battery; } } - public int GyroYaw { get { return _state.Motion.gyroX; } } - public int GyroPitch { get { return _state.Motion.gyroY; } } - public int GyroRoll { get { return _state.Motion.gyroZ; } } + public int GyroYaw { get { return _state.Motion.gyroYaw; } } + public int GyroPitch { get { return _state.Motion.gyroPitch; } } + public int GyroRoll { get { return _state.Motion.gyroRoll; } } public int AccelX { get { return _state.Motion.accelX; } } public int getAccelX() From 8a6ecb9fe060b76f89d3a1fed882da2d4e36b96d Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Mon, 17 Jul 2017 17:50:18 -0500 Subject: [PATCH 14/24] Correct default BT poll rate option --- DS4Windows/DS4Forms/Options.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DS4Windows/DS4Forms/Options.cs b/DS4Windows/DS4Forms/Options.cs index 249a496..0bc16f4 100644 --- a/DS4Windows/DS4Forms/Options.cs +++ b/DS4Windows/DS4Forms/Options.cs @@ -616,7 +616,7 @@ namespace DS4Windows { cBFlashType.SelectedIndex = 0; cBWhileCharging.SelectedIndex = 0; - btPollRateComboBox.SelectedIndex = 0; + btPollRateComboBox.SelectedIndex = 4; lsOutCurveComboBox.SelectedIndex = 0; rsOutCurveComboBox.SelectedIndex = 0; rBTPMouse.Checked = true; From a335decc90f9f6ba6efe84d8803df98b1fba03e9 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Tue, 18 Jul 2017 14:21:03 -0500 Subject: [PATCH 15/24] Move accel dead zone calculations --- DS4Windows/DS4Control/Mapping.cs | 288 +++++++++++++++++----------- DS4Windows/DS4Library/DS4Device.cs | 8 - DS4Windows/DS4Library/DS4Sixaxis.cs | 7 +- 3 files changed, 176 insertions(+), 127 deletions(-) diff --git a/DS4Windows/DS4Control/Mapping.cs b/DS4Windows/DS4Control/Mapping.cs index 2513e51..2c64ace 100644 --- a/DS4Windows/DS4Control/Mapping.cs +++ b/DS4Windows/DS4Control/Mapping.cs @@ -875,6 +875,58 @@ namespace DS4Windows } } + bool sOff = isUsingSAforMouse(device); + if (!sOff) + { + double SXD = 10 * getSXDeadzone(device); + double SZD = 10 * getSZDeadzone(device); + double sxsens = getSXSens(device); + double szsens = getSZSens(device); + + int gyroX = cState.Motion.accelX; + int gyroZ = cState.Motion.accelZ; + + if (SXD > 0.0) + { + int absx = Math.Abs(gyroX); + if (absx > SXD) + { + cState.Motion.accelX = Math.Sign(gyroX) * + (int)Math.Min(128, sxsens * 128 * ((absx - SXD) / (128 - SXD))); + } + else + { + cState.Motion.accelX = 0; + } + } + else + { + int absx = Math.Abs(gyroX); + cState.Motion.accelX = Math.Sign(gyroX) * + (int)Math.Min(128, sxsens * 128 * (absx / (double)(128))); + } + + if (SZD > 0.0) + { + int absz = Math.Abs(gyroZ); + if (absz > SZD) + { + cState.Motion.accelZ = Math.Sign(gyroZ) * + (int)Math.Min(128, szsens * 128 * ((absz - SZD) / (128 - SZD))); + } + else + { + cState.Motion.accelZ = 0; + } + } + else + { + int absz = Math.Abs(gyroZ); + cState.Motion.accelZ = Math.Sign(gyroZ) * + (int)Math.Min(128, szsens * 128 * ((absz) / (double)(128))); + } + } + return dState; } @@ -2483,33 +2535,33 @@ namespace DS4Windows } else if (controlType == DS4StateFieldMapping.ControlType.GyroDir) { - double SXD = getSXDeadzone(device); - double SZD = getSZDeadzone(device); + //double SXD = getSXDeadzone(device); + //double SZD = getSZDeadzone(device); switch (control) { case DS4Controls.GyroXPos: { int gyroX = fieldMapping.gryodirs[controlNum]; - value = (byte)(gyroX > SXD * 10 ? Math.Pow(root + speed / divide, gyroX) : 0); + value = (byte)(gyroX > 0 ? Math.Pow(root + speed / divide, gyroX) : 0); break; } case DS4Controls.GyroXNeg: { int gyroX = fieldMapping.gryodirs[controlNum]; - value = (byte)(gyroX < -SXD * 10 ? Math.Pow(root + speed / divide, -gyroX) : 0); + value = (byte)(gyroX < 0 ? Math.Pow(root + speed / divide, -gyroX) : 0); break; } case DS4Controls.GyroZPos: { int gyroZ = fieldMapping.gryodirs[controlNum]; - value = (byte)(gyroZ > SZD * 10 ? Math.Pow(root + speed / divide, gyroZ) : 0); + value = (byte)(gyroZ > 0 ? Math.Pow(root + speed / divide, gyroZ) : 0); break; } case DS4Controls.GyroZNeg: { int gyroZ = fieldMapping.gryodirs[controlNum]; - value = (byte)(gyroZ < -SZD * 10 ? Math.Pow(root + speed / divide, -gyroZ) : 0); + value = (byte)(gyroZ < 0 ? Math.Pow(root + speed / divide, -gyroZ) : 0); break; } default: break; @@ -2633,36 +2685,40 @@ namespace DS4Windows } else if (controlType == DS4StateFieldMapping.ControlType.GyroDir) { - double SXD = getSXDeadzone(device); - double SZD = getSZDeadzone(device); + //double SXD = getSXDeadzone(device); + //double SZD = getSZDeadzone(device); bool sOff = isUsingSAforMouse(device); - double sxsens = getSXSens(device); - double szsens = getSZSens(device); + //double sxsens = getSXSens(device); + //double szsens = getSZSens(device); switch (control) { case DS4Controls.GyroXPos: { int gyroX = fieldMap.gryodirs[controlNum]; - result = (byte)(!sOff && sxsens * gyroX > SXD * 10 ? Math.Min(255, sxsens * gyroX * 2) : 0); + //result = (byte)(!sOff && sxsens * gyroX > SXD * 10 ? Math.Min(255, sxsens * gyroX * 2) : 0); + result = (byte)(!sOff ? Math.Min(255, gyroX * 2) : 0); break; } case DS4Controls.GyroXNeg: { int gyroX = fieldMap.gryodirs[controlNum]; - result = (byte)(!sOff && sxsens * gyroX < -SXD * 10 ? Math.Min(255, sxsens * -gyroX * 2) : 0); + //result = (byte)(!sOff && sxsens * gyroX < -SXD * 10 ? Math.Min(255, sxsens * -gyroX * 2) : 0); + result = (byte)(!sOff ? Math.Min(255, -gyroX * 2) : 0); break; } case DS4Controls.GyroZPos: { int gyroZ = fieldMap.gryodirs[controlNum]; - result = (byte)(!sOff && szsens * gyroZ > SZD * 10 ? Math.Min(255, szsens * gyroZ * 2) : 0); + //result = (byte)(!sOff && szsens * gyroZ > SZD * 10 ? Math.Min(255, szsens * gyroZ * 2) : 0); + result = (byte)(!sOff ? Math.Min(255, gyroZ * 2) : 0); break; } case DS4Controls.GyroZNeg: { int gyroZ = fieldMap.gryodirs[controlNum]; - result = (byte)(!sOff && szsens * gyroZ < -SZD * 10 ? Math.Min(255, szsens * -gyroZ * 2) : 0); + //result = (byte)(!sOff && szsens * gyroZ < -SZD * 10 ? Math.Min(255, szsens * -gyroZ * 2) : 0); + result = (byte)(!sOff ? Math.Min(255, -gyroZ * 2) : 0); break; } default: break; @@ -2975,117 +3031,117 @@ namespace DS4Windows switch (control) { case DS4Controls.LXNeg: + { + if (!analog) { - if (!analog) - { - double angle = cState.LSAngle; - result = cState.LX < 127 && (angle >= 210 && angle <= 330); - } - else - { - result = cState.LX < 127; - } - - break; + double angle = cState.LSAngle; + result = cState.LX < 127 && (angle >= 210 && angle <= 330); } + else + { + result = cState.LX < 127; + } + + break; + } case DS4Controls.LYNeg: + { + if (!analog) { - if (!analog) - { - double angle = cState.LSAngle; - result = cState.LY < 127 && (angle >= 300 || angle <= 60); - } - else - { - result = cState.LY < 127; - } - - break; + double angle = cState.LSAngle; + result = cState.LY < 127 && (angle >= 300 || angle <= 60); } + else + { + result = cState.LY < 127; + } + + break; + } case DS4Controls.RXNeg: + { + if (!analog) { - if (!analog) - { - double angle = cState.RSAngle; - result = cState.RX < 127 && (angle >= 210 && angle <= 330); - } - else - { - result = cState.RX < 127; - } - - break; + double angle = cState.RSAngle; + result = cState.RX < 127 && (angle >= 210 && angle <= 330); } + else + { + result = cState.RX < 127; + } + + break; + } case DS4Controls.RYNeg: + { + if (!analog) { - if (!analog) - { - double angle = cState.RSAngle; - result = cState.RY < 127 && (angle >= 300 || angle <= 60); - } - else - { - result = cState.RY < 127; - } - - break; + double angle = cState.RSAngle; + result = cState.RY < 127 && (angle >= 300 || angle <= 60); } + else + { + result = cState.RY < 127; + } + + break; + } case DS4Controls.LXPos: + { + if (!analog) { - if (!analog) - { - double angle = cState.LSAngle; - result = cState.LX > 127 && (angle >= 30 && angle <= 150); - } - else - { - result = cState.LX > 127; - } - - break; + double angle = cState.LSAngle; + result = cState.LX > 127 && (angle >= 30 && angle <= 150); } + else + { + result = cState.LX > 127; + } + + break; + } case DS4Controls.LYPos: + { + if (!analog) { - if (!analog) - { - double angle = cState.LSAngle; - result = cState.LY > 127 && (angle >= 120 && angle <= 240); - } - else - { - result = cState.LY > 127; - } - - break; + double angle = cState.LSAngle; + result = cState.LY > 127 && (angle >= 120 && angle <= 240); } + else + { + result = cState.LY > 127; + } + + break; + } case DS4Controls.RXPos: + { + if (!analog) { - if (!analog) - { - double angle = cState.RSAngle; - result = cState.RX > 127 && (angle >= 30 && angle <= 150); - } - else - { - result = cState.RX > 127; - } - - break; + double angle = cState.RSAngle; + result = cState.RX > 127 && (angle >= 30 && angle <= 150); } + else + { + result = cState.RX > 127; + } + + break; + } case DS4Controls.RYPos: + { + if (!analog) { - if (!analog) - { - double angle = cState.RSAngle; - result = cState.RY > 127 && (angle >= 120 && angle <= 240); - } - else - { - result = cState.RY > 127; - } - - break; + double angle = cState.RSAngle; + result = cState.RY > 127 && (angle >= 120 && angle <= 240); } + else + { + result = cState.RY > 127; + } + + break; + } default: break; } } @@ -3108,10 +3164,10 @@ namespace DS4Windows switch (control) { - case DS4Controls.GyroXPos: safeTest = SXSens[device] * fieldMap.gryodirs[controlNum] > 67; break; - case DS4Controls.GyroXNeg: safeTest = SXSens[device] * fieldMap.gryodirs[controlNum] < -67; break; - case DS4Controls.GyroZPos: safeTest = SZSens[device] * fieldMap.gryodirs[controlNum] > 67; break; - case DS4Controls.GyroZNeg: safeTest = SZSens[device] * fieldMap.gryodirs[controlNum] < -67; break; + case DS4Controls.GyroXPos: safeTest = fieldMap.gryodirs[controlNum] > 67; break; + case DS4Controls.GyroXNeg: safeTest = fieldMap.gryodirs[controlNum] < -67; break; + case DS4Controls.GyroZPos: safeTest = fieldMap.gryodirs[controlNum] > 67; break; + case DS4Controls.GyroZNeg: safeTest = fieldMap.gryodirs[controlNum] < -67; break; default: break; } @@ -3408,44 +3464,44 @@ namespace DS4Windows } else if (controlType == DS4StateFieldMapping.ControlType.GyroDir) { - double SXD = getSXDeadzone(device); - double SZD = getSZDeadzone(device); + //double SXD = getSXDeadzone(device); + //double SZD = getSZDeadzone(device); bool sOff = isUsingSAforMouse(device); switch (control) { case DS4Controls.GyroXPos: { - if (!sOff && fieldMap.gryodirs[controlNum] > SXD * 10) + if (!sOff && fieldMap.gryodirs[controlNum] > 0) { - if (alt) result = (byte)Math.Min(255, 127 + SXSens[device] * fieldMap.gryodirs[controlNum]); else result = (byte)Math.Max(0, 127 - SXSens[device] * fieldMap.gryodirs[controlNum]); + if (alt) result = (byte)Math.Min(255, 127 + fieldMap.gryodirs[controlNum]); else result = (byte)Math.Max(0, 127 - fieldMap.gryodirs[controlNum]); } else result = falseVal; break; } case DS4Controls.GyroXNeg: { - if (!sOff && fieldMap.gryodirs[controlNum] < -SXD * 10) + if (!sOff && fieldMap.gryodirs[controlNum] < 0) { - if (alt) result = (byte)Math.Min(255, 127 + SXSens[device] * -fieldMap.gryodirs[controlNum]); else result = (byte)Math.Max(0, 127 - SXSens[device] * -fieldMap.gryodirs[controlNum]); + if (alt) result = (byte)Math.Min(255, 127 + -fieldMap.gryodirs[controlNum]); else result = (byte)Math.Max(0, 127 - -fieldMap.gryodirs[controlNum]); } else result = falseVal; break; } case DS4Controls.GyroZPos: { - if (!sOff && fieldMap.gryodirs[controlNum] > SZD * 10) + if (!sOff && fieldMap.gryodirs[controlNum] > 0) { - if (alt) result = (byte)Math.Min(255, 127 + SZSens[device] * fieldMap.gryodirs[controlNum]); else result = (byte)Math.Max(0, 127 - SZSens[device] * fieldMap.gryodirs[controlNum]); + if (alt) result = (byte)Math.Min(255, 127 + fieldMap.gryodirs[controlNum]); else result = (byte)Math.Max(0, 127 - fieldMap.gryodirs[controlNum]); } else return falseVal; break; } case DS4Controls.GyroZNeg: { - if (!sOff && fieldMap.gryodirs[controlNum] < -SZD * 10) + if (!sOff && fieldMap.gryodirs[controlNum] < 0) { - if (alt) result = (byte)Math.Min(255, 127 + SZSens[device] * -fieldMap.gryodirs[controlNum]); else result = (byte)Math.Max(0, 127 - SZSens[device] * -fieldMap.gryodirs[controlNum]); + if (alt) result = (byte)Math.Min(255, 127 + -fieldMap.gryodirs[controlNum]); else result = (byte)Math.Max(0, 127 - -fieldMap.gryodirs[controlNum]); } else result = falseVal; break; diff --git a/DS4Windows/DS4Library/DS4Device.cs b/DS4Windows/DS4Library/DS4Device.cs index dee478e..abcbf64 100644 --- a/DS4Windows/DS4Library/DS4Device.cs +++ b/DS4Windows/DS4Library/DS4Device.cs @@ -1196,14 +1196,6 @@ namespace DS4Windows return pState.Clone(); } - /*public void getExposedState(DS4StateExposed expState, DS4State state) - { - cState.CopyTo(state); - //expState.setAccel(accel); - //expState.setGyro(gyro); - } - */ - public void getCurrentState(DS4State state) { cState.CopyTo(state); diff --git a/DS4Windows/DS4Library/DS4Sixaxis.cs b/DS4Windows/DS4Library/DS4Sixaxis.cs index 91e565b..14c6aa6 100644 --- a/DS4Windows/DS4Library/DS4Sixaxis.cs +++ b/DS4Windows/DS4Library/DS4Sixaxis.cs @@ -15,13 +15,14 @@ namespace DS4Windows public class SixAxis { - public readonly int gyroYaw, gyroPitch, gyroRoll, deltaX, deltaY, deltaZ, accelX, accelY, accelZ; + public int gyroYaw, gyroPitch, gyroRoll, deltaX, deltaY, deltaZ, accelX, accelY, accelZ; public readonly int gyroYawFull, gyroPitchFull, gyroRollFull; - public readonly int accelXFull, accelYFull, accelZFull; + public int accelXFull, accelYFull, accelZFull; public readonly byte touchID; public readonly double elapsed; public readonly SixAxis previousAxis = null; - public SixAxis(int X, int Y, int Z, int aX, int aY, int aZ, double milliseconds, SixAxis prevAxis = null) + public SixAxis(int X, int Y, int Z, int aX, int aY, int aZ, + double milliseconds, SixAxis prevAxis = null) { gyroYaw = -X / 256; gyroPitch = Y / 256; From 8eb9d6391f02da376266d4d57f007a46e0938ad7 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Tue, 18 Jul 2017 15:37:01 -0500 Subject: [PATCH 16/24] Some optimizations --- DS4Windows/DS4Control/ControlService.cs | 12 +-- DS4Windows/DS4Control/DS4LightBar.cs | 15 ++-- DS4Windows/DS4Control/Mapping.cs | 109 ++++++++++------------- DS4Windows/DS4Control/MouseCursor.cs | 3 +- DS4Windows/DS4Forms/Options.cs | 16 ++-- DS4Windows/DS4Library/DS4Sixaxis.cs | 9 +- DS4Windows/DS4Library/DS4StateExposed.cs | 64 +++++++------ 7 files changed, 115 insertions(+), 113 deletions(-) diff --git a/DS4Windows/DS4Control/ControlService.cs b/DS4Windows/DS4Control/ControlService.cs index b304c0c..896b2ca 100644 --- a/DS4Windows/DS4Control/ControlService.cs +++ b/DS4Windows/DS4Control/ControlService.cs @@ -249,7 +249,7 @@ namespace DS4Windows DS4LightBar.updateLightBar(DS4Controllers[i], i, CurrentState[i], ExposedState[i], touchPad[i]); tempDevice.IsRemoved = true; - System.Threading.Thread.Sleep(50); + Thread.Sleep(50); } CurrentState[i].Battery = PreviousState[i].Battery = 0; // Reset for the next connection's initial status change. @@ -264,7 +264,7 @@ namespace DS4Windows } if (anyUnplugged) - System.Threading.Thread.Sleep(XINPUT_UNPLUG_SETTLE_TIME); + Thread.Sleep(XINPUT_UNPLUG_SETTLE_TIME); x360Bus.UnplugAll(); x360Bus.Stop(); @@ -963,9 +963,11 @@ namespace DS4Windows return result; } - public bool[] touchreleased = { true, true, true, true }, touchslid = { false, false, false, false }; - public byte[] oldtouchvalue = { 0, 0, 0, 0 }; - public int[] oldscrollvalue = { 0, 0, 0, 0 }; + public bool[] touchreleased = new bool[4] { true, true, true, true }, + touchslid = new bool[4] { false, false, false, false }; + + public byte[] oldtouchvalue = new byte[4] { 0, 0, 0, 0 }; + public int[] oldscrollvalue = new int[4] { 0, 0, 0, 0 }; protected virtual void CheckForTouchToggle(int deviceID, DS4State cState, DS4State pState) { diff --git a/DS4Windows/DS4Control/DS4LightBar.cs b/DS4Windows/DS4Control/DS4LightBar.cs index 78899e1..1e33ec9 100644 --- a/DS4Windows/DS4Control/DS4LightBar.cs +++ b/DS4Windows/DS4Control/DS4LightBar.cs @@ -18,13 +18,18 @@ namespace DS4Windows { 140, 140 }, { 168, 112 }, { 196, 84 }, - { 224, 56}, // on 80% of the time at 80, etc. + { 224, 56 }, // on 80% of the time at 80, etc. { 252, 28 } // on 90% of the time at 90 }; + static double[] counters = new double[4] { 0, 0, 0, 0 }; - public static Stopwatch[] fadewatches = { new Stopwatch(), new Stopwatch(), new Stopwatch(), new Stopwatch() }; + public static Stopwatch[] fadewatches = new Stopwatch[4] + { new Stopwatch(), new Stopwatch(), new Stopwatch(), new Stopwatch() }; + static bool[] fadedirection = new bool[4] { false, false, false, false }; - static DateTime[] oldnow = { DateTime.UtcNow, DateTime.UtcNow, DateTime.UtcNow, DateTime.UtcNow }; + static DateTime[] oldnow = new DateTime[4] + { DateTime.UtcNow, DateTime.UtcNow, DateTime.UtcNow, DateTime.UtcNow }; + public static bool[] forcelight = new bool[4] { false, false, false, false }; public static DS4Color[] forcedColor = new DS4Color[4]; public static byte[] forcedFlash = new byte[4]; @@ -291,10 +296,6 @@ namespace DS4Windows if (tempLightBarOnDuration != haptics.LightBarFlashDurationOn && tempLightBarOnDuration != 1 && haptics.LightBarFlashDurationOn == 0) haptics.LightBarFlashDurationOff = haptics.LightBarFlashDurationOn = 1; - // Comment out code for now. This condition gets hit too often and bogs down the GUI - //if (device.LightBarOnDuration == 1) //helps better reset the color - // System.Threading.Thread.Sleep(5); - device.pushHapticState(haptics); } diff --git a/DS4Windows/DS4Control/Mapping.cs b/DS4Windows/DS4Control/Mapping.cs index 2c64ace..731ce3c 100644 --- a/DS4Windows/DS4Control/Mapping.cs +++ b/DS4Windows/DS4Control/Mapping.cs @@ -59,7 +59,9 @@ namespace DS4Windows } public static SyntheticState globalState = new SyntheticState(); - public static SyntheticState[] deviceState = { new SyntheticState(), new SyntheticState(), new SyntheticState(), new SyntheticState() }; + public static SyntheticState[] deviceState = new SyntheticState[4] + { new SyntheticState(), new SyntheticState(), new SyntheticState(), + new SyntheticState() }; // TODO When we disconnect, process a null/dead state to release any keys or buttons. public static DateTime oldnow = DateTime.UtcNow; @@ -71,8 +73,8 @@ namespace DS4Windows static bool[] macroControl = new bool[25]; //actions - public static int[] fadetimer = { 0, 0, 0, 0 }; - public static int[] prevFadetimer = { 0, 0, 0, 0 }; + public static int[] fadetimer = new int[4] { 0, 0, 0, 0 }; + public static int[] prevFadetimer = new int[4] { 0, 0, 0, 0 }; public static DS4Color[] lastColor = new DS4Color[4]; public static List actionDone = new List(); //public static List[] actionDone = { new List(), new List(), new List(), new List() }; @@ -80,16 +82,17 @@ namespace DS4Windows public static SpecialAction[] untriggeraction = new SpecialAction[4]; public static DateTime[] nowAction = { DateTime.MinValue, DateTime.MinValue, DateTime.MinValue, DateTime.MinValue }; public static DateTime[] oldnowAction = { DateTime.MinValue, DateTime.MinValue, DateTime.MinValue, DateTime.MinValue }; - public static int[] untriggerindex = { -1, -1, -1, -1 }; - public static DateTime[] oldnowKeyAct = { DateTime.MinValue, DateTime.MinValue, DateTime.MinValue, DateTime.MinValue }; - //private static bool tappedOnce = false, firstTouch = false, secondtouchbegin = false; - //private static DateTime pastTime, firstTap, TimeofEnd; + public static int[] untriggerindex = new int[4] { -1, -1, -1, -1 }; + public static DateTime[] oldnowKeyAct = new DateTime[4] { DateTime.MinValue, + DateTime.MinValue, DateTime.MinValue, DateTime.MinValue }; + private static DS4Controls[] shiftTriggerMapping = { DS4Controls.None, DS4Controls.Cross, DS4Controls.Circle, DS4Controls.Square, DS4Controls.Triangle, DS4Controls.Options, DS4Controls.Share, DS4Controls.DpadUp, DS4Controls.DpadDown, DS4Controls.DpadLeft, DS4Controls.DpadRight, DS4Controls.PS, DS4Controls.L1, DS4Controls.R1, DS4Controls.L2, DS4Controls.R2, DS4Controls.L3, DS4Controls.R3, DS4Controls.TouchLeft, DS4Controls.TouchUpper, DS4Controls.TouchMulti, DS4Controls.TouchRight, DS4Controls.GyroZNeg, DS4Controls.GyroZPos, DS4Controls.GyroXPos, DS4Controls.GyroXNeg }; + private static int[] ds4ControlMapping = { 0, // DS4Control.None 16, // DS4Controls.LXNeg 20, // DS4Controls.LXPos @@ -128,13 +131,14 @@ namespace DS4Windows // Define here to save some time processing. // It is enough to feel a difference during gameplay. - private static int[] rsOutCurveModeArray = { 0, 0, 0, 0 }; - private static int[] lsOutCurveModeArray = { 0, 0, 0, 0 }; + private static int[] rsOutCurveModeArray = new int[4] { 0, 0, 0, 0 }; + private static int[] lsOutCurveModeArray = new int[4] { 0, 0, 0, 0 }; static bool tempBool = false; // Special macros static bool altTabDone = true; - static DateTime altTabNow = DateTime.UtcNow, oldAltTabNow = DateTime.UtcNow - TimeSpan.FromSeconds(1); + static DateTime altTabNow = DateTime.UtcNow, + oldAltTabNow = DateTime.UtcNow - TimeSpan.FromSeconds(1); // Mouse public static int mcounter = 34; @@ -347,6 +351,7 @@ namespace DS4Windows } state.SavePrevious(true); } + public enum Click { None, Left, Middle, Right, Fourth, Fifth, WUP, WDOWN }; public static void MapClick(int device, Click mouseClick) { @@ -394,17 +399,6 @@ namespace DS4Windows return value1 * percent + value2 * (1 - percent); } - /*static double Clamp(double min, double value, double max) - { - if (value > max) - return max; - else if (value < min) - return min; - else - return value; - } - */ - private static int ClampInt(int min, int value, int max) { return (value < min) ? min : (value > max) ? max : value; @@ -536,16 +530,16 @@ namespace DS4Windows double currentY = Global.Clamp(maxZoneYNegValue, dState.LY, maxZoneYPosValue); //currentX = (byte)((dState.LX >= 127.5f) ? Math.Min(dState.LX, maxZoneX) : Math.Max(dState.LX, maxZoneX)); //currentY = (byte)((dState.LY >= 127.5f) ? Math.Min(dState.LY, maxZoneY) : Math.Max(dState.LY, maxZoneY)); - tempOutputX = ((currentX - 127.5f - tempLsXDead) / (double)(maxZoneX - tempLsXDead)); - tempOutputY = ((currentY - 127.5f - tempLsYDead) / (double)(maxZoneY - tempLsYDead)); + tempOutputX = ((currentX - 127.5f - tempLsXDead) / (maxZoneX - tempLsXDead)); + tempOutputY = ((currentY - 127.5f - tempLsYDead) / (maxZoneY - tempLsYDead)); } } else { double currentX = Global.Clamp(maxZoneXNegValue, dState.LX, maxZoneXPosValue); double currentY = Global.Clamp(maxZoneYNegValue, dState.LY, maxZoneYPosValue); - tempOutputX = (currentX - 127.5f) / (double)(maxZoneX); - tempOutputY = (currentY - 127.5f) / (double)(maxZoneY); + tempOutputX = (currentX - 127.5f) / maxZoneX; + tempOutputY = (currentY - 127.5f) / maxZoneY; } double tempLsXAntiDeadPercent = 0.0, tempLsYAntiDeadPercent = 0.0; @@ -613,8 +607,8 @@ namespace DS4Windows double currentX = Global.Clamp(maxZoneXNegValue, dState.RX, maxZoneXPosValue); double currentY = Global.Clamp(maxZoneYNegValue, dState.RY, maxZoneYPosValue); - tempOutputX = ((currentX - 127.5f - tempRsXDead) / (double)(maxZoneX - tempRsXDead)); - tempOutputY = ((currentY - 127.5f - tempRsYDead) / (double)(maxZoneY - tempRsYDead)); + tempOutputX = ((currentX - 127.5f - tempRsXDead) / (maxZoneX - tempRsXDead)); + tempOutputY = ((currentY - 127.5f - tempRsYDead) / (maxZoneY - tempRsYDead)); //tempOutputX = ((dState.RX - 127.5f - tempRsXDead) / (double)(maxXValue - tempRsXDead)); //tempOutputY = ((dState.RY - 127.5f - tempRsYDead) / (double)(maxYValue - tempRsYDead)); } @@ -624,8 +618,8 @@ namespace DS4Windows double currentX = Global.Clamp(maxZoneXNegValue, dState.RX, maxZoneXPosValue); double currentY = Global.Clamp(maxZoneYNegValue, dState.RY, maxZoneYPosValue); - tempOutputX = (currentX - 127.5f) / (double)(maxZoneX); - tempOutputY = (currentY - 127.5f) / (double)(maxZoneY); + tempOutputX = (currentX - 127.5f) / maxZoneX; + tempOutputY = (currentY - 127.5f) / maxZoneY; //tempOutputX = ((dState.RX - 127.5f) / (double)(maxXValue)); //tempOutputY = ((dState.RY - 127.5f) / (double)(maxYValue)); } @@ -672,7 +666,7 @@ namespace DS4Windows if (cState.L2 > l2Deadzone) { double current = Global.Clamp(0, dState.L2, maxValue); - tempL2Output = ((current - l2Deadzone) / (double)(maxValue - l2Deadzone)); + tempL2Output = ((current - l2Deadzone) / (maxValue - l2Deadzone)); } else { @@ -710,7 +704,7 @@ namespace DS4Windows if (cState.R2 > r2Deadzone) { double current = Global.Clamp(0, dState.R2, maxValue); - tempR2Output = ((current - r2Deadzone) / (double)(maxValue - r2Deadzone)); + tempR2Output = ((current - r2Deadzone) / (maxValue - r2Deadzone)); } else { @@ -875,8 +869,8 @@ namespace DS4Windows } } - bool sOff = isUsingSAforMouse(device); - if (!sOff) + bool sOff = tempBool = isUsingSAforMouse(device); + if (sOff == false) { double SXD = 10 * getSXDeadzone(device); double SZD = 10 * getSZDeadzone(device); @@ -968,6 +962,7 @@ namespace DS4Windows X360Controls x3c; if (Enum.TryParse(key, true, out x3c)) return x3c; + switch (key) { case "Back": return X360Controls.Back; @@ -1011,8 +1006,9 @@ namespace DS4Windows case "Mouse Left": return X360Controls.MouseLeft; case "Mouse Right": return X360Controls.MouseRight; case "Unbound": return X360Controls.Unbound; - + default: break; } + return X360Controls.Unbound; } @@ -1088,7 +1084,6 @@ namespace DS4Windows } else if (actionType == DS4ControlSettings.ActionType.Key) { - //ushort value = ushort.Parse(action.ToString()); ushort value = Convert.ToUInt16(action); if (getBoolActionMapping2(device, dcs.control, cState, eState, tp, fieldMapping)) { @@ -2587,7 +2582,7 @@ namespace DS4Windows mcounter = 34; } - value *= 1 + (double)Math.Min(20000, (mouseaccel)) / 10000d; + value *= 1 + Math.Min(20000, (mouseaccel)) / 10000d; prevmouseaccel = mouseaccel; } @@ -2685,40 +2680,32 @@ namespace DS4Windows } else if (controlType == DS4StateFieldMapping.ControlType.GyroDir) { - //double SXD = getSXDeadzone(device); - //double SZD = getSZDeadzone(device); bool sOff = isUsingSAforMouse(device); - //double sxsens = getSXSens(device); - //double szsens = getSZSens(device); switch (control) { case DS4Controls.GyroXPos: { int gyroX = fieldMap.gryodirs[controlNum]; - //result = (byte)(!sOff && sxsens * gyroX > SXD * 10 ? Math.Min(255, sxsens * gyroX * 2) : 0); - result = (byte)(!sOff ? Math.Min(255, gyroX * 2) : 0); + result = (byte)(sOff == false ? Math.Min(255, gyroX * 2) : 0); break; } case DS4Controls.GyroXNeg: { int gyroX = fieldMap.gryodirs[controlNum]; - //result = (byte)(!sOff && sxsens * gyroX < -SXD * 10 ? Math.Min(255, sxsens * -gyroX * 2) : 0); - result = (byte)(!sOff ? Math.Min(255, -gyroX * 2) : 0); + result = (byte)(sOff == false ? Math.Min(255, -gyroX * 2) : 0); break; } case DS4Controls.GyroZPos: { int gyroZ = fieldMap.gryodirs[controlNum]; - //result = (byte)(!sOff && szsens * gyroZ > SZD * 10 ? Math.Min(255, szsens * gyroZ * 2) : 0); - result = (byte)(!sOff ? Math.Min(255, gyroZ * 2) : 0); + result = (byte)(sOff == false ? Math.Min(255, gyroZ * 2) : 0); break; } case DS4Controls.GyroZNeg: { int gyroZ = fieldMap.gryodirs[controlNum]; - //result = (byte)(!sOff && szsens * gyroZ < -SZD * 10 ? Math.Min(255, szsens * -gyroZ * 2) : 0); - result = (byte)(!sOff ? Math.Min(255, -gyroZ * 2) : 0); + result = (byte)(sOff == false ? Math.Min(255, -gyroZ * 2) : 0); break; } default: break; @@ -3002,14 +2989,14 @@ namespace DS4Windows switch (control) { - case DS4Controls.GyroXPos: safeTest = SXSens[device] * fieldMap.gryodirs[controlNum] > 67; break; - case DS4Controls.GyroXNeg: safeTest = SXSens[device] * fieldMap.gryodirs[controlNum] < -67; break; - case DS4Controls.GyroZPos: safeTest = SZSens[device] * fieldMap.gryodirs[controlNum] > 67; break; - case DS4Controls.GyroZNeg: safeTest = SZSens[device] * fieldMap.gryodirs[controlNum] < -67; break; + case DS4Controls.GyroXPos: safeTest = fieldMap.gryodirs[controlNum] > 67; break; + case DS4Controls.GyroXNeg: safeTest = fieldMap.gryodirs[controlNum] < -67; break; + case DS4Controls.GyroZPos: safeTest = fieldMap.gryodirs[controlNum] > 67; break; + case DS4Controls.GyroZNeg: safeTest = fieldMap.gryodirs[controlNum] < -67; break; default: break; } - result = !sOff ? safeTest : false; + result = sOff == false ? safeTest : false; } return result; @@ -3171,7 +3158,7 @@ namespace DS4Windows default: break; } - result = !sOff ? safeTest : false; + result = sOff == false ? safeTest : false; } return result; @@ -3421,7 +3408,7 @@ namespace DS4Windows if (controlType == DS4StateFieldMapping.ControlType.Button) { - result = (byte)(fieldMap.buttons[controlNum] ? trueVal : falseVal); + result = fieldMap.buttons[controlNum] ? trueVal : falseVal; } else if (controlType == DS4StateFieldMapping.ControlType.AxisDir) { @@ -3449,7 +3436,7 @@ namespace DS4Windows } else if (controlType == DS4StateFieldMapping.ControlType.Touch) { - result = (byte)(fieldMap.buttons[controlNum] ? trueVal : falseVal); + result = fieldMap.buttons[controlNum] ? trueVal : falseVal; } else if (controlType == DS4StateFieldMapping.ControlType.SwipeDir) { @@ -3464,15 +3451,13 @@ namespace DS4Windows } else if (controlType == DS4StateFieldMapping.ControlType.GyroDir) { - //double SXD = getSXDeadzone(device); - //double SZD = getSZDeadzone(device); bool sOff = isUsingSAforMouse(device); switch (control) { case DS4Controls.GyroXPos: { - if (!sOff && fieldMap.gryodirs[controlNum] > 0) + if (sOff == false && fieldMap.gryodirs[controlNum] > 0) { if (alt) result = (byte)Math.Min(255, 127 + fieldMap.gryodirs[controlNum]); else result = (byte)Math.Max(0, 127 - fieldMap.gryodirs[controlNum]); } @@ -3481,7 +3466,7 @@ namespace DS4Windows } case DS4Controls.GyroXNeg: { - if (!sOff && fieldMap.gryodirs[controlNum] < 0) + if (sOff == false && fieldMap.gryodirs[controlNum] < 0) { if (alt) result = (byte)Math.Min(255, 127 + -fieldMap.gryodirs[controlNum]); else result = (byte)Math.Max(0, 127 - -fieldMap.gryodirs[controlNum]); } @@ -3490,7 +3475,7 @@ namespace DS4Windows } case DS4Controls.GyroZPos: { - if (!sOff && fieldMap.gryodirs[controlNum] > 0) + if (sOff == false && fieldMap.gryodirs[controlNum] > 0) { if (alt) result = (byte)Math.Min(255, 127 + fieldMap.gryodirs[controlNum]); else result = (byte)Math.Max(0, 127 - fieldMap.gryodirs[controlNum]); } @@ -3499,7 +3484,7 @@ namespace DS4Windows } case DS4Controls.GyroZNeg: { - if (!sOff && fieldMap.gryodirs[controlNum] < 0) + if (sOff == false && fieldMap.gryodirs[controlNum] < 0) { if (alt) result = (byte)Math.Min(255, 127 + -fieldMap.gryodirs[controlNum]); else result = (byte)Math.Max(0, 127 - -fieldMap.gryodirs[controlNum]); } diff --git a/DS4Windows/DS4Control/MouseCursor.cs b/DS4Windows/DS4Control/MouseCursor.cs index 51805e1..60835e8 100644 --- a/DS4Windows/DS4Control/MouseCursor.cs +++ b/DS4Windows/DS4Control/MouseCursor.cs @@ -15,7 +15,8 @@ namespace DS4Windows /** Indicate x/y direction for doing jitter compensation, etc. */ public enum Direction { Negative, Neutral, Positive } // Track direction vector separately and very trivially for now. - private Direction horizontalDirection = Direction.Neutral, verticalDirection = Direction.Neutral; + private Direction horizontalDirection = Direction.Neutral, + verticalDirection = Direction.Neutral; private Direction hDirection = Direction.Neutral, vDirection = Direction.Neutral; private double GYRO_MOUSE_COEFFICIENT = 0.0095; diff --git a/DS4Windows/DS4Forms/Options.cs b/DS4Windows/DS4Forms/Options.cs index 0bc16f4..45c6678 100644 --- a/DS4Windows/DS4Forms/Options.cs +++ b/DS4Windows/DS4Forms/Options.cs @@ -802,12 +802,12 @@ namespace DS4Windows DS4StateExposed exposeState = Program.rootHub.ExposedState[tempDeviceNum]; DS4State baseState = Program.rootHub.getDS4State(tempDeviceNum); - SetDynamicTrackBarValue(tBsixaxisGyroX, (exposeState.GyroYaw + tBsixaxisGyroX.Value * 2) / 3); - SetDynamicTrackBarValue(tBsixaxisGyroY, (exposeState.GyroPitch + tBsixaxisGyroY.Value * 2) / 3); - SetDynamicTrackBarValue(tBsixaxisGyroZ, (exposeState.GyroRoll + tBsixaxisGyroZ.Value * 2) / 3); - SetDynamicTrackBarValue(tBsixaxisAccelX, (exposeState.AccelX + tBsixaxisAccelX.Value * 2) / 3); - SetDynamicTrackBarValue(tBsixaxisAccelY, (exposeState.AccelY + tBsixaxisAccelY.Value * 2) / 3); - SetDynamicTrackBarValue(tBsixaxisAccelZ, (exposeState.AccelZ + tBsixaxisAccelZ.Value * 2) / 3); + SetDynamicTrackBarValue(tBsixaxisGyroX, (exposeState.getGyroYaw() + tBsixaxisGyroX.Value * 2) / 3); + SetDynamicTrackBarValue(tBsixaxisGyroY, (exposeState.getGyroPitch() + tBsixaxisGyroY.Value * 2) / 3); + SetDynamicTrackBarValue(tBsixaxisGyroZ, (exposeState.getGyroRoll() + tBsixaxisGyroZ.Value * 2) / 3); + SetDynamicTrackBarValue(tBsixaxisAccelX, (exposeState.getAccelX() + tBsixaxisAccelX.Value * 2) / 3); + SetDynamicTrackBarValue(tBsixaxisAccelY, (exposeState.getAccelY() + tBsixaxisAccelY.Value * 2) / 3); + SetDynamicTrackBarValue(tBsixaxisAccelZ, (exposeState.getAccelZ() + tBsixaxisAccelZ.Value * 2) / 3); int x = baseState.LX; int y = baseState.LY; @@ -899,8 +899,8 @@ namespace DS4Windows (int)(tempRSS * (btnRSTrack.Location.Y - pnlRSTrack.Size.Height / 2f) + pnlRSTrack.Size.Height / 2f)); } - x = exposeState.AccelX + 127; - y = exposeState.AccelZ + 127; + x = exposeState.getAccelX() + 127; + y = exposeState.getAccelZ() + 127; btnSATrack.Location = new Point((int)(dpix * Global.Clamp(0, x / 2.09, pnlSATrack.Size.Width)), (int)(dpiy * Global.Clamp(0, y / 2.09, pnlSATrack.Size.Height))); double tempSXS = (double)nUDSXS.Value; diff --git a/DS4Windows/DS4Library/DS4Sixaxis.cs b/DS4Windows/DS4Library/DS4Sixaxis.cs index 14c6aa6..0639c75 100644 --- a/DS4Windows/DS4Library/DS4Sixaxis.cs +++ b/DS4Windows/DS4Library/DS4Sixaxis.cs @@ -53,20 +53,19 @@ namespace DS4Windows public class DS4SixAxis { - // no status change for the touchpad itself... but other sensors may have changed, or you may just want to do some processing public event EventHandler SixAccelMoved = null; internal int lastGyroYaw, lastGyroPitch, lastGyroRoll, - lastAX, lastAY, lastAZ; // tracks 0, 1 or 2 touches; we maintain touch 1 and 2 separately + lastAX, lastAY, lastAZ; internal double lastMilliseconds; internal byte[] previousPacket = new byte[8]; public void handleSixaxis(byte[] gyro, byte[] accel, DS4State state, double milliseconds) { - int currentYaw = (short)((ushort)(gyro[3] << 8) | gyro[2]); // Gyro Yaw - int currentPitch = (short)((ushort)(gyro[1] << 8) | gyro[0]); // Gyro Pitch - int currentRoll = (short)((ushort)(gyro[5] << 8) | gyro[4]); // Gyro Roll + int currentYaw = (short)((ushort)(gyro[3] << 8) | gyro[2]); + int currentPitch = (short)((ushort)(gyro[1] << 8) | gyro[0]); + int currentRoll = (short)((ushort)(gyro[5] << 8) | gyro[4]); int AccelX = (short)((ushort)(accel[1] << 8) | accel[0]); int AccelY = (short)((ushort)(accel[3] << 8) | accel[2]); int AccelZ = (short)((ushort)(accel[5] << 8) | accel[4]); diff --git a/DS4Windows/DS4Library/DS4StateExposed.cs b/DS4Windows/DS4Library/DS4StateExposed.cs index c2ccd27..56361d4 100644 --- a/DS4Windows/DS4Library/DS4StateExposed.cs +++ b/DS4Windows/DS4Library/DS4StateExposed.cs @@ -15,37 +15,51 @@ namespace DS4Windows _state = state; } - bool Square { get { return _state.Square; } } - bool Triangle { get { return _state.Triangle; } } - bool Circle { get { return _state.Circle; } } - bool Cross { get { return _state.Cross; } } - bool DpadUp { get { return _state.DpadUp; } } - bool DpadDown { get { return _state.DpadDown; } } - bool DpadLeft { get { return _state.DpadLeft; } } - bool DpadRight { get { return _state.DpadRight; } } - bool L1 { get { return _state.L1; } } - bool L3 { get { return _state.L3; } } - bool R1 { get { return _state.R1; } } - bool R3 { get { return _state.R3; } } - bool Share { get { return _state.Share; } } - bool Options { get { return _state.Options; } } - bool PS { get { return _state.PS; } } - bool Touch1 { get { return _state.Touch1; } } - bool Touch2 { get { return _state.Touch2; } } - bool TouchButton { get { return _state.TouchButton; } } - bool Touch1Finger { get { return _state.Touch1Finger; } } + bool Square { get { return _state.Square; } } + bool Triangle { get { return _state.Triangle; } } + bool Circle { get { return _state.Circle; } } + bool Cross { get { return _state.Cross; } } + bool DpadUp { get { return _state.DpadUp; } } + bool DpadDown { get { return _state.DpadDown; } } + bool DpadLeft { get { return _state.DpadLeft; } } + bool DpadRight { get { return _state.DpadRight; } } + bool L1 { get { return _state.L1; } } + bool L3 { get { return _state.L3; } } + bool R1 { get { return _state.R1; } } + bool R3 { get { return _state.R3; } } + bool Share { get { return _state.Share; } } + bool Options { get { return _state.Options; } } + bool PS { get { return _state.PS; } } + bool Touch1 { get { return _state.Touch1; } } + bool Touch2 { get { return _state.Touch2; } } + bool TouchButton { get { return _state.TouchButton; } } + bool Touch1Finger { get { return _state.Touch1Finger; } } bool Touch2Fingers { get { return _state.Touch2Fingers; } } - byte LX { get { return _state.LX; } } - byte RX { get { return _state.RX; } } - byte LY { get { return _state.LY; } } - byte RY { get { return _state.RY; } } - byte L2 { get { return _state.L2; } } - byte R2 { get { return _state.R2; } } + byte LX { get { return _state.LX; } } + byte RX { get { return _state.RX; } } + byte LY { get { return _state.LY; } } + byte RY { get { return _state.RY; } } + byte L2 { get { return _state.L2; } } + byte R2 { get { return _state.R2; } } int Battery { get { return _state.Battery; } } public int GyroYaw { get { return _state.Motion.gyroYaw; } } + public int getGyroYaw() + { + return _state.Motion.gyroYaw; + } + public int GyroPitch { get { return _state.Motion.gyroPitch; } } + public int getGyroPitch() + { + return _state.Motion.gyroPitch; + } + public int GyroRoll { get { return _state.Motion.gyroRoll; } } + public int getGyroRoll() + { + return _state.Motion.gyroRoll; + } public int AccelX { get { return _state.Motion.accelX; } } public int getAccelX() From 7ddd2c1bf51507c8e04f54b7c6d39e92590ed292 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Tue, 18 Jul 2017 17:28:16 -0500 Subject: [PATCH 17/24] Add sixaxis max zone setting --- DS4Windows/DS4Control/Mapping.cs | 27 ++-- DS4Windows/DS4Control/ScpUtil.cs | 36 +++++- DS4Windows/DS4Forms/Options.Designer.cs | 98 ++++++++++++--- DS4Windows/DS4Forms/Options.cs | 40 ++++++ DS4Windows/DS4Forms/Options.resx | 158 +++++++++++++++++++++--- 5 files changed, 312 insertions(+), 47 deletions(-) diff --git a/DS4Windows/DS4Control/Mapping.cs b/DS4Windows/DS4Control/Mapping.cs index 731ce3c..1805cec 100644 --- a/DS4Windows/DS4Control/Mapping.cs +++ b/DS4Windows/DS4Control/Mapping.cs @@ -872,21 +872,26 @@ namespace DS4Windows bool sOff = tempBool = isUsingSAforMouse(device); if (sOff == false) { - double SXD = 10 * getSXDeadzone(device); - double SZD = 10 * getSZDeadzone(device); + int SXD = (int)(10d * getSXDeadzone(device)); + int SZD = (int)(10d * getSZDeadzone(device)); + double SXMax = getSXMaxzone(device); + double SZMax = getSZMaxzone(device); double sxsens = getSXSens(device); double szsens = getSZSens(device); int gyroX = cState.Motion.accelX; int gyroZ = cState.Motion.accelZ; - if (SXD > 0.0) + int absx = Math.Abs(gyroX); + int absz = Math.Abs(gyroZ); + + if (SXD > 0 || SXMax < 1.0) { - int absx = Math.Abs(gyroX); + int maxValue = (int)(SXMax * 128d); if (absx > SXD) { cState.Motion.accelX = Math.Sign(gyroX) * - (int)Math.Min(128, sxsens * 128 * ((absx - SXD) / (128 - SXD))); + (int)Math.Min(128d, sxsens * 128d * ((absx - SXD) / (double)(maxValue - SXD))); } else { @@ -895,18 +900,17 @@ namespace DS4Windows } else { - int absx = Math.Abs(gyroX); cState.Motion.accelX = Math.Sign(gyroX) * - (int)Math.Min(128, sxsens * 128 * (absx / (double)(128))); + (int)Math.Min(128d, sxsens * 128d * (absx / 128d)); } - if (SZD > 0.0) + if (SZD > 0 || SZMax < 1.0) { - int absz = Math.Abs(gyroZ); + int maxValue = (int)(SZMax * 128d); if (absz > SZD) { cState.Motion.accelZ = Math.Sign(gyroZ) * - (int)Math.Min(128, szsens * 128 * ((absz - SZD) / (128 - SZD))); + (int)Math.Min(128d, szsens * 128d * ((absz - SZD) / (double)(maxValue - SZD))); } else { @@ -915,9 +919,8 @@ namespace DS4Windows } else { - int absz = Math.Abs(gyroZ); cState.Motion.accelZ = Math.Sign(gyroZ) * - (int)Math.Min(128, szsens * 128 * ((absz) / (double)(128))); + (int)Math.Min(128d, szsens * 128d * ((absz) / 128d)); } } diff --git a/DS4Windows/DS4Control/ScpUtil.cs b/DS4Windows/DS4Control/ScpUtil.cs index 38cfaaa..8cc209e 100644 --- a/DS4Windows/DS4Control/ScpUtil.cs +++ b/DS4Windows/DS4Control/ScpUtil.cs @@ -696,6 +696,18 @@ namespace DS4Windows return m_Config.SZDeadzone[index]; } + public static double[] SXMaxzone => m_Config.SXMaxzone; + public static double getSXMaxzone(int index) + { + return m_Config.SXMaxzone[index]; + } + + public static double[] SZMaxzone => m_Config.SZMaxzone; + public static double getSZMaxzone(int index) + { + return m_Config.SZMaxzone[index]; + } + public static int[] LSDeadzone => m_Config.LSDeadzone; public static int getLSDeadzone(int index) { @@ -1170,6 +1182,8 @@ namespace DS4Windows public int[] l2Maxzone = { 100, 100, 100, 100, 100 }, r2Maxzone = { 100, 100, 100, 100, 100 }; public double[] LSRotation = { 0.0, 0.0, 0.0, 0.0, 0.0 }, RSRotation = { 0.0, 0.0, 0.0, 0.0, 0.0 }; public double[] SXDeadzone = { 0.25, 0.25, 0.25, 0.25, 0.25 }, SZDeadzone = { 0.25, 0.25, 0.25, 0.25, 0.25 }; + public double[] SXMaxzone = new double[5] { 1.0, 1.0, 1.0, 1.0, 1.0 }, + SZMaxzone = new double[5] { 1.0, 1.0, 1.0, 1.0, 1.0 }; public double[] l2Sens = { 1, 1, 1, 1, 1 }, r2Sens = { 1, 1, 1, 1, 1 }; public double[] LSSens = { 1, 1, 1, 1, 1 }, RSSens = { 1, 1, 1, 1, 1 }; public double[] SXSens = { 1, 1, 1, 1, 1 }, SZSens = { 1, 1, 1, 1, 1 }; @@ -1480,6 +1494,9 @@ namespace DS4Windows XmlNode xmlSXD = m_Xdoc.CreateNode(XmlNodeType.Element, "SXDeadZone", null); xmlSXD.InnerText = SXDeadzone[device].ToString(); Node.AppendChild(xmlSXD); XmlNode xmlSZD = m_Xdoc.CreateNode(XmlNodeType.Element, "SZDeadZone", null); xmlSZD.InnerText = SZDeadzone[device].ToString(); Node.AppendChild(xmlSZD); + XmlNode xmlSXMaxzone = m_Xdoc.CreateNode(XmlNodeType.Element, "SXMaxZone", null); xmlSXMaxzone.InnerText = Convert.ToInt32(SXMaxzone[device] * 100.0).ToString(); Node.AppendChild(xmlSXMaxzone); + XmlNode xmlSZMaxzone = m_Xdoc.CreateNode(XmlNodeType.Element, "SZMaxZone", null); xmlSZMaxzone.InnerText = Convert.ToInt32(SZMaxzone[device] * 100.0).ToString(); Node.AppendChild(xmlSZMaxzone); + XmlNode xmlSens = m_Xdoc.CreateNode(XmlNodeType.Element, "Sensitivity", null); xmlSens.InnerText = $"{LSSens[device]}|{RSSens[device]}|{l2Sens[device]}|{r2Sens[device]}|{SXSens[device]}|{SZSens[device]}"; Node.AppendChild(xmlSens); @@ -2281,9 +2298,23 @@ namespace DS4Windows catch { RSMaxzone[device] = 100; missingSetting = true; } try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/SXDeadZone"); double.TryParse(Item.InnerText, out SXDeadzone[device]); } - catch { missingSetting = true; } + catch { SXDeadzone[device] = 0.25; missingSetting = true; } try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/SZDeadZone"); double.TryParse(Item.InnerText, out SZDeadzone[device]); } - catch { missingSetting = true; } + catch { SZDeadzone[device] = 0.25; missingSetting = true; } + + try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/SXMaxZone"); + int temp = 0; + int.TryParse(Item.InnerText, out temp); + SXMaxzone[device] = Math.Min(Math.Max(temp * 0.01, 0.0), 1.0); + } + catch { SXMaxzone[device] = 1.0; missingSetting = true; } + + try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/SZMaxZone"); + int temp = 0; + int.TryParse(Item.InnerText, out temp); + SZMaxzone[device] = Math.Min(Math.Max(temp * 0.01, 0.0), 1.0); + } + catch { SZMaxzone[device] = 1.0; missingSetting = true; } try { @@ -3465,6 +3496,7 @@ namespace DS4Windows LSRotation[device] = 0.0; RSRotation[device] = 0.0; SXDeadzone[device] = SZDeadzone[device] = 0.25; + SXMaxzone[device] = SZMaxzone[device] = 1.0; l2Sens[device] = r2Sens[device] = 1; LSSens[device] = RSSens[device] = 1; SXSens[device] = SZSens[device] = 1; diff --git a/DS4Windows/DS4Forms/Options.Designer.cs b/DS4Windows/DS4Forms/Options.Designer.cs index 8ab5c04..7fde628 100644 --- a/DS4Windows/DS4Forms/Options.Designer.cs +++ b/DS4Windows/DS4Forms/Options.Designer.cs @@ -294,6 +294,8 @@ this.rBSAControls = new System.Windows.Forms.RadioButton(); this.rBSAMouse = new System.Windows.Forms.RadioButton(); this.pnlSAMouse = new System.Windows.Forms.Panel(); + this.cBGyroMouseXAxis = new System.Windows.Forms.ComboBox(); + this.label16 = new System.Windows.Forms.Label(); this.lbGyroSmooth = new System.Windows.Forms.Label(); this.cBGyroSmooth = new System.Windows.Forms.CheckBox(); this.lbSmoothWeight = new System.Windows.Forms.Label(); @@ -343,9 +345,11 @@ this.shareToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.pSToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.alwaysOnToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.label17 = new System.Windows.Forms.Label(); + this.label18 = new System.Windows.Forms.Label(); + this.nUDSixAxisXMaxZone = new System.Windows.Forms.NumericUpDown(); + this.nUDSixAxisZMaxZone = new System.Windows.Forms.NumericUpDown(); this.advColorDialog = new DS4Windows.AdvancedColorDialog(); - this.label16 = new System.Windows.Forms.Label(); - this.cBGyroMouseXAxis = new System.Windows.Forms.ComboBox(); ((System.ComponentModel.ISupportInitialize)(this.nUDRainbow)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.tBBlueBar)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.tBGreenBar)).BeginInit(); @@ -433,6 +437,8 @@ ((System.ComponentModel.ISupportInitialize)(this.nUDSXS)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nUDSZS)).BeginInit(); this.cMGyroTriggers.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.nUDSixAxisXMaxZone)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nUDSixAxisZMaxZone)).BeginInit(); this.SuspendLayout(); // // lowColorChooserButton @@ -2792,6 +2798,10 @@ // // maxZoneTabPage // + this.maxZoneTabPage.Controls.Add(this.nUDSixAxisZMaxZone); + this.maxZoneTabPage.Controls.Add(this.nUDSixAxisXMaxZone); + this.maxZoneTabPage.Controls.Add(this.label18); + this.maxZoneTabPage.Controls.Add(this.label17); this.maxZoneTabPage.Controls.Add(this.nUDR2Maxzone); this.maxZoneTabPage.Controls.Add(this.nUDL2Maxzone); this.maxZoneTabPage.Controls.Add(this.label8); @@ -3127,6 +3137,22 @@ resources.ApplyResources(this.pnlSAMouse, "pnlSAMouse"); this.pnlSAMouse.Name = "pnlSAMouse"; // + // cBGyroMouseXAxis + // + this.cBGyroMouseXAxis.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cBGyroMouseXAxis.FormattingEnabled = true; + this.cBGyroMouseXAxis.Items.AddRange(new object[] { + resources.GetString("cBGyroMouseXAxis.Items"), + resources.GetString("cBGyroMouseXAxis.Items1")}); + resources.ApplyResources(this.cBGyroMouseXAxis, "cBGyroMouseXAxis"); + this.cBGyroMouseXAxis.Name = "cBGyroMouseXAxis"; + this.cBGyroMouseXAxis.SelectedIndexChanged += new System.EventHandler(this.cBGyroMouseXAxis_SelectedIndexChanged); + // + // label16 + // + resources.ApplyResources(this.label16, "label16"); + this.label16.Name = "label16"; + // // lbGyroSmooth // resources.ApplyResources(this.lbGyroSmooth, "lbGyroSmooth"); @@ -3653,21 +3679,59 @@ resources.ApplyResources(this.alwaysOnToolStripMenuItem, "alwaysOnToolStripMenuItem"); this.alwaysOnToolStripMenuItem.CheckedChanged += new System.EventHandler(this.SATrigger_CheckedChanged); // - // label16 + // label17 // - resources.ApplyResources(this.label16, "label16"); - this.label16.Name = "label16"; + resources.ApplyResources(this.label17, "label17"); + this.label17.Name = "label17"; // - // cBGyroMouseXAxis + // label18 // - this.cBGyroMouseXAxis.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cBGyroMouseXAxis.FormattingEnabled = true; - this.cBGyroMouseXAxis.Items.AddRange(new object[] { - resources.GetString("cBGyroMouseXAxis.Items"), - resources.GetString("cBGyroMouseXAxis.Items1")}); - resources.ApplyResources(this.cBGyroMouseXAxis, "cBGyroMouseXAxis"); - this.cBGyroMouseXAxis.Name = "cBGyroMouseXAxis"; - this.cBGyroMouseXAxis.SelectedIndexChanged += new System.EventHandler(this.cBGyroMouseXAxis_SelectedIndexChanged); + resources.ApplyResources(this.label18, "label18"); + this.label18.Name = "label18"; + // + // nUDSixAxisXMaxZone + // + this.nUDSixAxisXMaxZone.DecimalPlaces = 2; + this.nUDSixAxisXMaxZone.Increment = new decimal(new int[] { + 1, + 0, + 0, + 65536}); + resources.ApplyResources(this.nUDSixAxisXMaxZone, "nUDSixAxisXMaxZone"); + this.nUDSixAxisXMaxZone.Maximum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.nUDSixAxisXMaxZone.Name = "nUDSixAxisXMaxZone"; + this.nUDSixAxisXMaxZone.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.nUDSixAxisXMaxZone.ValueChanged += new System.EventHandler(this.nUDSixAxisXMaxZone_ValueChanged); + // + // nUDSixAxisZMaxZone + // + this.nUDSixAxisZMaxZone.DecimalPlaces = 2; + this.nUDSixAxisZMaxZone.Increment = new decimal(new int[] { + 1, + 0, + 0, + 65536}); + resources.ApplyResources(this.nUDSixAxisZMaxZone, "nUDSixAxisZMaxZone"); + this.nUDSixAxisZMaxZone.Maximum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.nUDSixAxisZMaxZone.Name = "nUDSixAxisZMaxZone"; + this.nUDSixAxisZMaxZone.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.nUDSixAxisZMaxZone.ValueChanged += new System.EventHandler(this.nUDSixAxisZMaxZone_ValueChanged); // // Options // @@ -3786,6 +3850,8 @@ ((System.ComponentModel.ISupportInitialize)(this.nUDSXS)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.nUDSZS)).EndInit(); this.cMGyroTriggers.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.nUDSixAxisXMaxZone)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nUDSixAxisZMaxZone)).EndInit(); this.ResumeLayout(false); } @@ -4110,5 +4176,9 @@ private System.Windows.Forms.ComboBox touchpadInvertComboBox; private System.Windows.Forms.ComboBox cBGyroMouseXAxis; private System.Windows.Forms.Label label16; + private System.Windows.Forms.NumericUpDown nUDSixAxisZMaxZone; + private System.Windows.Forms.NumericUpDown nUDSixAxisXMaxZone; + private System.Windows.Forms.Label label18; + private System.Windows.Forms.Label label17; } } \ No newline at end of file diff --git a/DS4Windows/DS4Forms/Options.cs b/DS4Windows/DS4Forms/Options.cs index 45c6678..512cd10 100644 --- a/DS4Windows/DS4Forms/Options.cs +++ b/DS4Windows/DS4Forms/Options.cs @@ -497,6 +497,7 @@ namespace DS4Windows { nUDSX.Value = 0.25m; } + try { nUDSZ.Value = (decimal)SZDeadzone[device]; @@ -505,6 +506,25 @@ namespace DS4Windows { nUDSZ.Value = 0.25m; } + + try + { + nUDSixAxisXMaxZone.Value = (decimal)SXMaxzone[device]; + } + catch + { + nUDSixAxisXMaxZone.Value = 1.0m; + } + + try + { + nUDSixAxisZMaxZone.Value = (decimal)SZMaxzone[device]; + } + catch + { + nUDSixAxisZMaxZone.Value = 1.0m; + } + try { nUDL2S.Value = Math.Round((decimal)L2Sens[device], 2); @@ -677,6 +697,8 @@ namespace DS4Windows nUDRSRotation.Value = 0; nUDSX.Value = .25m; nUDSZ.Value = .25m; + nUDSixAxisXMaxZone.Value = 1.0m; + nUDSixAxisZMaxZone.Value = 1.0m; nUDL2S.Value = 1; nUDR2S.Value = 1; @@ -1335,6 +1357,8 @@ namespace DS4Windows FlashAt[device] = (int)nUDflashLED.Value; SXDeadzone[device] = (double)nUDSX.Value; SZDeadzone[device] = (double)nUDSZ.Value; + SXMaxzone[device] = (double)nUDSixAxisXMaxZone.Value; + SZMaxzone[device] = (double)nUDSixAxisZMaxZone.Value; MouseAccel[device] = cBMouseAccel.Checked; DinputOnly[device] = cBDinput.Checked; StartTouchpadOff[device] = cbStartTouchpadOff.Checked; @@ -2920,6 +2944,22 @@ namespace DS4Windows } } + private void nUDSixAxisXMaxZone_ValueChanged(object sender, EventArgs e) + { + if (!loading) + { + SXMaxzone[device] = (double)nUDSixAxisXMaxZone.Value; + } + } + + private void nUDSixAxisZMaxZone_ValueChanged(object sender, EventArgs e) + { + if (!loading) + { + SZMaxzone[device] = (double)nUDSixAxisZMaxZone.Value; + } + } + private void Options_Resize(object sender, EventArgs e) { fLPSettings.AutoScroll = false; diff --git a/DS4Windows/DS4Forms/Options.resx b/DS4Windows/DS4Forms/Options.resx index acab86f..0a999dc 100644 --- a/DS4Windows/DS4Forms/Options.resx +++ b/DS4Windows/DS4Forms/Options.resx @@ -1338,6 +1338,9 @@ True + + NoControl + 141, 66 @@ -6337,11 +6340,113 @@ with profile 1 + + 220, 29 + + + 40, 20 + + + 11 + + + nUDSixAxisZMaxZone + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + maxZoneTabPage + + + 0 + + + 220, 3 + + + 41, 20 + + + 10 + + + nUDSixAxisXMaxZone + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + maxZoneTabPage + + + 1 + + + True + + + NoControl + + + 162, 31 + + + 52, 13 + + + 9 + + + Sixaxis Z: + + + label18 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + maxZoneTabPage + + + 2 + + + True + + + NoControl + + + 162, 6 + + + 52, 13 + + + 8 + + + Sixaxis X: + + + label17 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + maxZoneTabPage + + + 3 + - 161, 29 + 114, 29 - 50, 20 + 40, 20 7 @@ -6356,13 +6461,13 @@ with profile maxZoneTabPage - 0 + 4 - 42, 29 + 36, 29 - 51, 20 + 41, 20 6 @@ -6377,7 +6482,7 @@ with profile maxZoneTabPage - 1 + 5 True @@ -6386,7 +6491,7 @@ with profile NoControl - 129, 31 + 85, 31 24, 13 @@ -6407,7 +6512,7 @@ with profile maxZoneTabPage - 2 + 6 True @@ -6437,13 +6542,13 @@ with profile maxZoneTabPage - 3 + 7 - 160, 3 + 114, 4 - 51, 20 + 40, 20 3 @@ -6458,7 +6563,7 @@ with profile maxZoneTabPage - 4 + 8 True @@ -6467,7 +6572,7 @@ with profile NoControl - 129, 5 + 85, 5 25, 13 @@ -6488,13 +6593,13 @@ with profile maxZoneTabPage - 5 + 9 - 42, 3 + 37, 3 - 51, 20 + 40, 20 1 @@ -6509,7 +6614,7 @@ with profile maxZoneTabPage - 6 + 10 True @@ -6539,7 +6644,7 @@ with profile maxZoneTabPage - 7 + 11 4, 22 @@ -6937,6 +7042,9 @@ with profile True + + NoControl + 125, 23 @@ -6985,6 +7093,9 @@ with profile True + + NoControl + 4, 22 @@ -7156,6 +7267,9 @@ with profile True + + NoControl + 167, 74 @@ -7183,6 +7297,9 @@ with profile True + + NoControl + 8, 145 @@ -8188,6 +8305,9 @@ with profile 1011, 481 + + NoControl + 4, 4, 4, 4 @@ -8492,7 +8612,7 @@ with profile advColorDialog - DS4Windows.AdvancedColorDialog, DS4Windows, Version=1.4.84.0, Culture=neutral, PublicKeyToken=null + DS4Windows.AdvancedColorDialog, DS4Windows, Version=1.4.85.0, Culture=neutral, PublicKeyToken=null Options From ec130f6156f9a4b865614d892ef7140d7a78634e Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Tue, 18 Jul 2017 19:44:55 -0500 Subject: [PATCH 18/24] Add sixaxis anti-deadzone settings --- DS4Windows/DS4Control/Mapping.cs | 33 +- DS4Windows/DS4Control/ScpUtil.cs | 56 +- DS4Windows/DS4Forms/Options.Designer.cs | 136 +- DS4Windows/DS4Forms/Options.cs | 38 + DS4Windows/DS4Forms/Options.resx | 3981 ++++++++++++++++++----- 5 files changed, 3410 insertions(+), 834 deletions(-) diff --git a/DS4Windows/DS4Control/Mapping.cs b/DS4Windows/DS4Control/Mapping.cs index 1805cec..e6223f9 100644 --- a/DS4Windows/DS4Control/Mapping.cs +++ b/DS4Windows/DS4Control/Mapping.cs @@ -876,51 +876,52 @@ namespace DS4Windows int SZD = (int)(10d * getSZDeadzone(device)); double SXMax = getSXMaxzone(device); double SZMax = getSZMaxzone(device); + double sxAntiDead = getSXAntiDeadzone(device); + double szAntiDead = getSZAntiDeadzone(device); double sxsens = getSXSens(device); double szsens = getSZSens(device); - int gyroX = cState.Motion.accelX; - int gyroZ = cState.Motion.accelZ; + int gyroX = cState.Motion.accelX, gyroZ = cState.Motion.accelZ; + int absx = Math.Abs(gyroX), absz = Math.Abs(gyroZ); - int absx = Math.Abs(gyroX); - int absz = Math.Abs(gyroZ); - - if (SXD > 0 || SXMax < 1.0) + if (SXD > 0 || SXMax < 1.0 || sxAntiDead > 0) { int maxValue = (int)(SXMax * 128d); if (absx > SXD) { - cState.Motion.accelX = Math.Sign(gyroX) * - (int)Math.Min(128d, sxsens * 128d * ((absx - SXD) / (double)(maxValue - SXD))); + double ratioX = (absx - SXD) / (double)(maxValue - SXD); + dState.Motion.accelX = Math.Sign(gyroX) * + (int)Math.Min(128d, sxsens * 128d * ((1.0 - sxAntiDead) * ratioX + sxAntiDead)); } else { - cState.Motion.accelX = 0; + dState.Motion.accelX = 0; } } else { - cState.Motion.accelX = Math.Sign(gyroX) * + dState.Motion.accelX = Math.Sign(gyroX) * (int)Math.Min(128d, sxsens * 128d * (absx / 128d)); } - if (SZD > 0 || SZMax < 1.0) + if (SZD > 0 || SZMax < 1.0 || szAntiDead > 0) { int maxValue = (int)(SZMax * 128d); if (absz > SZD) { - cState.Motion.accelZ = Math.Sign(gyroZ) * - (int)Math.Min(128d, szsens * 128d * ((absz - SZD) / (double)(maxValue - SZD))); + double ratioZ = (absz - SZD) / (double)(maxValue - SZD); + dState.Motion.accelZ = Math.Sign(gyroZ) * + (int)Math.Min(128d, szsens * 128d * ((1.0 - szAntiDead) * ratioZ + szAntiDead)); } else { - cState.Motion.accelZ = 0; + dState.Motion.accelZ = 0; } } else { - cState.Motion.accelZ = Math.Sign(gyroZ) * - (int)Math.Min(128d, szsens * 128d * ((absz) / 128d)); + dState.Motion.accelZ = Math.Sign(gyroZ) * + (int)Math.Min(128d, szsens * 128d * (absz / 128d)); } } diff --git a/DS4Windows/DS4Control/ScpUtil.cs b/DS4Windows/DS4Control/ScpUtil.cs index 8cc209e..fb5ffc0 100644 --- a/DS4Windows/DS4Control/ScpUtil.cs +++ b/DS4Windows/DS4Control/ScpUtil.cs @@ -696,18 +696,6 @@ namespace DS4Windows return m_Config.SZDeadzone[index]; } - public static double[] SXMaxzone => m_Config.SXMaxzone; - public static double getSXMaxzone(int index) - { - return m_Config.SXMaxzone[index]; - } - - public static double[] SZMaxzone => m_Config.SZMaxzone; - public static double getSZMaxzone(int index) - { - return m_Config.SZMaxzone[index]; - } - public static int[] LSDeadzone => m_Config.LSDeadzone; public static int getLSDeadzone(int index) { @@ -732,6 +720,18 @@ namespace DS4Windows return m_Config.RSAntiDeadzone[index]; } + public static double[] SXAntiDeadzone => m_Config.SXAntiDeadzone; + public static double getSXAntiDeadzone(int index) + { + return m_Config.SXAntiDeadzone[index]; + } + + public static double[] SZAntiDeadzone => m_Config.SZAntiDeadzone; + public static double getSZAntiDeadzone(int index) + { + return m_Config.SZAntiDeadzone[index]; + } + public static int[] LSMaxzone => m_Config.LSMaxzone; public static int getLSMaxzone(int index) { @@ -744,6 +744,18 @@ namespace DS4Windows return m_Config.RSMaxzone[index]; } + public static double[] SXMaxzone => m_Config.SXMaxzone; + public static double getSXMaxzone(int index) + { + return m_Config.SXMaxzone[index]; + } + + public static double[] SZMaxzone => m_Config.SZMaxzone; + public static double getSZMaxzone(int index) + { + return m_Config.SZMaxzone[index]; + } + public static int[] L2AntiDeadzone => m_Config.l2AntiDeadzone; public static int getL2AntiDeadzone(int index) { @@ -1184,6 +1196,8 @@ namespace DS4Windows public double[] SXDeadzone = { 0.25, 0.25, 0.25, 0.25, 0.25 }, SZDeadzone = { 0.25, 0.25, 0.25, 0.25, 0.25 }; public double[] SXMaxzone = new double[5] { 1.0, 1.0, 1.0, 1.0, 1.0 }, SZMaxzone = new double[5] { 1.0, 1.0, 1.0, 1.0, 1.0 }; + public double[] SXAntiDeadzone = new double[5] { 0.0, 0.0, 0.0, 0.0, 0.0 }, + SZAntiDeadzone = new double[5] { 0.0, 0.0, 0.0, 0.0, 0.0 }; public double[] l2Sens = { 1, 1, 1, 1, 1 }, r2Sens = { 1, 1, 1, 1, 1 }; public double[] LSSens = { 1, 1, 1, 1, 1 }, RSSens = { 1, 1, 1, 1, 1 }; public double[] SXSens = { 1, 1, 1, 1, 1 }, SZSens = { 1, 1, 1, 1, 1 }; @@ -1497,6 +1511,9 @@ namespace DS4Windows XmlNode xmlSXMaxzone = m_Xdoc.CreateNode(XmlNodeType.Element, "SXMaxZone", null); xmlSXMaxzone.InnerText = Convert.ToInt32(SXMaxzone[device] * 100.0).ToString(); Node.AppendChild(xmlSXMaxzone); XmlNode xmlSZMaxzone = m_Xdoc.CreateNode(XmlNodeType.Element, "SZMaxZone", null); xmlSZMaxzone.InnerText = Convert.ToInt32(SZMaxzone[device] * 100.0).ToString(); Node.AppendChild(xmlSZMaxzone); + XmlNode xmlSXAntiDeadzone = m_Xdoc.CreateNode(XmlNodeType.Element, "SXAntiDeadZone", null); xmlSXAntiDeadzone.InnerText = Convert.ToInt32(SXAntiDeadzone[device] * 100.0).ToString(); Node.AppendChild(xmlSXAntiDeadzone); + XmlNode xmlSZAntiDeadzone = m_Xdoc.CreateNode(XmlNodeType.Element, "SZAntiDeadZone", null); xmlSZAntiDeadzone.InnerText = Convert.ToInt32(SZAntiDeadzone[device] * 100.0).ToString(); Node.AppendChild(xmlSZAntiDeadzone); + XmlNode xmlSens = m_Xdoc.CreateNode(XmlNodeType.Element, "Sensitivity", null); xmlSens.InnerText = $"{LSSens[device]}|{RSSens[device]}|{l2Sens[device]}|{r2Sens[device]}|{SXSens[device]}|{SZSens[device]}"; Node.AppendChild(xmlSens); @@ -2316,6 +2333,20 @@ namespace DS4Windows } catch { SZMaxzone[device] = 1.0; missingSetting = true; } + try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/SXAntiDeadZone"); + int temp = 0; + int.TryParse(Item.InnerText, out temp); + SXAntiDeadzone[device] = Math.Min(Math.Max(temp * 0.01, 0.0), 1.0); + } + catch { SXAntiDeadzone[device] = 0.0; missingSetting = true; } + + try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/SZAntiDeadZone"); + int temp = 0; + int.TryParse(Item.InnerText, out temp); + SZAntiDeadzone[device] = Math.Min(Math.Max(temp * 0.01, 0.0), 1.0); + } + catch { SZAntiDeadzone[device] = 0.0; missingSetting = true; } + try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/Sensitivity"); @@ -3497,6 +3528,7 @@ namespace DS4Windows RSRotation[device] = 0.0; SXDeadzone[device] = SZDeadzone[device] = 0.25; SXMaxzone[device] = SZMaxzone[device] = 1.0; + SXAntiDeadzone[device] = SZAntiDeadzone[device] = 0.0; l2Sens[device] = r2Sens[device] = 1; LSSens[device] = RSSens[device] = 1; SXSens[device] = SZSens[device] = 1; diff --git a/DS4Windows/DS4Forms/Options.Designer.cs b/DS4Windows/DS4Forms/Options.Designer.cs index 7fde628..f40d0cf 100644 --- a/DS4Windows/DS4Forms/Options.Designer.cs +++ b/DS4Windows/DS4Forms/Options.Designer.cs @@ -264,6 +264,10 @@ this.nUDLSAntiDead = new System.Windows.Forms.NumericUpDown(); this.label1 = new System.Windows.Forms.Label(); this.maxZoneTabPage = new System.Windows.Forms.TabPage(); + this.nUDSixAxisZMaxZone = new System.Windows.Forms.NumericUpDown(); + this.nUDSixAxisXMaxZone = new System.Windows.Forms.NumericUpDown(); + this.label18 = new System.Windows.Forms.Label(); + this.label17 = new System.Windows.Forms.Label(); this.nUDR2Maxzone = new System.Windows.Forms.NumericUpDown(); this.nUDL2Maxzone = new System.Windows.Forms.NumericUpDown(); this.label8 = new System.Windows.Forms.Label(); @@ -345,11 +349,11 @@ this.shareToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.pSToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.alwaysOnToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.label17 = new System.Windows.Forms.Label(); - this.label18 = new System.Windows.Forms.Label(); - this.nUDSixAxisXMaxZone = new System.Windows.Forms.NumericUpDown(); - this.nUDSixAxisZMaxZone = new System.Windows.Forms.NumericUpDown(); this.advColorDialog = new DS4Windows.AdvancedColorDialog(); + this.label19 = new System.Windows.Forms.Label(); + this.label20 = new System.Windows.Forms.Label(); + this.nUDSixaxisXAntiDead = new System.Windows.Forms.NumericUpDown(); + this.nUDSixaxisZAntiDead = new System.Windows.Forms.NumericUpDown(); ((System.ComponentModel.ISupportInitialize)(this.nUDRainbow)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.tBBlueBar)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.tBGreenBar)).BeginInit(); @@ -412,6 +416,8 @@ ((System.ComponentModel.ISupportInitialize)(this.nUDRSAntiDead)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nUDLSAntiDead)).BeginInit(); this.maxZoneTabPage.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.nUDSixAxisZMaxZone)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nUDSixAxisXMaxZone)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nUDR2Maxzone)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nUDL2Maxzone)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nUDRSMaxZone)).BeginInit(); @@ -437,8 +443,8 @@ ((System.ComponentModel.ISupportInitialize)(this.nUDSXS)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nUDSZS)).BeginInit(); this.cMGyroTriggers.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nUDSixAxisXMaxZone)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.nUDSixAxisZMaxZone)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nUDSixaxisXAntiDead)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nUDSixaxisZAntiDead)).BeginInit(); this.SuspendLayout(); // // lowColorChooserButton @@ -2696,6 +2702,10 @@ // // antiDeadzoneTabPage // + this.antiDeadzoneTabPage.Controls.Add(this.nUDSixaxisZAntiDead); + this.antiDeadzoneTabPage.Controls.Add(this.nUDSixaxisXAntiDead); + this.antiDeadzoneTabPage.Controls.Add(this.label20); + this.antiDeadzoneTabPage.Controls.Add(this.label19); this.antiDeadzoneTabPage.Controls.Add(this.nUDR2AntiDead); this.antiDeadzoneTabPage.Controls.Add(this.label3); this.antiDeadzoneTabPage.Controls.Add(this.nUDL2AntiDead); @@ -2814,6 +2824,60 @@ this.maxZoneTabPage.Name = "maxZoneTabPage"; this.maxZoneTabPage.UseVisualStyleBackColor = true; // + // nUDSixAxisZMaxZone + // + this.nUDSixAxisZMaxZone.DecimalPlaces = 2; + this.nUDSixAxisZMaxZone.Increment = new decimal(new int[] { + 1, + 0, + 0, + 65536}); + resources.ApplyResources(this.nUDSixAxisZMaxZone, "nUDSixAxisZMaxZone"); + this.nUDSixAxisZMaxZone.Maximum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.nUDSixAxisZMaxZone.Name = "nUDSixAxisZMaxZone"; + this.nUDSixAxisZMaxZone.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.nUDSixAxisZMaxZone.ValueChanged += new System.EventHandler(this.nUDSixAxisZMaxZone_ValueChanged); + // + // nUDSixAxisXMaxZone + // + this.nUDSixAxisXMaxZone.DecimalPlaces = 2; + this.nUDSixAxisXMaxZone.Increment = new decimal(new int[] { + 1, + 0, + 0, + 65536}); + resources.ApplyResources(this.nUDSixAxisXMaxZone, "nUDSixAxisXMaxZone"); + this.nUDSixAxisXMaxZone.Maximum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.nUDSixAxisXMaxZone.Name = "nUDSixAxisXMaxZone"; + this.nUDSixAxisXMaxZone.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.nUDSixAxisXMaxZone.ValueChanged += new System.EventHandler(this.nUDSixAxisXMaxZone_ValueChanged); + // + // label18 + // + resources.ApplyResources(this.label18, "label18"); + this.label18.Name = "label18"; + // + // label17 + // + resources.ApplyResources(this.label17, "label17"); + this.label17.Name = "label17"; + // // nUDR2Maxzone // this.nUDR2Maxzone.DecimalPlaces = 2; @@ -3679,59 +3743,49 @@ resources.ApplyResources(this.alwaysOnToolStripMenuItem, "alwaysOnToolStripMenuItem"); this.alwaysOnToolStripMenuItem.CheckedChanged += new System.EventHandler(this.SATrigger_CheckedChanged); // - // label17 + // label19 // - resources.ApplyResources(this.label17, "label17"); - this.label17.Name = "label17"; + resources.ApplyResources(this.label19, "label19"); + this.label19.Name = "label19"; // - // label18 + // label20 // - resources.ApplyResources(this.label18, "label18"); - this.label18.Name = "label18"; + resources.ApplyResources(this.label20, "label20"); + this.label20.Name = "label20"; // - // nUDSixAxisXMaxZone + // nUDSixaxisXAntiDead // - this.nUDSixAxisXMaxZone.DecimalPlaces = 2; - this.nUDSixAxisXMaxZone.Increment = new decimal(new int[] { + this.nUDSixaxisXAntiDead.DecimalPlaces = 2; + this.nUDSixaxisXAntiDead.Increment = new decimal(new int[] { 1, 0, 0, 65536}); - resources.ApplyResources(this.nUDSixAxisXMaxZone, "nUDSixAxisXMaxZone"); - this.nUDSixAxisXMaxZone.Maximum = new decimal(new int[] { + resources.ApplyResources(this.nUDSixaxisXAntiDead, "nUDSixaxisXAntiDead"); + this.nUDSixaxisXAntiDead.Maximum = new decimal(new int[] { 1, 0, 0, 0}); - this.nUDSixAxisXMaxZone.Name = "nUDSixAxisXMaxZone"; - this.nUDSixAxisXMaxZone.Value = new decimal(new int[] { - 1, - 0, - 0, - 0}); - this.nUDSixAxisXMaxZone.ValueChanged += new System.EventHandler(this.nUDSixAxisXMaxZone_ValueChanged); + this.nUDSixaxisXAntiDead.Name = "nUDSixaxisXAntiDead"; + this.nUDSixaxisXAntiDead.ValueChanged += new System.EventHandler(this.nUDSixaxisXAntiDead_ValueChanged); // - // nUDSixAxisZMaxZone + // nUDSixaxisZAntiDead // - this.nUDSixAxisZMaxZone.DecimalPlaces = 2; - this.nUDSixAxisZMaxZone.Increment = new decimal(new int[] { + this.nUDSixaxisZAntiDead.DecimalPlaces = 2; + this.nUDSixaxisZAntiDead.Increment = new decimal(new int[] { 1, 0, 0, 65536}); - resources.ApplyResources(this.nUDSixAxisZMaxZone, "nUDSixAxisZMaxZone"); - this.nUDSixAxisZMaxZone.Maximum = new decimal(new int[] { + resources.ApplyResources(this.nUDSixaxisZAntiDead, "nUDSixaxisZAntiDead"); + this.nUDSixaxisZAntiDead.Maximum = new decimal(new int[] { 1, 0, 0, 0}); - this.nUDSixAxisZMaxZone.Name = "nUDSixAxisZMaxZone"; - this.nUDSixAxisZMaxZone.Value = new decimal(new int[] { - 1, - 0, - 0, - 0}); - this.nUDSixAxisZMaxZone.ValueChanged += new System.EventHandler(this.nUDSixAxisZMaxZone_ValueChanged); + this.nUDSixaxisZAntiDead.Name = "nUDSixaxisZAntiDead"; + this.nUDSixaxisZAntiDead.ValueChanged += new System.EventHandler(this.nUDSixaxisZAntiDead_ValueChanged); // // Options // @@ -3819,6 +3873,8 @@ ((System.ComponentModel.ISupportInitialize)(this.nUDLSAntiDead)).EndInit(); this.maxZoneTabPage.ResumeLayout(false); this.maxZoneTabPage.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.nUDSixAxisZMaxZone)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nUDSixAxisXMaxZone)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.nUDR2Maxzone)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.nUDL2Maxzone)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.nUDRSMaxZone)).EndInit(); @@ -3850,8 +3906,8 @@ ((System.ComponentModel.ISupportInitialize)(this.nUDSXS)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.nUDSZS)).EndInit(); this.cMGyroTriggers.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.nUDSixAxisXMaxZone)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.nUDSixAxisZMaxZone)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nUDSixaxisXAntiDead)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nUDSixaxisZAntiDead)).EndInit(); this.ResumeLayout(false); } @@ -4180,5 +4236,9 @@ private System.Windows.Forms.NumericUpDown nUDSixAxisXMaxZone; private System.Windows.Forms.Label label18; private System.Windows.Forms.Label label17; + private System.Windows.Forms.NumericUpDown nUDSixaxisZAntiDead; + private System.Windows.Forms.NumericUpDown nUDSixaxisXAntiDead; + private System.Windows.Forms.Label label20; + private System.Windows.Forms.Label label19; } } \ No newline at end of file diff --git a/DS4Windows/DS4Forms/Options.cs b/DS4Windows/DS4Forms/Options.cs index 512cd10..b816966 100644 --- a/DS4Windows/DS4Forms/Options.cs +++ b/DS4Windows/DS4Forms/Options.cs @@ -525,6 +525,24 @@ namespace DS4Windows nUDSixAxisZMaxZone.Value = 1.0m; } + try + { + nUDSixaxisXAntiDead.Value = (decimal)SXAntiDeadzone[device]; + } + catch + { + nUDSixaxisXAntiDead.Value = 0.0m; + } + + try + { + nUDSixaxisZAntiDead.Value = (decimal)SZAntiDeadzone[device]; + } + catch + { + nUDSixaxisZAntiDead.Value = 0.0m; + } + try { nUDL2S.Value = Math.Round((decimal)L2Sens[device], 2); @@ -699,6 +717,8 @@ namespace DS4Windows nUDSZ.Value = .25m; nUDSixAxisXMaxZone.Value = 1.0m; nUDSixAxisZMaxZone.Value = 1.0m; + nUDSixaxisXAntiDead.Value = 0.0m; + nUDSixaxisZAntiDead.Value = 0.0m; nUDL2S.Value = 1; nUDR2S.Value = 1; @@ -1359,6 +1379,8 @@ namespace DS4Windows SZDeadzone[device] = (double)nUDSZ.Value; SXMaxzone[device] = (double)nUDSixAxisXMaxZone.Value; SZMaxzone[device] = (double)nUDSixAxisZMaxZone.Value; + SXAntiDeadzone[device] = (double)nUDSixaxisXAntiDead.Value; + SZAntiDeadzone[device] = (double)nUDSixaxisZAntiDead.Value; MouseAccel[device] = cBMouseAccel.Checked; DinputOnly[device] = cBDinput.Checked; StartTouchpadOff[device] = cbStartTouchpadOff.Checked; @@ -2960,6 +2982,22 @@ namespace DS4Windows } } + private void nUDSixaxisXAntiDead_ValueChanged(object sender, EventArgs e) + { + if (loading == false) + { + SXAntiDeadzone[device] = (double)nUDSixaxisXAntiDead.Value; + } + } + + private void nUDSixaxisZAntiDead_ValueChanged(object sender, EventArgs e) + { + if (loading == false) + { + SZAntiDeadzone[device] = (double)nUDSixaxisZAntiDead.Value; + } + } + private void Options_Resize(object sender, EventArgs e) { fLPSettings.AutoScroll = false; diff --git a/DS4Windows/DS4Forms/Options.resx b/DS4Windows/DS4Forms/Options.resx index 0a999dc..86b19af 100644 --- a/DS4Windows/DS4Forms/Options.resx +++ b/DS4Windows/DS4Forms/Options.resx @@ -1335,6 +1335,138 @@ 1 + + pnlTPMouse + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBTouchpad + + + 0 + + + rBTPControls + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBTouchpad + + + 1 + + + rBTPMouse + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBTouchpad + + + 2 + + + fLPTouchSwipe + + + System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBTouchpad + + + 3 + + + 2, 259 + + + 270, 182 + + + 246 + + + Touchpad + + + gBTouchpad + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPControls + + + 1 + + + label15 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlTPMouse + + + 0 + + + touchpadInvertComboBox + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlTPMouse + + + 1 + + + cbStartTouchpadOff + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlTPMouse + + + 11 + + + -3, 39 + + + 2, 2, 2, 2 + + + 267, 129 + + + 257 + + + pnlTPMouse + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBTouchpad + + + 0 + True @@ -1428,30 +1560,6 @@ 11 - - -3, 39 - - - 2, 2, 2, 2 - - - 267, 129 - - - 257 - - - pnlTPMouse - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBTouchpad - - - 0 - True @@ -1518,156 +1626,126 @@ 2 + + bnSwipeUp + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + fLPTouchSwipe + + + 0 + + + lbSwipeUp + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + fLPTouchSwipe + + + 1 + + + bnSwipeDown + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + fLPTouchSwipe + + + 2 + + + lbSwipeDown + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + fLPTouchSwipe + + + 3 + + + bnSwipeLeft + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + fLPTouchSwipe + + + 4 + + + lbSwipeLeft + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + fLPTouchSwipe + + + 5 + + + bnSwipeRight + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + fLPTouchSwipe + + + 6 + + + lbSwipeRight + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + fLPTouchSwipe + + + 7 + + + 4, 55 + + + 260, 121 + + + 256 + + + fLPTouchSwipe + + + System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBTouchpad + + + 3 + 326, 13 - - False - - - 117, 22 - - - Control - - - 114, 6 - - - 117, 22 - - - Default - - - 127, 22 - - - Inverted - - - 127, 22 - - - Inverted X - - - 127, 22 - - - Inverted Y - - - 117, 22 - - - Dpad - - - 127, 22 - - - Inverted - - - 127, 22 - - - Inverted X - - - 127, 22 - - - Inverted Y - - - 117, 22 - - - Left Stick - - - 127, 22 - - - Inverted - - - 127, 22 - - - Inverted X - - - 127, 22 - - - Inverted Y - - - 117, 22 - - - Right Stick - - - 117, 22 - - - Face Buttons - - - 147, 22 - - - w/ Scan Code - - - False - - - 117, 22 - - - WASD - - - 147, 22 - - - w/ Scan Code - - - 117, 22 - - - Arrow Keys - - - 127, 22 - - - Inverted - - - 127, 22 - - - Inverted X - - - 127, 22 - - - Inverted Y - - - 117, 22 - - - Mouse - 118, 208 @@ -1707,6 +1785,153 @@ 0 + + False + + + 117, 22 + + + Control + + + 114, 6 + + + 117, 22 + + + Default + + + 117, 22 + + + Dpad + + + 127, 22 + + + Inverted + + + 127, 22 + + + Inverted X + + + 127, 22 + + + Inverted Y + + + 117, 22 + + + Left Stick + + + 127, 22 + + + Inverted + + + 127, 22 + + + Inverted X + + + 127, 22 + + + Inverted Y + + + 117, 22 + + + Right Stick + + + 127, 22 + + + Inverted + + + 127, 22 + + + Inverted X + + + 127, 22 + + + Inverted Y + + + 117, 22 + + + Face Buttons + + + False + + + 117, 22 + + + WASD + + + 147, 22 + + + w/ Scan Code + + + 117, 22 + + + Arrow Keys + + + 147, 22 + + + w/ Scan Code + + + 117, 22 + + + Mouse + + + 127, 22 + + + Inverted + + + 127, 22 + + + Inverted X + + + 127, 22 + + + Inverted Y + NoControl @@ -1929,50 +2154,173 @@ 7 - - 4, 55 + + btPollRateLabel - - 260, 121 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 256 + + gBOther - - fLPTouchSwipe + + 0 - - System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + btPollRateComboBox - - gBTouchpad + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + gBOther + + + 1 + + + enableTouchToggleCheckbox + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBOther + + + 2 + + + cBDinput + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBOther + + 3 - - 2, 259 + + pBProgram - - 270, 182 + + System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 246 + + gBOther - - Touchpad + + 4 - - gBTouchpad + + cBLaunchProgram - + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBOther + + + 5 + + + btnBrowse + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBOther + + + 6 + + + lbUseController + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBOther + + + 7 + + + cBMouseAccel + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBOther + + + 8 + + + nUDSixaxis + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBOther + + + 9 + + + cBControllerInput + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBOther + + + 10 + + + cBIdleDisconnect + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBOther + + + 12 + + + 281, 221 + + + 272, 256 + + + 247 + + + Other + + + gBOther + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - tPControls + + fLPSettings - - 1 + + 5 True @@ -2386,29 +2734,149 @@ with profile 12 - - 281, 221 + + btnRainbow - - 272, 256 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + gBLightbar + + + 0 + + + lbRainbowB + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBLightbar + + + 1 + + + nUDRainbowB + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBLightbar + + + 2 + + + cBFlashType + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBLightbar + + + 3 + + + cBWhileCharging + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBLightbar + + + 4 + + + btnFlashColor + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBLightbar + + + 5 + + + btnChargingColor + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBLightbar + + + 6 + + + lbWhileCharging + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBLightbar + + + 7 + + + lbPercentFlashBar + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBLightbar + + + 8 + + + nUDflashLED + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBLightbar + + + 9 + + + 3, 3 + + + 272, 244 + + 247 - - Other + + Lightbar - - gBOther + + gBLightbar - + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + fLPSettings - - 5 + + 0 NoControl @@ -2695,29 +3163,53 @@ with profile 9 - - 3, 3 + + lbPercentRumble - - 272, 244 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + gBRumble + + + 0 + + + btnRumbleLightTest + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBRumble + + + 1 + + + 281, 3 + + + 272, 46 + + 247 - - Lightbar + + Rumble - - gBLightbar + + gBRumble - + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + fLPSettings - - 0 + + 2 True @@ -2776,30 +3268,6 @@ with profile 1 - - 281, 3 - - - 272, 46 - - - 247 - - - Rumble - - - gBRumble - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPSettings - - - 2 - True @@ -2908,6 +3376,225 @@ with profile 153, 17 + + pnlSATrack + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + lbL2TrackS + + + 0 + + + lbL2Track + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + lbL2TrackS + + + 1 + + + lbRSTip + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + lbL2TrackS + + + 2 + + + lbInputDelay + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + lbL2TrackS + + + 3 + + + lbR2Track + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + lbL2TrackS + + + 4 + + + lbLSTip + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + lbL2TrackS + + + 5 + + + lbSATip + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + lbL2TrackS + + + 6 + + + tBR2 + + + System.Windows.Forms.TrackBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + lbL2TrackS + + + 7 + + + tBL2 + + + System.Windows.Forms.TrackBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + lbL2TrackS + + + 8 + + + pnlSixaxis + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + lbL2TrackS + + + 9 + + + pnlLSTrack + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + lbL2TrackS + + + 10 + + + pnlRSTrack + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + lbL2TrackS + + + 11 + + + 4, 22 + + + 3, 3, 3, 3 + + + 438, 455 + + + 2 + + + Controller Readings + + + lbL2TrackS + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tCControls + + + 2 + + + btnSATrack + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSATrack + + + 0 + + + btnSATrackS + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSATrack + + + 1 + + + 300, 88 + + + 2, 2, 2, 2 + + + 125, 125 + + + 252 + + + pnlSATrack + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + lbL2TrackS + + + 0 + False @@ -2971,30 +3658,6 @@ with profile 1 - - 300, 88 - - - 2, 2, 2, 2 - - - 125, 125 - - - 252 - - - pnlSATrack - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - lbL2TrackS - - - 0 - True @@ -3259,6 +3922,123 @@ with profile 8 + + tBsixaxisAccelX + + + System.Windows.Forms.TrackBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSixaxis + + + 0 + + + lb6Accel + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSixaxis + + + 1 + + + tBsixaxisGyroX + + + System.Windows.Forms.TrackBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSixaxis + + + 2 + + + lb6Gryo + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSixaxis + + + 3 + + + tBsixaxisGyroY + + + System.Windows.Forms.TrackBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSixaxis + + + 4 + + + tBsixaxisGyroZ + + + System.Windows.Forms.TrackBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSixaxis + + + 5 + + + tBsixaxisAccelY + + + System.Windows.Forms.TrackBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSixaxis + + + 6 + + + tBsixaxisAccelZ + + + System.Windows.Forms.TrackBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSixaxis + + + 7 + + + 300, 233 + + + 125, 125 + + + 236 + + + pnlSixaxis + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + lbL2TrackS + + + 9 + False @@ -3481,26 +4261,53 @@ with profile 7 - - 300, 233 + + btnLSTrack - + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlLSTrack + + + 0 + + + btnLSTrackS + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlLSTrack + + + 1 + + + 5, 88 + + + 2, 2, 2, 2 + + 125, 125 - - 236 + + 250 - - pnlSixaxis + + pnlLSTrack - + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + lbL2TrackS - - 9 + + 10 False @@ -3565,29 +4372,53 @@ with profile 1 - - 5, 88 + + btnRSTrackS - + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlRSTrack + + + 0 + + + btnRSTrack + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlRSTrack + + + 1 + + + 151, 88 + + 2, 2, 2, 2 - + 125, 125 - - 250 + + 251 - - pnlLSTrack + + pnlRSTrack - + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + lbL2TrackS - - 10 + + 11 False @@ -3652,56 +4483,122 @@ with profile 1 - - 151, 88 + + bnGyroZN - - 2, 2, 2, 2 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 125, 125 + + fLPTiltControls - - 251 + + 0 - - pnlRSTrack + + lbGyroZN - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - lbL2TrackS + + fLPTiltControls - - 11 + + 1 - - 4, 22 + + bnGyroZP - - 3, 3, 3, 3 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 438, 455 + + fLPTiltControls - + 2 - - Controller Readings + + lbGyroZP - - lbL2TrackS + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + fLPTiltControls - - tCControls + + 3 - - 2 + + bnGyroXP + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + fLPTiltControls + + + 4 + + + lbGyroXP + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + fLPTiltControls + + + 5 + + + bnGyroXN + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + fLPTiltControls + + + 6 + + + lbGyroXN + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + fLPTiltControls + + + 7 + + + 6, 51 + + + 271, 167 + + + 254 + + + fLPTiltControls + + + System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBGyro + + + 3 NoControl @@ -3919,30 +4816,120 @@ with profile 7 - - 6, 51 + + tPControls - - 271, 167 + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 254 + + tCControls - - fLPTiltControls + + 0 - - System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + tPSpecial - - gBGyro + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + tCControls + + + 1 + + + Left + + + 0, 0 + + + 446, 481 + + + 253 + + + tCControls + + + System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + 3 True + + lBControls + + + System.Windows.Forms.ListBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPControls + + + 0 + + + lbControlTip + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPControls + + + 2 + + + pnlController + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPControls + + + 3 + + + 4, 22 + + + 3, 3, 3, 3 + + + 438, 455 + + + 0 + + + Controls + + + tPControls + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tCControls + + + 0 + Top, Bottom, Left @@ -4102,6 +5089,654 @@ with profile Zoom + + pBHoveredButton + + + System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 0 + + + lbLRS + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 1 + + + lbLLS + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 2 + + + bnRSDown + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 3 + + + lbLTouchUpper + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 4 + + + lbLTouchRight + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 5 + + + bnL3 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 6 + + + lbLTouchLM + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 7 + + + bnRSUp + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 8 + + + lbLR2 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 9 + + + bnRSRight + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 10 + + + lbLL2 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 11 + + + bnR3 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 12 + + + lbLR1 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 13 + + + bnRSLeft + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 14 + + + lbLL1 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 15 + + + bnLSLeft + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 16 + + + lbLPS + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 17 + + + bnLSUp + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 18 + + + lbLLeft + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 19 + + + bnLSRight + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 20 + + + lbLright + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 21 + + + bnLSDown + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 22 + + + lbLDown + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 23 + + + bnR2 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 24 + + + bnUp + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 25 + + + bnDown + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 26 + + + bnTriangle + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 27 + + + bnR1 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 28 + + + bnSquare + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 29 + + + bnRight + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 30 + + + lbLUp + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 31 + + + bnLeft + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 32 + + + lbLShare + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 33 + + + bnOptions + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 34 + + + bnShare + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 35 + + + lbLOptions + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 36 + + + bnL1 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 37 + + + bnTouchRight + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 38 + + + bnL2 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 39 + + + lbLTriangle + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 40 + + + bnTouchLeft + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 41 + + + lbLSquare + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 42 + + + bnTouchMulti + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 43 + + + lbLCircle + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 44 + + + lbLCross + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 45 + + + bnTouchUpper + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 46 + + + btnLightbar + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 47 + + + bnPS + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 48 + + + bnCross + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 49 + + + bnCircle + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 50 + + + lbControlName + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 51 + + + 2, 2 + + + 2, 2, 2, 2 + + + 422, 230 + + + 282 + + + pnlController + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPControls + + + 3 + False @@ -5752,74 +7387,89 @@ with profile 51 - - 2, 2 + + pnlActions - - 2, 2, 2, 2 - - - 422, 230 - - - 282 - - - pnlController - - + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - tPControls + + tPSpecial - - 3 + + 0 - + 4, 22 - - 3, 3, 3, 3 - - + 438, 455 - - 0 + + 3 - - Controls + + Special Actions - - tPControls + + tPSpecial - + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + tCControls - + + 1 + + + lVActions + + + System.Windows.Forms.ListView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlActions + + 0 - - Name + + panel2 - - 140 + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Trigger + + pnlActions - - 105 + + 1 - - Action + + Fill - - 100 + + 0, 0 + + + 438, 455 + + + 15 + + + pnlActions + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPSpecial + + + 0 Fill @@ -5845,6 +7495,135 @@ with profile 0 + + Name + + + 140 + + + Trigger + + + 105 + + + Action + + + 100 + + + fLPActionButtons + + + System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel2 + + + 0 + + + lbActionsTip + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel2 + + + 1 + + + Top + + + 0, 0 + + + 2, 2, 2, 2 + + + 438, 66 + + + 16 + + + panel2 + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlActions + + + 1 + + + btnNewAction + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + fLPActionButtons + + + 0 + + + btnEditAction + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + fLPActionButtons + + + 1 + + + btnRemAction + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + fLPActionButtons + + + 2 + + + Fill + + + 0, 28 + + + 438, 38 + + + 15 + + + fLPActionButtons + + + System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel2 + + + 0 + NoControl @@ -5926,30 +7705,6 @@ with profile 2 - - Fill - - - 0, 28 - - - 438, 38 - - - 15 - - - fLPActionButtons - - - System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panel2 - - - 0 - Top @@ -5983,105 +7738,6 @@ with profile 1 - - Top - - - 0, 0 - - - 2, 2, 2, 2 - - - 438, 66 - - - 16 - - - panel2 - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlActions - - - 1 - - - Fill - - - 0, 0 - - - 438, 455 - - - 15 - - - pnlActions - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPSpecial - - - 0 - - - 4, 22 - - - 438, 455 - - - 3 - - - Special Actions - - - tPSpecial - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tCControls - - - 1 - - - Left - - - 0, 0 - - - 446, 481 - - - 253 - - - tCControls - - - System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 3 - 4, 22 @@ -6109,11 +7765,107 @@ with profile 0 + + 214, 29 + + + 47, 20 + + + 11 + + + nUDSixaxisZAntiDead + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + antiDeadzoneTabPage + + + 0 + + + 215, 4 + + + 46, 20 + + + 10 + + + nUDSixaxisXAntiDead + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + antiDeadzoneTabPage + + + 1 + + + True + + + 160, 31 + + + 52, 13 + + + 9 + + + Sixaxis Z: + + + label20 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + antiDeadzoneTabPage + + + 2 + + + True + + + 160, 6 + + + 52, 13 + + + 8 + + + Sixaxis X: + + + label19 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + antiDeadzoneTabPage + + + 3 + - 158, 30 + 107, 29 - 68, 20 + 44, 20 7 @@ -6128,7 +7880,7 @@ with profile antiDeadzoneTabPage - 0 + 4 True @@ -6137,7 +7889,7 @@ with profile NoControl - 117, 32 + 83, 31 24, 13 @@ -6158,13 +7910,13 @@ with profile antiDeadzoneTabPage - 1 + 5 - 51, 29 + 31, 29 - 50, 20 + 42, 20 5 @@ -6179,7 +7931,7 @@ with profile antiDeadzoneTabPage - 2 + 6 True @@ -6209,13 +7961,13 @@ with profile antiDeadzoneTabPage - 3 + 7 - 157, 4 + 108, 3 - 68, 20 + 43, 20 3 @@ -6230,7 +7982,7 @@ with profile antiDeadzoneTabPage - 4 + 8 True @@ -6239,7 +7991,7 @@ with profile NoControl - 116, 6 + 82, 6 25, 13 @@ -6260,13 +8012,13 @@ with profile antiDeadzoneTabPage - 5 + 9 - 50, 3 + 31, 3 - 50, 20 + 42, 20 1 @@ -6281,7 +8033,7 @@ with profile antiDeadzoneTabPage - 6 + 10 True @@ -6311,7 +8063,7 @@ with profile antiDeadzoneTabPage - 7 + 11 4, 22 @@ -6340,6 +8092,444 @@ with profile 1 + + nUDSixAxisZMaxZone + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + maxZoneTabPage + + + 0 + + + nUDSixAxisXMaxZone + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + maxZoneTabPage + + + 1 + + + label18 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + maxZoneTabPage + + + 2 + + + label17 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + maxZoneTabPage + + + 3 + + + nUDR2Maxzone + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + maxZoneTabPage + + + 4 + + + nUDL2Maxzone + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + maxZoneTabPage + + + 5 + + + label8 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + maxZoneTabPage + + + 6 + + + label7 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + maxZoneTabPage + + + 7 + + + nUDRSMaxZone + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + maxZoneTabPage + + + 8 + + + label6 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + maxZoneTabPage + + + 9 + + + nUDLSMaxZone + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + maxZoneTabPage + + + 10 + + + label5 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + maxZoneTabPage + + + 11 + + + 4, 22 + + + 3, 3, 3, 3 + + + 264, 52 + + + 3 + + + Max Zone + + + maxZoneTabPage + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tCSens + + + 2 + + + nUDLSCurve + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPCurve + + + 0 + + + nUDRSCurve + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPCurve + + + 1 + + + lbRSCurve + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPCurve + + + 2 + + + lbRSCurvePercent + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPCurve + + + 3 + + + lbLSCurvePercent + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPCurve + + + 4 + + + lbLSCurve + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPCurve + + + 5 + + + 4, 22 + + + 3, 3, 3, 3 + + + 264, 52 + + + 1 + + + Curve (Input) + + + tPCurve + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tCSens + + + 3 + + + rsOutCurveComboBox + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPOutCurve + + + 0 + + + lsOutCurveComboBox + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPOutCurve + + + 1 + + + label10 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPOutCurve + + + 2 + + + label9 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPOutCurve + + + 3 + + + 4, 22 + + + 264, 52 + + + 4 + + + Output Curve + + + tPOutCurve + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tCSens + + + 4 + + + nUDRSRotation + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpRotation + + + 0 + + + label14 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpRotation + + + 1 + + + nUDLSRotation + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpRotation + + + 2 + + + label13 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpRotation + + + 3 + + + 4, 22 + + + 3, 3, 3, 3 + + + 264, 52 + + + 5 + + + Rotation + + + tpRotation + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tCSens + + + 5 + + + 281, 55 + + + 272, 78 + + + 234 + + + tCSens + + + System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + fLPSettings + + + 3 + 220, 29 @@ -6646,33 +8836,6 @@ with profile 11 - - 4, 22 - - - 3, 3, 3, 3 - - - 264, 52 - - - 3 - - - Max Zone - - - maxZoneTabPage - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tCSens - - - 2 - 36, 16 @@ -6841,33 +9004,6 @@ with profile 5 - - 4, 22 - - - 3, 3, 3, 3 - - - 264, 52 - - - 1 - - - Curve (Input) - - - tPCurve - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tCSens - - - 3 - Linear @@ -6994,30 +9130,6 @@ with profile 3 - - 4, 22 - - - 264, 52 - - - 4 - - - Output Curve - - - tPOutCurve - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tCSens - - - 4 - 160, 21 @@ -7120,57 +9232,267 @@ with profile 3 - - 4, 22 - - - 3, 3, 3, 3 - - - 264, 52 - - - 5 - - - Rotation - - - tpRotation - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tCSens - - - 5 - - - 281, 55 - - - 272, 78 - - - 234 - - - tCSens - - - System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPSettings - - - 3 - True + + rBSAControls + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBGyro + + + 0 + + + rBSAMouse + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBGyro + + + 1 + + + pnlSAMouse + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBGyro + + + 2 + + + 3, 253 + + + 272, 224 + + + 248 + + + Gyro + + + gBGyro + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + fLPSettings + + + 1 + + + lbL2S + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBSensitivity + + + 0 + + + nUDL2S + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBSensitivity + + + 1 + + + nUDLSS + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBSensitivity + + + 2 + + + lbSixaxisXS + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBSensitivity + + + 3 + + + nUDR2S + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBSensitivity + + + 4 + + + lbSixaxisZS + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBSensitivity + + + 5 + + + nUDRSS + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBSensitivity + + + 6 + + + lbR2LS + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBSensitivity + + + 7 + + + nUDSXS + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBSensitivity + + + 8 + + + lbRSS + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBSensitivity + + + 9 + + + lbLSS + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBSensitivity + + + 10 + + + nUDSZS + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBSensitivity + + + 11 + + + 281, 139 + + + 272, 76 + + + 257 + + + Sensitivity + + + gBSensitivity + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + fLPSettings + + + 4 + + + Fill + + + TopDown + + + 446, 0 + + + 2, 2, 2, 2 + + + 565, 481 + + + 254 + + + fLPSettings + + + System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 2 + True @@ -7237,6 +9559,234 @@ with profile 1 + + cBGyroMouseXAxis + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSAMouse + + + 0 + + + label16 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSAMouse + + + 1 + + + lbGyroSmooth + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSAMouse + + + 2 + + + cBGyroSmooth + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSAMouse + + + 3 + + + lbSmoothWeight + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSAMouse + + + 4 + + + nUDGyroSmoothWeight + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSAMouse + + + 5 + + + label12 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSAMouse + + + 6 + + + nUDGyroMouseVertScale + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSAMouse + + + 7 + + + label11 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSAMouse + + + 8 + + + gyroTriggerBehavior + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSAMouse + + + 9 + + + cBGyroInvertY + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSAMouse + + + 10 + + + cBGyroInvertX + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSAMouse + + + 11 + + + lbGyroInvert + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSAMouse + + + 12 + + + lbGyroTriggers + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSAMouse + + + 13 + + + btnGyroTriggers + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSAMouse + + + 14 + + + nUDGyroSensitivity + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSAMouse + + + 15 + + + lbGyroSens + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSAMouse + + + 16 + + + 6, 43 + + + 2, 2, 2, 2 + + + 263, 170 + + + 259 + + + pnlSAMouse + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBGyro + + + 2 + Yaw @@ -7738,54 +10288,6 @@ with profile 16 - - 6, 43 - - - 2, 2, 2, 2 - - - 263, 170 - - - 259 - - - pnlSAMouse - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBGyro - - - 2 - - - 3, 253 - - - 272, 224 - - - 248 - - - Gyro - - - gBGyro - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPSettings - - - 1 - True @@ -8104,63 +10606,18 @@ with profile 11 - - 281, 139 - - - 272, 76 - - - 257 - - - Sensitivity - - - gBSensitivity - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPSettings - - - 4 - - - Fill - - - TopDown - - - 446, 0 - - - 2, 2, 2, 2 - - - 565, 481 - - - 254 - - - fLPSettings - - - System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 2 - 482, 17 + + 195, 444 + + + cMGyroTriggers + + + System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + 194, 22 @@ -8281,15 +10738,6 @@ with profile Always on - - 195, 444 - - - cMGyroTriggers - - - System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 647, 17 @@ -8305,9 +10753,6 @@ with profile 1011, 481 - - NoControl - 4, 4, 4, 4 From 0e8daf05b05f5534206673e4fac43e20cb9172cf Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Tue, 18 Jul 2017 20:18:01 -0500 Subject: [PATCH 19/24] Make sure sixaxis value ratios do not go above 1.0 --- DS4Windows/DS4Control/Mapping.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DS4Windows/DS4Control/Mapping.cs b/DS4Windows/DS4Control/Mapping.cs index e6223f9..6039dfd 100644 --- a/DS4Windows/DS4Control/Mapping.cs +++ b/DS4Windows/DS4Control/Mapping.cs @@ -889,7 +889,7 @@ namespace DS4Windows int maxValue = (int)(SXMax * 128d); if (absx > SXD) { - double ratioX = (absx - SXD) / (double)(maxValue - SXD); + double ratioX = absx < maxValue ? (absx - SXD) / (double)(maxValue - SXD) : 1.0; dState.Motion.accelX = Math.Sign(gyroX) * (int)Math.Min(128d, sxsens * 128d * ((1.0 - sxAntiDead) * ratioX + sxAntiDead)); } @@ -909,7 +909,7 @@ namespace DS4Windows int maxValue = (int)(SZMax * 128d); if (absz > SZD) { - double ratioZ = (absz - SZD) / (double)(maxValue - SZD); + double ratioZ = absz < maxValue ? (absz - SZD) / (double)(maxValue - SZD) : 1.0; dState.Motion.accelZ = Math.Sign(gyroZ) * (int)Math.Min(128d, szsens * 128d * ((1.0 - szAntiDead) * ratioZ + szAntiDead)); } From fd1479f09f8383e1a41ceb8d20e0bc43b2fee068 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Wed, 19 Jul 2017 15:15:59 -0500 Subject: [PATCH 20/24] Added output curve options for L2 and R2 --- DS4Windows/DS4Control/ControlService.cs | 10 +- DS4Windows/DS4Control/Mapping.cs | 73 +- DS4Windows/DS4Control/ScpUtil.cs | 65 +- DS4Windows/DS4Forms/Options.Designer.cs | 136 ++- DS4Windows/DS4Forms/Options.cs | 22 + DS4Windows/DS4Forms/Options.resx | 1392 +++++++++++++---------- 6 files changed, 1027 insertions(+), 671 deletions(-) diff --git a/DS4Windows/DS4Control/ControlService.cs b/DS4Windows/DS4Control/ControlService.cs index 896b2ca..859cecf 100644 --- a/DS4Windows/DS4Control/ControlService.cs +++ b/DS4Windows/DS4Control/ControlService.cs @@ -23,7 +23,7 @@ namespace DS4Windows public DS4StateExposed[] ExposedState = new DS4StateExposed[DS4_CONTROLLER_COUNT]; public bool recordingMacro = false; public event EventHandler Debug = null; - bool[] buttonsdown = { false, false, false, false }; + bool[] buttonsdown = new bool[4] { false, false, false, false }; List dcs = new List(); bool[] held = new bool[DS4_CONTROLLER_COUNT]; int[] oldmouse = new int[DS4_CONTROLLER_COUNT] { -1, -1, -1, -1 }; @@ -691,10 +691,10 @@ namespace DS4Windows } } - public bool[] lag = { false, false, false, false }; - public bool[] inWarnMonitor = { false, false, false, false }; - private byte[] currentBattery = { 0, 0, 0, 0 }; - private bool[] charging = { false, false, false, false }; + public bool[] lag = new bool[4] { false, false, false, false }; + public bool[] inWarnMonitor = new bool[4] { false, false, false, false }; + private byte[] currentBattery = new byte[4] { 0, 0, 0, 0 }; + private bool[] charging = new bool[4] { false, false, false, false }; // Called every time a new input report has arrived protected virtual void On_Report(object sender, EventArgs e) diff --git a/DS4Windows/DS4Control/Mapping.cs b/DS4Windows/DS4Control/Mapping.cs index 6039dfd..52adddf 100644 --- a/DS4Windows/DS4Control/Mapping.cs +++ b/DS4Windows/DS4Control/Mapping.cs @@ -404,7 +404,7 @@ namespace DS4Windows return (value < min) ? min : (value > max) ? max : value; } - private static double[] tempDoubleArray = { 0.0, 0.0, 0.0, 0.0 }; + private static double[] tempDoubleArray = new double[4] { 0.0, 0.0, 0.0, 0.0 }; public static DS4State SetCurveAndDeadzone(int device, DS4State cState) { double rotation = tempDoubleArray[device] = getLSRotation(device); @@ -436,7 +436,6 @@ namespace DS4Windows { curvex = (x > 127.5f ? Math.Min(x, (x / max) * multimax) : Math.Max(x, (x / max) * multimin)); curvey = (y > 127.5f ? Math.Min(y, (y / max) * multimax) : Math.Max(y, (y / max) * multimin)); - //btnLSTrack.Location = new Point((int)(dpix * curvex / 2.09 + lbLSTrack.Location.X), (int)(dpiy * curvey / 2.09 + lbLSTrack.Location.Y)); } else { @@ -528,8 +527,6 @@ namespace DS4Windows { double currentX = Global.Clamp(maxZoneXNegValue, dState.LX, maxZoneXPosValue); double currentY = Global.Clamp(maxZoneYNegValue, dState.LY, maxZoneYPosValue); - //currentX = (byte)((dState.LX >= 127.5f) ? Math.Min(dState.LX, maxZoneX) : Math.Max(dState.LX, maxZoneX)); - //currentY = (byte)((dState.LY >= 127.5f) ? Math.Min(dState.LY, maxZoneY) : Math.Max(dState.LY, maxZoneY)); tempOutputX = ((currentX - 127.5f - tempLsXDead) / (maxZoneX - tempLsXDead)); tempOutputY = ((currentY - 127.5f - tempLsYDead) / (maxZoneY - tempLsYDead)); } @@ -609,8 +606,6 @@ namespace DS4Windows tempOutputX = ((currentX - 127.5f - tempRsXDead) / (maxZoneX - tempRsXDead)); tempOutputY = ((currentY - 127.5f - tempRsYDead) / (maxZoneY - tempRsYDead)); - //tempOutputX = ((dState.RX - 127.5f - tempRsXDead) / (double)(maxXValue - tempRsXDead)); - //tempOutputY = ((dState.RY - 127.5f - tempRsYDead) / (double)(maxYValue - tempRsYDead)); } } else @@ -620,8 +615,6 @@ namespace DS4Windows tempOutputX = (currentX - 127.5f) / maxZoneX; tempOutputY = (currentY - 127.5f) / maxZoneY; - //tempOutputX = ((dState.RX - 127.5f) / (double)(maxXValue)); - //tempOutputY = ((dState.RY - 127.5f) / (double)(maxYValue)); } double tempRsXAntiDeadPercent = 0.0, tempRsYAntiDeadPercent = 0.0; @@ -752,8 +745,8 @@ namespace DS4Windows int lsOutCurveMode = lsOutCurveModeArray[device] = getLsOutCurveMode(device); if (lsOutCurveMode != 0) { - double tempX = (dState.LX - 127.5f) / 127.5; - double tempY = (dState.LY - 127.5f) / 127.5; + double tempX = (dState.LX - 127.5) / 127.5; + double tempY = (dState.LY - 127.5) / 127.5; double signX = tempX >= 0.0 ? 1.0 : -1.0; double signY = tempY >= 0.0 ? 1.0 : -1.0; @@ -790,30 +783,30 @@ namespace DS4Windows outputY = (absY * 1.992) - 0.992; } - dState.LX = (byte)(outputX * signX * 127.5f + 127.5f); - dState.LY = (byte)(outputY * signY * 127.5f + 127.5f); + dState.LX = (byte)(outputX * signX * 127.5 + 127.5); + dState.LY = (byte)(outputY * signY * 127.5 + 127.5); } else if (lsOutCurveMode == 2) { double outputX = tempX * tempX; double outputY = tempY * tempY; - dState.LX = (byte)(outputX * signX * 127.5f + 127.5f); - dState.LY = (byte)(outputY * signY * 127.5f + 127.5f); + dState.LX = (byte)(outputX * signX * 127.5 + 127.5); + dState.LY = (byte)(outputY * signY * 127.5 + 127.5); } else if (lsOutCurveMode == 3) { double outputX = tempX * tempX * tempX; double outputY = tempY * tempY * tempY; - dState.LX = (byte)(outputX * 127.5f + 127.5f); - dState.LY = (byte)(outputY * 127.5f + 127.5f); + dState.LX = (byte)(outputX * 127.5 + 127.5); + dState.LY = (byte)(outputY * 127.5 + 127.5); } } int rsOutCurveMode = rsOutCurveModeArray[device] = getRsOutCurveMode(device); if (rsOutCurveMode != 0) { - double tempX = (dState.RX - 127.5f) / 127.5; - double tempY = (dState.RY - 127.5f) / 127.5; + double tempX = (dState.RX - 127.5) / 127.5; + double tempY = (dState.RY - 127.5) / 127.5; double signX = tempX >= 0.0 ? 1.0 : -1.0; double signY = tempY >= 0.0 ? 1.0 : -1.0; @@ -850,22 +843,54 @@ namespace DS4Windows outputY = (absY * 1.992) - 0.992; } - dState.RX = (byte)(outputX * signX * 127.5f + 127.5f); - dState.RY = (byte)(outputY * signY * 127.5f + 127.5f); + dState.RX = (byte)(outputX * signX * 127.5 + 127.5); + dState.RY = (byte)(outputY * signY * 127.5 + 127.5); } else if (rsOutCurveMode == 2) { double outputX = tempX * tempX; double outputY = tempY * tempY; - dState.RX = (byte)(outputX * signX * 127.5f + 127.5f); - dState.RY = (byte)(outputY * signY * 127.5f + 127.5f); + dState.RX = (byte)(outputX * signX * 127.5 + 127.5); + dState.RY = (byte)(outputY * signY * 127.5 + 127.5); } else if (rsOutCurveMode == 3) { double outputX = tempX * tempX * tempX; double outputY = tempY * tempY * tempY; - dState.RX = (byte)(outputX * 127.5f + 127.5f); - dState.RY = (byte)(outputY * 127.5f + 127.5f); + dState.RX = (byte)(outputX * 127.5 + 127.5); + dState.RY = (byte)(outputY * 127.5 + 127.5); + } + } + + int l2OutCurveMode = getL2OutCurveMode(device); + if (l2OutCurveMode > 0) + { + double temp = dState.L2 / 255.0; + if (l2OutCurveMode == 1) + { + double output = temp * temp; + dState.L2 = (byte)(output * 255.0); + } + else if (l2OutCurveMode == 2) + { + double output = temp * temp * temp; + dState.L2 = (byte)(output * 255.0); + } + } + + int r2OutCurveMode = getR2OutCurveMode(device); + if (r2OutCurveMode > 0) + { + double temp = dState.R2 / 255.0; + if (r2OutCurveMode == 1) + { + double output = temp * temp; + dState.R2 = (byte)(output * 255.0); + } + else if (r2OutCurveMode == 2) + { + double output = temp * temp * temp; + dState.R2 = (byte)(output * 255.0); } } diff --git a/DS4Windows/DS4Control/ScpUtil.cs b/DS4Windows/DS4Control/ScpUtil.cs index fb5ffc0..1fe9fcf 100644 --- a/DS4Windows/DS4Control/ScpUtil.cs +++ b/DS4Windows/DS4Control/ScpUtil.cs @@ -864,6 +864,18 @@ namespace DS4Windows return m_Config.rsOutCurveMode[index]; } + public static int[] l2OutCurveMode => m_Config.l2OutCurveMode; + public static int getL2OutCurveMode(int index) + { + return m_Config.l2OutCurveMode[index]; + } + + public static int[] r2OutCurveMode => m_Config.r2OutCurveMode; + public static int getR2OutCurveMode(int index) + { + return m_Config.r2OutCurveMode[index]; + } + public static string[] LaunchProgram => m_Config.launchProgram; public static string[] ProfilePath => m_Config.profilePath; public static bool[] DistanceProfiles = m_Config.distanceProfiles; @@ -1211,6 +1223,8 @@ namespace DS4Windows public int[] btPollRate = { 4, 4, 4, 4, 4 }; public int[] lsOutCurveMode = { 0, 0, 0, 0, 0 }; public int[] rsOutCurveMode = { 0, 0, 0, 0, 0 }; + public int[] l2OutCurveMode = new int[5] { 0, 0, 0, 0, 0 }; + public int[] r2OutCurveMode = new int[5] { 0, 0, 0, 0, 0 }; public DS4Color[] m_LowLeds = new DS4Color[] { @@ -1410,7 +1424,7 @@ namespace DS4Windows catch { return 0; } }*/ - private string outputCurveString(int id) + private string stickOutputCurveString(int id) { string result = "linear"; switch (id) @@ -1425,7 +1439,7 @@ namespace DS4Windows return result; } - private int outputCurveId(string name) + private int stickOutputCurveId(string name) { int id = 0; switch (name) @@ -1440,6 +1454,34 @@ namespace DS4Windows return id; } + private string axisOutputCurveString(int id) + { + string result = "linear"; + switch (id) + { + case 0: break; + case 1: result = "quadratic"; break; + case 2: result = "cubic"; break; + default: break; + } + + return result; + } + + private int axisOutputCurveId(string name) + { + int id = 0; + switch (name) + { + case "linear": id = 0; break; + case "quadratic": id = 1; break; + case "cubic": id = 2; break; + default: break; + } + + return id; + } + public bool SaveProfile(int device, string propath) { bool Saved = true; @@ -1538,8 +1580,11 @@ namespace DS4Windows XmlNode xmlRSC = m_Xdoc.CreateNode(XmlNodeType.Element, "RSCurve", null); xmlRSC.InnerText = rsCurve[device].ToString(); Node.AppendChild(xmlRSC); XmlNode xmlProfileActions = m_Xdoc.CreateNode(XmlNodeType.Element, "ProfileActions", null); xmlProfileActions.InnerText = string.Join("/", profileActions[device]); Node.AppendChild(xmlProfileActions); XmlNode xmlBTPollRate = m_Xdoc.CreateNode(XmlNodeType.Element, "BTPollRate", null); xmlBTPollRate.InnerText = btPollRate[device].ToString(); Node.AppendChild(xmlBTPollRate); - XmlNode xmlLsOutputCurveMode = m_Xdoc.CreateNode(XmlNodeType.Element, "LSOutputCurveMode", null); xmlLsOutputCurveMode.InnerText = outputCurveString(lsOutCurveMode[device]); Node.AppendChild(xmlLsOutputCurveMode); - XmlNode xmlRsOutputCurveMode = m_Xdoc.CreateNode(XmlNodeType.Element, "RSOutputCurveMode", null); xmlRsOutputCurveMode.InnerText = outputCurveString(rsOutCurveMode[device]); Node.AppendChild(xmlRsOutputCurveMode); + XmlNode xmlLsOutputCurveMode = m_Xdoc.CreateNode(XmlNodeType.Element, "LSOutputCurveMode", null); xmlLsOutputCurveMode.InnerText = stickOutputCurveString(lsOutCurveMode[device]); Node.AppendChild(xmlLsOutputCurveMode); + XmlNode xmlRsOutputCurveMode = m_Xdoc.CreateNode(XmlNodeType.Element, "RSOutputCurveMode", null); xmlRsOutputCurveMode.InnerText = stickOutputCurveString(rsOutCurveMode[device]); Node.AppendChild(xmlRsOutputCurveMode); + + XmlNode xmlL2OutputCurveMode = m_Xdoc.CreateNode(XmlNodeType.Element, "L2OutputCurveMode", null); xmlL2OutputCurveMode.InnerText = axisOutputCurveString(l2OutCurveMode[device]); Node.AppendChild(xmlL2OutputCurveMode); + XmlNode xmlR2OutputCurveMode = m_Xdoc.CreateNode(XmlNodeType.Element, "R2OutputCurveMode", null); xmlR2OutputCurveMode.InnerText = axisOutputCurveString(r2OutCurveMode[device]); Node.AppendChild(xmlR2OutputCurveMode); XmlNode NodeControl = m_Xdoc.CreateNode(XmlNodeType.Element, "Control", null); XmlNode Key = m_Xdoc.CreateNode(XmlNodeType.Element, "Key", null); @@ -2529,12 +2574,18 @@ namespace DS4Windows } catch { btPollRate[device] = 4; missingSetting = true; } - try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/LSOutputCurveMode"); lsOutCurveMode[device] = outputCurveId(Item.InnerText); } + try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/LSOutputCurveMode"); lsOutCurveMode[device] = stickOutputCurveId(Item.InnerText); } catch { lsOutCurveMode[device] = 0; missingSetting = true; } - try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/RSOutputCurveMode"); rsOutCurveMode[device] = outputCurveId(Item.InnerText); } + try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/RSOutputCurveMode"); rsOutCurveMode[device] = stickOutputCurveId(Item.InnerText); } catch { rsOutCurveMode[device] = 0; missingSetting = true; } + try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/L2OutputCurveMode"); l2OutCurveMode[device] = axisOutputCurveId(Item.InnerText); } + catch { l2OutCurveMode[device] = 0; missingSetting = true; } + + try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/R2OutputCurveMode"); r2OutCurveMode[device] = axisOutputCurveId(Item.InnerText); } + catch { r2OutCurveMode[device] = 0; missingSetting = true; } + try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/ProfileActions"); @@ -3577,6 +3628,8 @@ namespace DS4Windows gyroMouseHorizontalAxis[device] = 0; lsOutCurveMode[device] = 0; rsOutCurveMode[device] = 0; + l2OutCurveMode[device] = 0; + r2OutCurveMode[device] = 0; } } diff --git a/DS4Windows/DS4Forms/Options.Designer.cs b/DS4Windows/DS4Forms/Options.Designer.cs index f40d0cf..9d0ce1e 100644 --- a/DS4Windows/DS4Forms/Options.Designer.cs +++ b/DS4Windows/DS4Forms/Options.Designer.cs @@ -255,6 +255,10 @@ this.tCSens = new System.Windows.Forms.TabControl(); this.tPDeadzone = new System.Windows.Forms.TabPage(); this.antiDeadzoneTabPage = new System.Windows.Forms.TabPage(); + this.nUDSixaxisZAntiDead = new System.Windows.Forms.NumericUpDown(); + this.nUDSixaxisXAntiDead = new System.Windows.Forms.NumericUpDown(); + this.label20 = new System.Windows.Forms.Label(); + this.label19 = new System.Windows.Forms.Label(); this.nUDR2AntiDead = new System.Windows.Forms.NumericUpDown(); this.label3 = new System.Windows.Forms.Label(); this.nUDL2AntiDead = new System.Windows.Forms.NumericUpDown(); @@ -350,10 +354,10 @@ this.pSToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.alwaysOnToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.advColorDialog = new DS4Windows.AdvancedColorDialog(); - this.label19 = new System.Windows.Forms.Label(); - this.label20 = new System.Windows.Forms.Label(); - this.nUDSixaxisXAntiDead = new System.Windows.Forms.NumericUpDown(); - this.nUDSixaxisZAntiDead = new System.Windows.Forms.NumericUpDown(); + this.label21 = new System.Windows.Forms.Label(); + this.label22 = new System.Windows.Forms.Label(); + this.cBL2OutputCurve = new System.Windows.Forms.ComboBox(); + this.cBR2OutputCurve = new System.Windows.Forms.ComboBox(); ((System.ComponentModel.ISupportInitialize)(this.nUDRainbow)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.tBBlueBar)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.tBGreenBar)).BeginInit(); @@ -411,6 +415,8 @@ this.tCSens.SuspendLayout(); this.tPDeadzone.SuspendLayout(); this.antiDeadzoneTabPage.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.nUDSixaxisZAntiDead)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nUDSixaxisXAntiDead)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nUDR2AntiDead)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nUDL2AntiDead)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nUDRSAntiDead)).BeginInit(); @@ -443,8 +449,6 @@ ((System.ComponentModel.ISupportInitialize)(this.nUDSXS)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nUDSZS)).BeginInit(); this.cMGyroTriggers.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nUDSixaxisXAntiDead)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.nUDSixaxisZAntiDead)).BeginInit(); this.SuspendLayout(); // // lowColorChooserButton @@ -2675,8 +2679,8 @@ this.tCSens.Controls.Add(this.tPDeadzone); this.tCSens.Controls.Add(this.antiDeadzoneTabPage); this.tCSens.Controls.Add(this.maxZoneTabPage); - this.tCSens.Controls.Add(this.tPCurve); this.tCSens.Controls.Add(this.tPOutCurve); + this.tCSens.Controls.Add(this.tPCurve); this.tCSens.Controls.Add(this.tpRotation); resources.ApplyResources(this.tCSens, "tCSens"); this.tCSens.Name = "tCSens"; @@ -2718,6 +2722,50 @@ this.antiDeadzoneTabPage.Name = "antiDeadzoneTabPage"; this.antiDeadzoneTabPage.UseVisualStyleBackColor = true; // + // nUDSixaxisZAntiDead + // + this.nUDSixaxisZAntiDead.DecimalPlaces = 2; + this.nUDSixaxisZAntiDead.Increment = new decimal(new int[] { + 1, + 0, + 0, + 65536}); + resources.ApplyResources(this.nUDSixaxisZAntiDead, "nUDSixaxisZAntiDead"); + this.nUDSixaxisZAntiDead.Maximum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.nUDSixaxisZAntiDead.Name = "nUDSixaxisZAntiDead"; + this.nUDSixaxisZAntiDead.ValueChanged += new System.EventHandler(this.nUDSixaxisZAntiDead_ValueChanged); + // + // nUDSixaxisXAntiDead + // + this.nUDSixaxisXAntiDead.DecimalPlaces = 2; + this.nUDSixaxisXAntiDead.Increment = new decimal(new int[] { + 1, + 0, + 0, + 65536}); + resources.ApplyResources(this.nUDSixaxisXAntiDead, "nUDSixaxisXAntiDead"); + this.nUDSixaxisXAntiDead.Maximum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.nUDSixaxisXAntiDead.Name = "nUDSixaxisXAntiDead"; + this.nUDSixaxisXAntiDead.ValueChanged += new System.EventHandler(this.nUDSixaxisXAntiDead_ValueChanged); + // + // label20 + // + resources.ApplyResources(this.label20, "label20"); + this.label20.Name = "label20"; + // + // label19 + // + resources.ApplyResources(this.label19, "label19"); + this.label19.Name = "label19"; + // // nUDR2AntiDead // this.nUDR2AntiDead.DecimalPlaces = 2; @@ -3042,6 +3090,10 @@ // // tPOutCurve // + this.tPOutCurve.Controls.Add(this.cBR2OutputCurve); + this.tPOutCurve.Controls.Add(this.cBL2OutputCurve); + this.tPOutCurve.Controls.Add(this.label22); + this.tPOutCurve.Controls.Add(this.label21); this.tPOutCurve.Controls.Add(this.rsOutCurveComboBox); this.tPOutCurve.Controls.Add(this.lsOutCurveComboBox); this.tPOutCurve.Controls.Add(this.label10); @@ -3743,49 +3795,39 @@ resources.ApplyResources(this.alwaysOnToolStripMenuItem, "alwaysOnToolStripMenuItem"); this.alwaysOnToolStripMenuItem.CheckedChanged += new System.EventHandler(this.SATrigger_CheckedChanged); // - // label19 + // label21 // - resources.ApplyResources(this.label19, "label19"); - this.label19.Name = "label19"; + resources.ApplyResources(this.label21, "label21"); + this.label21.Name = "label21"; // - // label20 + // label22 // - resources.ApplyResources(this.label20, "label20"); - this.label20.Name = "label20"; + resources.ApplyResources(this.label22, "label22"); + this.label22.Name = "label22"; // - // nUDSixaxisXAntiDead + // cBL2OutputCurve // - this.nUDSixaxisXAntiDead.DecimalPlaces = 2; - this.nUDSixaxisXAntiDead.Increment = new decimal(new int[] { - 1, - 0, - 0, - 65536}); - resources.ApplyResources(this.nUDSixaxisXAntiDead, "nUDSixaxisXAntiDead"); - this.nUDSixaxisXAntiDead.Maximum = new decimal(new int[] { - 1, - 0, - 0, - 0}); - this.nUDSixaxisXAntiDead.Name = "nUDSixaxisXAntiDead"; - this.nUDSixaxisXAntiDead.ValueChanged += new System.EventHandler(this.nUDSixaxisXAntiDead_ValueChanged); + this.cBL2OutputCurve.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cBL2OutputCurve.FormattingEnabled = true; + this.cBL2OutputCurve.Items.AddRange(new object[] { + resources.GetString("cBL2OutputCurve.Items"), + resources.GetString("cBL2OutputCurve.Items1"), + resources.GetString("cBL2OutputCurve.Items2")}); + resources.ApplyResources(this.cBL2OutputCurve, "cBL2OutputCurve"); + this.cBL2OutputCurve.Name = "cBL2OutputCurve"; + this.cBL2OutputCurve.SelectedIndexChanged += new System.EventHandler(this.cBL2OutputCurve_SelectedIndexChanged); // - // nUDSixaxisZAntiDead + // cBR2OutputCurve // - this.nUDSixaxisZAntiDead.DecimalPlaces = 2; - this.nUDSixaxisZAntiDead.Increment = new decimal(new int[] { - 1, - 0, - 0, - 65536}); - resources.ApplyResources(this.nUDSixaxisZAntiDead, "nUDSixaxisZAntiDead"); - this.nUDSixaxisZAntiDead.Maximum = new decimal(new int[] { - 1, - 0, - 0, - 0}); - this.nUDSixaxisZAntiDead.Name = "nUDSixaxisZAntiDead"; - this.nUDSixaxisZAntiDead.ValueChanged += new System.EventHandler(this.nUDSixaxisZAntiDead_ValueChanged); + this.cBR2OutputCurve.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cBR2OutputCurve.FormattingEnabled = true; + this.cBR2OutputCurve.Items.AddRange(new object[] { + resources.GetString("cBR2OutputCurve.Items"), + resources.GetString("cBR2OutputCurve.Items1"), + resources.GetString("cBR2OutputCurve.Items2")}); + resources.ApplyResources(this.cBR2OutputCurve, "cBR2OutputCurve"); + this.cBR2OutputCurve.Name = "cBR2OutputCurve"; + this.cBR2OutputCurve.SelectedIndexChanged += new System.EventHandler(this.cBR2OutputCurve_SelectedIndexChanged); // // Options // @@ -3867,6 +3909,8 @@ this.tPDeadzone.PerformLayout(); this.antiDeadzoneTabPage.ResumeLayout(false); this.antiDeadzoneTabPage.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.nUDSixaxisZAntiDead)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nUDSixaxisXAntiDead)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.nUDR2AntiDead)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.nUDL2AntiDead)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.nUDRSAntiDead)).EndInit(); @@ -3906,8 +3950,6 @@ ((System.ComponentModel.ISupportInitialize)(this.nUDSXS)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.nUDSZS)).EndInit(); this.cMGyroTriggers.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.nUDSixaxisXAntiDead)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.nUDSixaxisZAntiDead)).EndInit(); this.ResumeLayout(false); } @@ -4240,5 +4282,9 @@ private System.Windows.Forms.NumericUpDown nUDSixaxisXAntiDead; private System.Windows.Forms.Label label20; private System.Windows.Forms.Label label19; + private System.Windows.Forms.Label label22; + private System.Windows.Forms.Label label21; + private System.Windows.Forms.ComboBox cBR2OutputCurve; + private System.Windows.Forms.ComboBox cBL2OutputCurve; } } \ No newline at end of file diff --git a/DS4Windows/DS4Forms/Options.cs b/DS4Windows/DS4Forms/Options.cs index b816966..6284e71 100644 --- a/DS4Windows/DS4Forms/Options.cs +++ b/DS4Windows/DS4Forms/Options.cs @@ -368,6 +368,8 @@ namespace DS4Windows btPollRateComboBox.SelectedIndex = getBTPollRate(device); lsOutCurveComboBox.SelectedIndex = getLsOutCurveMode(device); rsOutCurveComboBox.SelectedIndex = getRsOutCurveMode(device); + cBL2OutputCurve.SelectedIndex = getL2OutCurveMode(device); + cBR2OutputCurve.SelectedIndex = getR2OutCurveMode(device); try { @@ -657,6 +659,8 @@ namespace DS4Windows btPollRateComboBox.SelectedIndex = 4; lsOutCurveComboBox.SelectedIndex = 0; rsOutCurveComboBox.SelectedIndex = 0; + cBL2OutputCurve.SelectedIndex = 0; + cBR2OutputCurve.SelectedIndex = 0; rBTPMouse.Checked = true; rBSAControls.Checked = true; ToggleRainbow(false); @@ -1348,6 +1352,8 @@ namespace DS4Windows BTPollRate[device] = btPollRateComboBox.SelectedIndex; lsOutCurveMode[device] = lsOutCurveComboBox.SelectedIndex; rsOutCurveMode[device] = rsOutCurveComboBox.SelectedIndex; + l2OutCurveMode[device] = cBL2OutputCurve.SelectedIndex; + r2OutCurveMode[device] = cBR2OutputCurve.SelectedIndex; L2Deadzone[device] = (byte)Math.Round((nUDL2.Value * 255), 0); R2Deadzone[device] = (byte)Math.Round((nUDR2.Value * 255), 0); L2AntiDeadzone[device] = (int)(nUDL2AntiDead.Value * 100); @@ -2998,6 +3004,22 @@ namespace DS4Windows } } + private void cBL2OutputCurve_SelectedIndexChanged(object sender, EventArgs e) + { + if (loading == false) + { + l2OutCurveMode[device] = cBL2OutputCurve.SelectedIndex; + } + } + + private void cBR2OutputCurve_SelectedIndexChanged(object sender, EventArgs e) + { + if (loading == false) + { + r2OutCurveMode[device] = cBR2OutputCurve.SelectedIndex; + } + } + private void Options_Resize(object sender, EventArgs e) { fLPSettings.AutoScroll = false; diff --git a/DS4Windows/DS4Forms/Options.resx b/DS4Windows/DS4Forms/Options.resx index 86b19af..c62bb8b 100644 --- a/DS4Windows/DS4Forms/Options.resx +++ b/DS4Windows/DS4Forms/Options.resx @@ -7765,6 +7765,807 @@ with profile 0 + + nUDSixaxisZAntiDead + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + antiDeadzoneTabPage + + + 0 + + + nUDSixaxisXAntiDead + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + antiDeadzoneTabPage + + + 1 + + + label20 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + antiDeadzoneTabPage + + + 2 + + + label19 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + antiDeadzoneTabPage + + + 3 + + + nUDR2AntiDead + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + antiDeadzoneTabPage + + + 4 + + + label3 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + antiDeadzoneTabPage + + + 5 + + + nUDL2AntiDead + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + antiDeadzoneTabPage + + + 6 + + + label4 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + antiDeadzoneTabPage + + + 7 + + + nUDRSAntiDead + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + antiDeadzoneTabPage + + + 8 + + + label2 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + antiDeadzoneTabPage + + + 9 + + + nUDLSAntiDead + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + antiDeadzoneTabPage + + + 10 + + + label1 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + antiDeadzoneTabPage + + + 11 + + + 4, 22 + + + 3, 3, 3, 3 + + + 264, 52 + + + 2 + + + Anti-Deadzone + + + antiDeadzoneTabPage + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tCSens + + + 1 + + + nUDSixAxisZMaxZone + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + maxZoneTabPage + + + 0 + + + nUDSixAxisXMaxZone + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + maxZoneTabPage + + + 1 + + + label18 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + maxZoneTabPage + + + 2 + + + label17 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + maxZoneTabPage + + + 3 + + + nUDR2Maxzone + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + maxZoneTabPage + + + 4 + + + nUDL2Maxzone + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + maxZoneTabPage + + + 5 + + + label8 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + maxZoneTabPage + + + 6 + + + label7 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + maxZoneTabPage + + + 7 + + + nUDRSMaxZone + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + maxZoneTabPage + + + 8 + + + label6 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + maxZoneTabPage + + + 9 + + + nUDLSMaxZone + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + maxZoneTabPage + + + 10 + + + label5 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + maxZoneTabPage + + + 11 + + + 4, 22 + + + 3, 3, 3, 3 + + + 264, 52 + + + 3 + + + Max Zone + + + maxZoneTabPage + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tCSens + + + 2 + + + Linear + + + Quadratic + + + Cubic + + + 151, 29 + + + 71, 21 + + + 7 + + + cBR2OutputCurve + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPOutCurve + + + 0 + + + Linear + + + Quadratic + + + Cubic + + + 31, 28 + + + 73, 21 + + + 6 + + + cBL2OutputCurve + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPOutCurve + + + 1 + + + True + + + 120, 31 + + + 24, 13 + + + 5 + + + R2: + + + label22 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPOutCurve + + + 2 + + + True + + + 6, 31 + + + 22, 13 + + + 4 + + + L2: + + + label21 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPOutCurve + + + 3 + + + Linear + + + Enhanced Precison + + + Quadratic + + + Cubic + + + 151, 2 + + + 71, 21 + + + 3 + + + rsOutCurveComboBox + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPOutCurve + + + 4 + + + Linear + + + Enhanced Precision + + + Quadratic + + + Cubic + + + 31, 2 + + + 71, 21 + + + 2 + + + lsOutCurveComboBox + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPOutCurve + + + 5 + + + True + + + NoControl + + + 120, 4 + + + 25, 13 + + + 1 + + + RS: + + + label10 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPOutCurve + + + 6 + + + True + + + NoControl + + + 6, 5 + + + 23, 13 + + + 0 + + + LS: + + + label9 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPOutCurve + + + 7 + + + 4, 22 + + + 264, 52 + + + 4 + + + Output Curve + + + tPOutCurve + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tCSens + + + 3 + + + nUDLSCurve + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPCurve + + + 0 + + + nUDRSCurve + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPCurve + + + 1 + + + lbRSCurve + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPCurve + + + 2 + + + lbRSCurvePercent + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPCurve + + + 3 + + + lbLSCurvePercent + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPCurve + + + 4 + + + lbLSCurve + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPCurve + + + 5 + + + 4, 22 + + + 3, 3, 3, 3 + + + 264, 52 + + + 1 + + + Curve (Input) + + + tPCurve + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tCSens + + + 4 + + + nUDRSRotation + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpRotation + + + 0 + + + label14 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpRotation + + + 1 + + + nUDLSRotation + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpRotation + + + 2 + + + label13 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpRotation + + + 3 + + + 4, 22 + + + 3, 3, 3, 3 + + + 264, 52 + + + 5 + + + Rotation + + + tpRotation + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tCSens + + + 5 + + + 281, 55 + + + 272, 78 + + + 234 + + + tCSens + + + System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + fLPSettings + + + 3 + 214, 29 @@ -8065,471 +8866,6 @@ with profile 11 - - 4, 22 - - - 3, 3, 3, 3 - - - 264, 52 - - - 2 - - - Anti-Deadzone - - - antiDeadzoneTabPage - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tCSens - - - 1 - - - nUDSixAxisZMaxZone - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - maxZoneTabPage - - - 0 - - - nUDSixAxisXMaxZone - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - maxZoneTabPage - - - 1 - - - label18 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - maxZoneTabPage - - - 2 - - - label17 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - maxZoneTabPage - - - 3 - - - nUDR2Maxzone - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - maxZoneTabPage - - - 4 - - - nUDL2Maxzone - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - maxZoneTabPage - - - 5 - - - label8 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - maxZoneTabPage - - - 6 - - - label7 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - maxZoneTabPage - - - 7 - - - nUDRSMaxZone - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - maxZoneTabPage - - - 8 - - - label6 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - maxZoneTabPage - - - 9 - - - nUDLSMaxZone - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - maxZoneTabPage - - - 10 - - - label5 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - maxZoneTabPage - - - 11 - - - 4, 22 - - - 3, 3, 3, 3 - - - 264, 52 - - - 3 - - - Max Zone - - - maxZoneTabPage - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tCSens - - - 2 - - - nUDLSCurve - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPCurve - - - 0 - - - nUDRSCurve - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPCurve - - - 1 - - - lbRSCurve - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPCurve - - - 2 - - - lbRSCurvePercent - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPCurve - - - 3 - - - lbLSCurvePercent - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPCurve - - - 4 - - - lbLSCurve - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPCurve - - - 5 - - - 4, 22 - - - 3, 3, 3, 3 - - - 264, 52 - - - 1 - - - Curve (Input) - - - tPCurve - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tCSens - - - 3 - - - rsOutCurveComboBox - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPOutCurve - - - 0 - - - lsOutCurveComboBox - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPOutCurve - - - 1 - - - label10 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPOutCurve - - - 2 - - - label9 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPOutCurve - - - 3 - - - 4, 22 - - - 264, 52 - - - 4 - - - Output Curve - - - tPOutCurve - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tCSens - - - 4 - - - nUDRSRotation - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tpRotation - - - 0 - - - label14 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tpRotation - - - 1 - - - nUDLSRotation - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tpRotation - - - 2 - - - label13 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tpRotation - - - 3 - - - 4, 22 - - - 3, 3, 3, 3 - - - 264, 52 - - - 5 - - - Rotation - - - tpRotation - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tCSens - - - 5 - - - 281, 55 - - - 272, 78 - - - 234 - - - tCSens - - - System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPSettings - - - 3 - 220, 29 @@ -9004,132 +9340,6 @@ with profile 5 - - Linear - - - Enhanced Precison - - - Quadratic - - - Cubic - - - 170, 16 - - - 71, 21 - - - 3 - - - rsOutCurveComboBox - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPOutCurve - - - 0 - - - Linear - - - Enhanced Precision - - - Quadratic - - - Cubic - - - 39, 15 - - - 71, 21 - - - 2 - - - lsOutCurveComboBox - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPOutCurve - - - 1 - - - True - - - NoControl - - - 135, 20 - - - 25, 13 - - - 1 - - - RS: - - - label10 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPOutCurve - - - 2 - - - True - - - NoControl - - - 10, 19 - - - 23, 13 - - - 0 - - - LS: - - - label9 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPOutCurve - - - 3 - 160, 21 From 5a84f8b2e3013b7a18bbc170f2eff3e6d34a6f30 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Wed, 19 Jul 2017 18:17:11 -0500 Subject: [PATCH 21/24] Added sixaxis output curve options --- DS4Windows/DS4Control/Mapping.cs | 43 +- DS4Windows/DS4Control/ScpUtil.cs | 24 + DS4Windows/DS4Forms/Options.Designer.cs | 246 +- DS4Windows/DS4Forms/Options.cs | 22 + DS4Windows/DS4Forms/Options.resx | 4600 ++++++----------------- 5 files changed, 1374 insertions(+), 3561 deletions(-) diff --git a/DS4Windows/DS4Control/Mapping.cs b/DS4Windows/DS4Control/Mapping.cs index 52adddf..1b3c1e2 100644 --- a/DS4Windows/DS4Control/Mapping.cs +++ b/DS4Windows/DS4Control/Mapping.cs @@ -77,8 +77,6 @@ namespace DS4Windows public static int[] prevFadetimer = new int[4] { 0, 0, 0, 0 }; public static DS4Color[] lastColor = new DS4Color[4]; public static List actionDone = new List(); - //public static List[] actionDone = { new List(), new List(), new List(), new List() }; - //public static bool[,] actionDone = new bool[4, 50]; public static SpecialAction[] untriggeraction = new SpecialAction[4]; public static DateTime[] nowAction = { DateTime.MinValue, DateTime.MinValue, DateTime.MinValue, DateTime.MinValue }; public static DateTime[] oldnowAction = { DateTime.MinValue, DateTime.MinValue, DateTime.MinValue, DateTime.MinValue }; @@ -134,6 +132,8 @@ namespace DS4Windows private static int[] rsOutCurveModeArray = new int[4] { 0, 0, 0, 0 }; private static int[] lsOutCurveModeArray = new int[4] { 0, 0, 0, 0 }; static bool tempBool = false; + private static double[] tempDoubleArray = new double[4] { 0.0, 0.0, 0.0, 0.0 }; + private static int[] tempIntArray = new int[4] { 0, 0, 0, 0 }; // Special macros static bool altTabDone = true; @@ -404,7 +404,6 @@ namespace DS4Windows return (value < min) ? min : (value > max) ? max : value; } - private static double[] tempDoubleArray = new double[4] { 0.0, 0.0, 0.0, 0.0 }; public static DS4State SetCurveAndDeadzone(int device, DS4State cState) { double rotation = tempDoubleArray[device] = getLSRotation(device); @@ -743,7 +742,7 @@ namespace DS4Windows dState.R2 = (byte)Global.Clamp(0, r2Sens * dState.R2, 255); int lsOutCurveMode = lsOutCurveModeArray[device] = getLsOutCurveMode(device); - if (lsOutCurveMode != 0) + if (lsOutCurveMode > 0) { double tempX = (dState.LX - 127.5) / 127.5; double tempY = (dState.LY - 127.5) / 127.5; @@ -803,7 +802,7 @@ namespace DS4Windows } int rsOutCurveMode = rsOutCurveModeArray[device] = getRsOutCurveMode(device); - if (rsOutCurveMode != 0) + if (rsOutCurveMode > 0) { double tempX = (dState.RX - 127.5) / 127.5; double tempY = (dState.RY - 127.5) / 127.5; @@ -948,6 +947,40 @@ namespace DS4Windows dState.Motion.accelZ = Math.Sign(gyroZ) * (int)Math.Min(128d, szsens * 128d * (absz / 128d)); } + + int sxOutCurveMode = tempIntArray[device] = getSXOutCurveMode(device); + if (sxOutCurveMode > 0) + { + double temp = Math.Abs(dState.Motion.accelX) / 128.0; + double sign = Math.Sign(temp); + if (sxOutCurveMode == 1) + { + double output = temp * temp; + dState.Motion.accelX = (byte)(output * sign * 128.0); + } + else if (sxOutCurveMode == 2) + { + double output = temp * temp * temp; + dState.Motion.accelX = (byte)(output * 128.0); + } + } + + int szOutCurveMode = tempIntArray[device] = getSZOutCurveMode(device); + if (szOutCurveMode > 0) + { + double temp = Math.Abs(dState.Motion.accelZ) / 128.0; + double sign = Math.Sign(temp); + if (szOutCurveMode == 1) + { + double output = temp * temp; + dState.Motion.accelZ = (byte)(output * sign * 128.0); + } + else if (szOutCurveMode == 2) + { + double output = temp * temp * temp; + dState.Motion.accelZ = (byte)(output * 128.0); + } + } } return dState; diff --git a/DS4Windows/DS4Control/ScpUtil.cs b/DS4Windows/DS4Control/ScpUtil.cs index 1fe9fcf..3fa265c 100644 --- a/DS4Windows/DS4Control/ScpUtil.cs +++ b/DS4Windows/DS4Control/ScpUtil.cs @@ -876,6 +876,18 @@ namespace DS4Windows return m_Config.r2OutCurveMode[index]; } + public static int[] sxOutCurveMode => m_Config.sxOutCurveMode; + public static int getSXOutCurveMode(int index) + { + return m_Config.sxOutCurveMode[index]; + } + + public static int[] szOutCurveMode => m_Config.szOutCurveMode; + public static int getSZOutCurveMode(int index) + { + return m_Config.szOutCurveMode[index]; + } + public static string[] LaunchProgram => m_Config.launchProgram; public static string[] ProfilePath => m_Config.profilePath; public static bool[] DistanceProfiles = m_Config.distanceProfiles; @@ -1225,6 +1237,8 @@ namespace DS4Windows public int[] rsOutCurveMode = { 0, 0, 0, 0, 0 }; public int[] l2OutCurveMode = new int[5] { 0, 0, 0, 0, 0 }; public int[] r2OutCurveMode = new int[5] { 0, 0, 0, 0, 0 }; + public int[] sxOutCurveMode = new int[5] { 0, 0, 0, 0, 0 }; + public int[] szOutCurveMode = new int[5] { 0, 0, 0, 0, 0 }; public DS4Color[] m_LowLeds = new DS4Color[] { @@ -1586,6 +1600,9 @@ namespace DS4Windows XmlNode xmlL2OutputCurveMode = m_Xdoc.CreateNode(XmlNodeType.Element, "L2OutputCurveMode", null); xmlL2OutputCurveMode.InnerText = axisOutputCurveString(l2OutCurveMode[device]); Node.AppendChild(xmlL2OutputCurveMode); XmlNode xmlR2OutputCurveMode = m_Xdoc.CreateNode(XmlNodeType.Element, "R2OutputCurveMode", null); xmlR2OutputCurveMode.InnerText = axisOutputCurveString(r2OutCurveMode[device]); Node.AppendChild(xmlR2OutputCurveMode); + XmlNode xmlSXOutputCurveMode = m_Xdoc.CreateNode(XmlNodeType.Element, "SXOutputCurveMode", null); xmlSXOutputCurveMode.InnerText = axisOutputCurveString(sxOutCurveMode[device]); Node.AppendChild(xmlSXOutputCurveMode); + XmlNode xmlSZOutputCurveMode = m_Xdoc.CreateNode(XmlNodeType.Element, "SZOutputCurveMode", null); xmlSZOutputCurveMode.InnerText = axisOutputCurveString(szOutCurveMode[device]); Node.AppendChild(xmlSZOutputCurveMode); + XmlNode NodeControl = m_Xdoc.CreateNode(XmlNodeType.Element, "Control", null); XmlNode Key = m_Xdoc.CreateNode(XmlNodeType.Element, "Key", null); XmlNode Macro = m_Xdoc.CreateNode(XmlNodeType.Element, "Macro", null); @@ -2586,6 +2603,12 @@ namespace DS4Windows try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/R2OutputCurveMode"); r2OutCurveMode[device] = axisOutputCurveId(Item.InnerText); } catch { r2OutCurveMode[device] = 0; missingSetting = true; } + try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/SXOutputCurveMode"); sxOutCurveMode[device] = axisOutputCurveId(Item.InnerText); } + catch { sxOutCurveMode[device] = 0; missingSetting = true; } + + try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/SZOutputCurveMode"); szOutCurveMode[device] = axisOutputCurveId(Item.InnerText); } + catch { szOutCurveMode[device] = 0; missingSetting = true; } + try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/ProfileActions"); @@ -3630,6 +3653,7 @@ namespace DS4Windows rsOutCurveMode[device] = 0; l2OutCurveMode[device] = 0; r2OutCurveMode[device] = 0; + sxOutCurveMode[device] = szOutCurveMode[device] = 0; } } diff --git a/DS4Windows/DS4Forms/Options.Designer.cs b/DS4Windows/DS4Forms/Options.Designer.cs index 9d0ce1e..40e057b 100644 --- a/DS4Windows/DS4Forms/Options.Designer.cs +++ b/DS4Windows/DS4Forms/Options.Designer.cs @@ -280,6 +280,19 @@ this.label6 = new System.Windows.Forms.Label(); this.nUDLSMaxZone = new System.Windows.Forms.NumericUpDown(); this.label5 = new System.Windows.Forms.Label(); + this.tPOutCurve = new System.Windows.Forms.TabPage(); + this.cBSixaxisZOutputCurve = new System.Windows.Forms.ComboBox(); + this.cBSixaxisXOutputCurve = new System.Windows.Forms.ComboBox(); + this.label24 = new System.Windows.Forms.Label(); + this.label23 = new System.Windows.Forms.Label(); + this.cBR2OutputCurve = new System.Windows.Forms.ComboBox(); + this.cBL2OutputCurve = new System.Windows.Forms.ComboBox(); + this.label22 = new System.Windows.Forms.Label(); + this.label21 = new System.Windows.Forms.Label(); + this.rsOutCurveComboBox = new System.Windows.Forms.ComboBox(); + this.lsOutCurveComboBox = new System.Windows.Forms.ComboBox(); + this.label10 = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); this.tPCurve = new System.Windows.Forms.TabPage(); this.nUDLSCurve = new System.Windows.Forms.NumericUpDown(); this.nUDRSCurve = new System.Windows.Forms.NumericUpDown(); @@ -287,11 +300,6 @@ this.lbRSCurvePercent = new System.Windows.Forms.Label(); this.lbLSCurvePercent = new System.Windows.Forms.Label(); this.lbLSCurve = new System.Windows.Forms.Label(); - this.tPOutCurve = new System.Windows.Forms.TabPage(); - this.rsOutCurveComboBox = new System.Windows.Forms.ComboBox(); - this.lsOutCurveComboBox = new System.Windows.Forms.ComboBox(); - this.label10 = new System.Windows.Forms.Label(); - this.label9 = new System.Windows.Forms.Label(); this.tpRotation = new System.Windows.Forms.TabPage(); this.nUDRSRotation = new System.Windows.Forms.NumericUpDown(); this.label14 = new System.Windows.Forms.Label(); @@ -354,10 +362,6 @@ this.pSToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.alwaysOnToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.advColorDialog = new DS4Windows.AdvancedColorDialog(); - this.label21 = new System.Windows.Forms.Label(); - this.label22 = new System.Windows.Forms.Label(); - this.cBL2OutputCurve = new System.Windows.Forms.ComboBox(); - this.cBR2OutputCurve = new System.Windows.Forms.ComboBox(); ((System.ComponentModel.ISupportInitialize)(this.nUDRainbow)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.tBBlueBar)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.tBGreenBar)).BeginInit(); @@ -428,10 +432,10 @@ ((System.ComponentModel.ISupportInitialize)(this.nUDL2Maxzone)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nUDRSMaxZone)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nUDLSMaxZone)).BeginInit(); + this.tPOutCurve.SuspendLayout(); this.tPCurve.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.nUDLSCurve)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nUDRSCurve)).BeginInit(); - this.tPOutCurve.SuspendLayout(); this.tpRotation.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.nUDRSRotation)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nUDLSRotation)).BeginInit(); @@ -3034,6 +3038,134 @@ resources.ApplyResources(this.label5, "label5"); this.label5.Name = "label5"; // + // tPOutCurve + // + this.tPOutCurve.Controls.Add(this.cBSixaxisZOutputCurve); + this.tPOutCurve.Controls.Add(this.cBSixaxisXOutputCurve); + this.tPOutCurve.Controls.Add(this.label24); + this.tPOutCurve.Controls.Add(this.label23); + this.tPOutCurve.Controls.Add(this.cBR2OutputCurve); + this.tPOutCurve.Controls.Add(this.cBL2OutputCurve); + this.tPOutCurve.Controls.Add(this.label22); + this.tPOutCurve.Controls.Add(this.label21); + this.tPOutCurve.Controls.Add(this.rsOutCurveComboBox); + this.tPOutCurve.Controls.Add(this.lsOutCurveComboBox); + this.tPOutCurve.Controls.Add(this.label10); + this.tPOutCurve.Controls.Add(this.label9); + resources.ApplyResources(this.tPOutCurve, "tPOutCurve"); + this.tPOutCurve.Name = "tPOutCurve"; + this.tPOutCurve.UseVisualStyleBackColor = true; + // + // cBSixaxisZOutputCurve + // + this.cBSixaxisZOutputCurve.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cBSixaxisZOutputCurve.DropDownWidth = 70; + this.cBSixaxisZOutputCurve.FormattingEnabled = true; + this.cBSixaxisZOutputCurve.Items.AddRange(new object[] { + resources.GetString("cBSixaxisZOutputCurve.Items"), + resources.GetString("cBSixaxisZOutputCurve.Items1"), + resources.GetString("cBSixaxisZOutputCurve.Items2")}); + resources.ApplyResources(this.cBSixaxisZOutputCurve, "cBSixaxisZOutputCurve"); + this.cBSixaxisZOutputCurve.Name = "cBSixaxisZOutputCurve"; + this.cBSixaxisZOutputCurve.SelectedIndexChanged += new System.EventHandler(this.cBSixaxisZOutputCurve_SelectedIndexChanged); + // + // cBSixaxisXOutputCurve + // + this.cBSixaxisXOutputCurve.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cBSixaxisXOutputCurve.DropDownWidth = 70; + this.cBSixaxisXOutputCurve.FormattingEnabled = true; + this.cBSixaxisXOutputCurve.Items.AddRange(new object[] { + resources.GetString("cBSixaxisXOutputCurve.Items"), + resources.GetString("cBSixaxisXOutputCurve.Items1"), + resources.GetString("cBSixaxisXOutputCurve.Items2")}); + resources.ApplyResources(this.cBSixaxisXOutputCurve, "cBSixaxisXOutputCurve"); + this.cBSixaxisXOutputCurve.Name = "cBSixaxisXOutputCurve"; + this.cBSixaxisXOutputCurve.SelectedIndexChanged += new System.EventHandler(this.cBSixaxisXOutputCurve_SelectedIndexChanged); + // + // label24 + // + resources.ApplyResources(this.label24, "label24"); + this.label24.Name = "label24"; + // + // label23 + // + resources.ApplyResources(this.label23, "label23"); + this.label23.Name = "label23"; + // + // cBR2OutputCurve + // + this.cBR2OutputCurve.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cBR2OutputCurve.DropDownWidth = 70; + this.cBR2OutputCurve.FormattingEnabled = true; + this.cBR2OutputCurve.Items.AddRange(new object[] { + resources.GetString("cBR2OutputCurve.Items"), + resources.GetString("cBR2OutputCurve.Items1"), + resources.GetString("cBR2OutputCurve.Items2")}); + resources.ApplyResources(this.cBR2OutputCurve, "cBR2OutputCurve"); + this.cBR2OutputCurve.Name = "cBR2OutputCurve"; + this.cBR2OutputCurve.SelectedIndexChanged += new System.EventHandler(this.cBR2OutputCurve_SelectedIndexChanged); + // + // cBL2OutputCurve + // + this.cBL2OutputCurve.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cBL2OutputCurve.DropDownWidth = 70; + this.cBL2OutputCurve.FormattingEnabled = true; + this.cBL2OutputCurve.Items.AddRange(new object[] { + resources.GetString("cBL2OutputCurve.Items"), + resources.GetString("cBL2OutputCurve.Items1"), + resources.GetString("cBL2OutputCurve.Items2")}); + resources.ApplyResources(this.cBL2OutputCurve, "cBL2OutputCurve"); + this.cBL2OutputCurve.Name = "cBL2OutputCurve"; + this.cBL2OutputCurve.SelectedIndexChanged += new System.EventHandler(this.cBL2OutputCurve_SelectedIndexChanged); + // + // label22 + // + resources.ApplyResources(this.label22, "label22"); + this.label22.Name = "label22"; + // + // label21 + // + resources.ApplyResources(this.label21, "label21"); + this.label21.Name = "label21"; + // + // rsOutCurveComboBox + // + this.rsOutCurveComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.rsOutCurveComboBox.DropDownWidth = 120; + this.rsOutCurveComboBox.FormattingEnabled = true; + this.rsOutCurveComboBox.Items.AddRange(new object[] { + resources.GetString("rsOutCurveComboBox.Items"), + resources.GetString("rsOutCurveComboBox.Items1"), + resources.GetString("rsOutCurveComboBox.Items2"), + resources.GetString("rsOutCurveComboBox.Items3")}); + resources.ApplyResources(this.rsOutCurveComboBox, "rsOutCurveComboBox"); + this.rsOutCurveComboBox.Name = "rsOutCurveComboBox"; + this.rsOutCurveComboBox.SelectedIndexChanged += new System.EventHandler(this.rsOutCurveComboBox_SelectedIndexChanged); + // + // lsOutCurveComboBox + // + this.lsOutCurveComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.lsOutCurveComboBox.DropDownWidth = 120; + this.lsOutCurveComboBox.FormattingEnabled = true; + this.lsOutCurveComboBox.Items.AddRange(new object[] { + resources.GetString("lsOutCurveComboBox.Items"), + resources.GetString("lsOutCurveComboBox.Items1"), + resources.GetString("lsOutCurveComboBox.Items2"), + resources.GetString("lsOutCurveComboBox.Items3")}); + resources.ApplyResources(this.lsOutCurveComboBox, "lsOutCurveComboBox"); + this.lsOutCurveComboBox.Name = "lsOutCurveComboBox"; + this.lsOutCurveComboBox.SelectedIndexChanged += new System.EventHandler(this.lsOutCurveComboBox_SelectedIndexChanged); + // + // label10 + // + resources.ApplyResources(this.label10, "label10"); + this.label10.Name = "label10"; + // + // label9 + // + resources.ApplyResources(this.label9, "label9"); + this.label9.Name = "label9"; + // // tPCurve // this.tPCurve.BackColor = System.Drawing.Color.WhiteSmoke; @@ -3088,58 +3220,6 @@ resources.ApplyResources(this.lbLSCurve, "lbLSCurve"); this.lbLSCurve.Name = "lbLSCurve"; // - // tPOutCurve - // - this.tPOutCurve.Controls.Add(this.cBR2OutputCurve); - this.tPOutCurve.Controls.Add(this.cBL2OutputCurve); - this.tPOutCurve.Controls.Add(this.label22); - this.tPOutCurve.Controls.Add(this.label21); - this.tPOutCurve.Controls.Add(this.rsOutCurveComboBox); - this.tPOutCurve.Controls.Add(this.lsOutCurveComboBox); - this.tPOutCurve.Controls.Add(this.label10); - this.tPOutCurve.Controls.Add(this.label9); - resources.ApplyResources(this.tPOutCurve, "tPOutCurve"); - this.tPOutCurve.Name = "tPOutCurve"; - this.tPOutCurve.UseVisualStyleBackColor = true; - // - // rsOutCurveComboBox - // - this.rsOutCurveComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.rsOutCurveComboBox.DropDownWidth = 100; - this.rsOutCurveComboBox.FormattingEnabled = true; - this.rsOutCurveComboBox.Items.AddRange(new object[] { - resources.GetString("rsOutCurveComboBox.Items"), - resources.GetString("rsOutCurveComboBox.Items1"), - resources.GetString("rsOutCurveComboBox.Items2"), - resources.GetString("rsOutCurveComboBox.Items3")}); - resources.ApplyResources(this.rsOutCurveComboBox, "rsOutCurveComboBox"); - this.rsOutCurveComboBox.Name = "rsOutCurveComboBox"; - this.rsOutCurveComboBox.SelectedIndexChanged += new System.EventHandler(this.rsOutCurveComboBox_SelectedIndexChanged); - // - // lsOutCurveComboBox - // - this.lsOutCurveComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.lsOutCurveComboBox.DropDownWidth = 100; - this.lsOutCurveComboBox.FormattingEnabled = true; - this.lsOutCurveComboBox.Items.AddRange(new object[] { - resources.GetString("lsOutCurveComboBox.Items"), - resources.GetString("lsOutCurveComboBox.Items1"), - resources.GetString("lsOutCurveComboBox.Items2"), - resources.GetString("lsOutCurveComboBox.Items3")}); - resources.ApplyResources(this.lsOutCurveComboBox, "lsOutCurveComboBox"); - this.lsOutCurveComboBox.Name = "lsOutCurveComboBox"; - this.lsOutCurveComboBox.SelectedIndexChanged += new System.EventHandler(this.lsOutCurveComboBox_SelectedIndexChanged); - // - // label10 - // - resources.ApplyResources(this.label10, "label10"); - this.label10.Name = "label10"; - // - // label9 - // - resources.ApplyResources(this.label9, "label9"); - this.label9.Name = "label9"; - // // tpRotation // this.tpRotation.Controls.Add(this.nUDRSRotation); @@ -3795,40 +3875,6 @@ resources.ApplyResources(this.alwaysOnToolStripMenuItem, "alwaysOnToolStripMenuItem"); this.alwaysOnToolStripMenuItem.CheckedChanged += new System.EventHandler(this.SATrigger_CheckedChanged); // - // label21 - // - resources.ApplyResources(this.label21, "label21"); - this.label21.Name = "label21"; - // - // label22 - // - resources.ApplyResources(this.label22, "label22"); - this.label22.Name = "label22"; - // - // cBL2OutputCurve - // - this.cBL2OutputCurve.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cBL2OutputCurve.FormattingEnabled = true; - this.cBL2OutputCurve.Items.AddRange(new object[] { - resources.GetString("cBL2OutputCurve.Items"), - resources.GetString("cBL2OutputCurve.Items1"), - resources.GetString("cBL2OutputCurve.Items2")}); - resources.ApplyResources(this.cBL2OutputCurve, "cBL2OutputCurve"); - this.cBL2OutputCurve.Name = "cBL2OutputCurve"; - this.cBL2OutputCurve.SelectedIndexChanged += new System.EventHandler(this.cBL2OutputCurve_SelectedIndexChanged); - // - // cBR2OutputCurve - // - this.cBR2OutputCurve.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cBR2OutputCurve.FormattingEnabled = true; - this.cBR2OutputCurve.Items.AddRange(new object[] { - resources.GetString("cBR2OutputCurve.Items"), - resources.GetString("cBR2OutputCurve.Items1"), - resources.GetString("cBR2OutputCurve.Items2")}); - resources.ApplyResources(this.cBR2OutputCurve, "cBR2OutputCurve"); - this.cBR2OutputCurve.Name = "cBR2OutputCurve"; - this.cBR2OutputCurve.SelectedIndexChanged += new System.EventHandler(this.cBR2OutputCurve_SelectedIndexChanged); - // // Options // resources.ApplyResources(this, "$this"); @@ -3923,12 +3969,12 @@ ((System.ComponentModel.ISupportInitialize)(this.nUDL2Maxzone)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.nUDRSMaxZone)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.nUDLSMaxZone)).EndInit(); + this.tPOutCurve.ResumeLayout(false); + this.tPOutCurve.PerformLayout(); this.tPCurve.ResumeLayout(false); this.tPCurve.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.nUDLSCurve)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.nUDRSCurve)).EndInit(); - this.tPOutCurve.ResumeLayout(false); - this.tPOutCurve.PerformLayout(); this.tpRotation.ResumeLayout(false); this.tpRotation.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.nUDRSRotation)).EndInit(); @@ -4286,5 +4332,9 @@ private System.Windows.Forms.Label label21; private System.Windows.Forms.ComboBox cBR2OutputCurve; private System.Windows.Forms.ComboBox cBL2OutputCurve; + private System.Windows.Forms.ComboBox cBSixaxisZOutputCurve; + private System.Windows.Forms.ComboBox cBSixaxisXOutputCurve; + private System.Windows.Forms.Label label24; + private System.Windows.Forms.Label label23; } } \ No newline at end of file diff --git a/DS4Windows/DS4Forms/Options.cs b/DS4Windows/DS4Forms/Options.cs index 6284e71..c083b14 100644 --- a/DS4Windows/DS4Forms/Options.cs +++ b/DS4Windows/DS4Forms/Options.cs @@ -370,6 +370,8 @@ namespace DS4Windows rsOutCurveComboBox.SelectedIndex = getRsOutCurveMode(device); cBL2OutputCurve.SelectedIndex = getL2OutCurveMode(device); cBR2OutputCurve.SelectedIndex = getR2OutCurveMode(device); + cBSixaxisXOutputCurve.SelectedIndex = getSXOutCurveMode(device); + cBSixaxisZOutputCurve.SelectedIndex = getSZOutCurveMode(device); try { @@ -661,6 +663,8 @@ namespace DS4Windows rsOutCurveComboBox.SelectedIndex = 0; cBL2OutputCurve.SelectedIndex = 0; cBR2OutputCurve.SelectedIndex = 0; + cBSixaxisXOutputCurve.SelectedIndex = 0; + cBSixaxisZOutputCurve.SelectedIndex = 0; rBTPMouse.Checked = true; rBSAControls.Checked = true; ToggleRainbow(false); @@ -1354,6 +1358,8 @@ namespace DS4Windows rsOutCurveMode[device] = rsOutCurveComboBox.SelectedIndex; l2OutCurveMode[device] = cBL2OutputCurve.SelectedIndex; r2OutCurveMode[device] = cBR2OutputCurve.SelectedIndex; + sxOutCurveMode[device] = cBSixaxisXOutputCurve.SelectedIndex; + szOutCurveMode[device] = cBSixaxisZOutputCurve.SelectedIndex; L2Deadzone[device] = (byte)Math.Round((nUDL2.Value * 255), 0); R2Deadzone[device] = (byte)Math.Round((nUDR2.Value * 255), 0); L2AntiDeadzone[device] = (int)(nUDL2AntiDead.Value * 100); @@ -3020,6 +3026,22 @@ namespace DS4Windows } } + private void cBSixaxisXOutputCurve_SelectedIndexChanged(object sender, EventArgs e) + { + if (loading == false) + { + sxOutCurveMode[device] = cBSixaxisXOutputCurve.SelectedIndex; + } + } + + private void cBSixaxisZOutputCurve_SelectedIndexChanged(object sender, EventArgs e) + { + if (loading == false) + { + szOutCurveMode[device] = cBSixaxisZOutputCurve.SelectedIndex; + } + } + private void Options_Resize(object sender, EventArgs e) { fLPSettings.AutoScroll = false; diff --git a/DS4Windows/DS4Forms/Options.resx b/DS4Windows/DS4Forms/Options.resx index c62bb8b..7aa233b 100644 --- a/DS4Windows/DS4Forms/Options.resx +++ b/DS4Windows/DS4Forms/Options.resx @@ -1335,138 +1335,6 @@ 1 - - pnlTPMouse - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBTouchpad - - - 0 - - - rBTPControls - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBTouchpad - - - 1 - - - rBTPMouse - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBTouchpad - - - 2 - - - fLPTouchSwipe - - - System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBTouchpad - - - 3 - - - 2, 259 - - - 270, 182 - - - 246 - - - Touchpad - - - gBTouchpad - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPControls - - - 1 - - - label15 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlTPMouse - - - 0 - - - touchpadInvertComboBox - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlTPMouse - - - 1 - - - cbStartTouchpadOff - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlTPMouse - - - 11 - - - -3, 39 - - - 2, 2, 2, 2 - - - 267, 129 - - - 257 - - - pnlTPMouse - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBTouchpad - - - 0 - True @@ -1560,6 +1428,30 @@ 11 + + -3, 39 + + + 2, 2, 2, 2 + + + 267, 129 + + + 257 + + + pnlTPMouse + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBTouchpad + + + 0 + True @@ -1626,126 +1518,156 @@ 2 - - bnSwipeUp - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPTouchSwipe - - - 0 - - - lbSwipeUp - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPTouchSwipe - - - 1 - - - bnSwipeDown - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPTouchSwipe - - - 2 - - - lbSwipeDown - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPTouchSwipe - - - 3 - - - bnSwipeLeft - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPTouchSwipe - - - 4 - - - lbSwipeLeft - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPTouchSwipe - - - 5 - - - bnSwipeRight - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPTouchSwipe - - - 6 - - - lbSwipeRight - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPTouchSwipe - - - 7 - - - 4, 55 - - - 260, 121 - - - 256 - - - fLPTouchSwipe - - - System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBTouchpad - - - 3 - 326, 13 + + False + + + 117, 22 + + + Control + + + 114, 6 + + + 117, 22 + + + Default + + + 127, 22 + + + Inverted + + + 127, 22 + + + Inverted X + + + 127, 22 + + + Inverted Y + + + 117, 22 + + + Dpad + + + 127, 22 + + + Inverted + + + 127, 22 + + + Inverted X + + + 127, 22 + + + Inverted Y + + + 117, 22 + + + Left Stick + + + 127, 22 + + + Inverted + + + 127, 22 + + + Inverted X + + + 127, 22 + + + Inverted Y + + + 117, 22 + + + Right Stick + + + 117, 22 + + + Face Buttons + + + 147, 22 + + + w/ Scan Code + + + False + + + 117, 22 + + + WASD + + + 147, 22 + + + w/ Scan Code + + + 117, 22 + + + Arrow Keys + + + 127, 22 + + + Inverted + + + 127, 22 + + + Inverted X + + + 127, 22 + + + Inverted Y + + + 117, 22 + + + Mouse + 118, 208 @@ -1785,153 +1707,6 @@ 0 - - False - - - 117, 22 - - - Control - - - 114, 6 - - - 117, 22 - - - Default - - - 117, 22 - - - Dpad - - - 127, 22 - - - Inverted - - - 127, 22 - - - Inverted X - - - 127, 22 - - - Inverted Y - - - 117, 22 - - - Left Stick - - - 127, 22 - - - Inverted - - - 127, 22 - - - Inverted X - - - 127, 22 - - - Inverted Y - - - 117, 22 - - - Right Stick - - - 127, 22 - - - Inverted - - - 127, 22 - - - Inverted X - - - 127, 22 - - - Inverted Y - - - 117, 22 - - - Face Buttons - - - False - - - 117, 22 - - - WASD - - - 147, 22 - - - w/ Scan Code - - - 117, 22 - - - Arrow Keys - - - 147, 22 - - - w/ Scan Code - - - 117, 22 - - - Mouse - - - 127, 22 - - - Inverted - - - 127, 22 - - - Inverted X - - - 127, 22 - - - Inverted Y - NoControl @@ -2154,173 +1929,50 @@ 7 - - btPollRateLabel + + 4, 55 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 260, 121 - - gBOther + + 256 - - 0 + + fLPTouchSwipe - - btPollRateComboBox + + System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + gBTouchpad - - gBOther - - - 1 - - - enableTouchToggleCheckbox - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBOther - - - 2 - - - cBDinput - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBOther - - + 3 - - pBProgram + + 2, 259 - - System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 270, 182 - - gBOther + + 246 - - 4 + + Touchpad - - cBLaunchProgram + + gBTouchpad - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBOther - - - 5 - - - btnBrowse - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBOther - - - 6 - - - lbUseController - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBOther - - - 7 - - - cBMouseAccel - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBOther - - - 8 - - - nUDSixaxis - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBOther - - - 9 - - - cBControllerInput - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBOther - - - 10 - - - cBIdleDisconnect - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBOther - - - 12 - - - 281, 221 - - - 272, 256 - - - 247 - - - Other - - - gBOther - - + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - fLPSettings + + tPControls - - 5 + + 1 True @@ -2734,149 +2386,29 @@ with profile 12 - - btnRainbow + + 281, 221 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 272, 256 - - gBLightbar - - - 0 - - - lbRainbowB - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBLightbar - - - 1 - - - nUDRainbowB - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBLightbar - - - 2 - - - cBFlashType - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBLightbar - - - 3 - - - cBWhileCharging - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBLightbar - - - 4 - - - btnFlashColor - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBLightbar - - - 5 - - - btnChargingColor - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBLightbar - - - 6 - - - lbWhileCharging - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBLightbar - - - 7 - - - lbPercentFlashBar - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBLightbar - - - 8 - - - nUDflashLED - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBLightbar - - - 9 - - - 3, 3 - - - 272, 244 - - + 247 - - Lightbar + + Other - - gBLightbar + + gBOther - + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + fLPSettings - - 0 + + 5 NoControl @@ -3163,53 +2695,29 @@ with profile 9 - - lbPercentRumble + + 3, 3 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 272, 244 - - gBRumble - - - 0 - - - btnRumbleLightTest - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBRumble - - - 1 - - - 281, 3 - - - 272, 46 - - + 247 - - Rumble + + Lightbar - - gBRumble + + gBLightbar - + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + fLPSettings - - 2 + + 0 True @@ -3268,6 +2776,30 @@ with profile 1 + + 281, 3 + + + 272, 46 + + + 247 + + + Rumble + + + gBRumble + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + fLPSettings + + + 2 + True @@ -3376,225 +2908,6 @@ with profile 153, 17 - - pnlSATrack - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - lbL2TrackS - - - 0 - - - lbL2Track - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - lbL2TrackS - - - 1 - - - lbRSTip - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - lbL2TrackS - - - 2 - - - lbInputDelay - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - lbL2TrackS - - - 3 - - - lbR2Track - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - lbL2TrackS - - - 4 - - - lbLSTip - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - lbL2TrackS - - - 5 - - - lbSATip - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - lbL2TrackS - - - 6 - - - tBR2 - - - System.Windows.Forms.TrackBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - lbL2TrackS - - - 7 - - - tBL2 - - - System.Windows.Forms.TrackBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - lbL2TrackS - - - 8 - - - pnlSixaxis - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - lbL2TrackS - - - 9 - - - pnlLSTrack - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - lbL2TrackS - - - 10 - - - pnlRSTrack - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - lbL2TrackS - - - 11 - - - 4, 22 - - - 3, 3, 3, 3 - - - 438, 455 - - - 2 - - - Controller Readings - - - lbL2TrackS - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tCControls - - - 2 - - - btnSATrack - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSATrack - - - 0 - - - btnSATrackS - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSATrack - - - 1 - - - 300, 88 - - - 2, 2, 2, 2 - - - 125, 125 - - - 252 - - - pnlSATrack - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - lbL2TrackS - - - 0 - False @@ -3658,6 +2971,30 @@ with profile 1 + + 300, 88 + + + 2, 2, 2, 2 + + + 125, 125 + + + 252 + + + pnlSATrack + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + lbL2TrackS + + + 0 + True @@ -3922,123 +3259,6 @@ with profile 8 - - tBsixaxisAccelX - - - System.Windows.Forms.TrackBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSixaxis - - - 0 - - - lb6Accel - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSixaxis - - - 1 - - - tBsixaxisGyroX - - - System.Windows.Forms.TrackBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSixaxis - - - 2 - - - lb6Gryo - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSixaxis - - - 3 - - - tBsixaxisGyroY - - - System.Windows.Forms.TrackBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSixaxis - - - 4 - - - tBsixaxisGyroZ - - - System.Windows.Forms.TrackBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSixaxis - - - 5 - - - tBsixaxisAccelY - - - System.Windows.Forms.TrackBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSixaxis - - - 6 - - - tBsixaxisAccelZ - - - System.Windows.Forms.TrackBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSixaxis - - - 7 - - - 300, 233 - - - 125, 125 - - - 236 - - - pnlSixaxis - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - lbL2TrackS - - - 9 - False @@ -4261,53 +3481,26 @@ with profile 7 - - btnLSTrack + + 300, 233 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlLSTrack - - - 0 - - - btnLSTrackS - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlLSTrack - - - 1 - - - 5, 88 - - - 2, 2, 2, 2 - - + 125, 125 - - 250 + + 236 - - pnlLSTrack + + pnlSixaxis - + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + lbL2TrackS - - 10 + + 9 False @@ -4372,53 +3565,29 @@ with profile 1 - - btnRSTrackS + + 5, 88 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlRSTrack - - - 0 - - - btnRSTrack - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlRSTrack - - - 1 - - - 151, 88 - - + 2, 2, 2, 2 - + 125, 125 - - 251 + + 250 - - pnlRSTrack + + pnlLSTrack - + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + lbL2TrackS - - 11 + + 10 False @@ -4483,122 +3652,56 @@ with profile 1 - - bnGyroZN + + 151, 88 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 2, 2, 2, 2 - - fLPTiltControls + + 125, 125 - - 0 + + 251 - - lbGyroZN + + pnlRSTrack - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - fLPTiltControls + + lbL2TrackS - - 1 + + 11 - - bnGyroZP + + 4, 22 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 3, 3, 3, 3 - - fLPTiltControls + + 438, 455 - + 2 - - lbGyroZP + + Controller Readings - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + lbL2TrackS - - fLPTiltControls + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 3 + + tCControls - - bnGyroXP - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPTiltControls - - - 4 - - - lbGyroXP - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPTiltControls - - - 5 - - - bnGyroXN - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPTiltControls - - - 6 - - - lbGyroXN - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPTiltControls - - - 7 - - - 6, 51 - - - 271, 167 - - - 254 - - - fLPTiltControls - - - System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBGyro - - - 3 + + 2 NoControl @@ -4816,120 +3919,30 @@ with profile 7 - - tPControls + + 6, 51 - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 271, 167 - - tCControls + + 254 - - 0 + + fLPTiltControls - - tPSpecial + + System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + gBGyro - - tCControls - - - 1 - - - Left - - - 0, 0 - - - 446, 481 - - - 253 - - - tCControls - - - System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - + 3 True - - lBControls - - - System.Windows.Forms.ListBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPControls - - - 0 - - - lbControlTip - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPControls - - - 2 - - - pnlController - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPControls - - - 3 - - - 4, 22 - - - 3, 3, 3, 3 - - - 438, 455 - - - 0 - - - Controls - - - tPControls - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tCControls - - - 0 - Top, Bottom, Left @@ -5089,654 +4102,6 @@ with profile Zoom - - pBHoveredButton - - - System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 0 - - - lbLRS - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 1 - - - lbLLS - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 2 - - - bnRSDown - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 3 - - - lbLTouchUpper - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 4 - - - lbLTouchRight - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 5 - - - bnL3 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 6 - - - lbLTouchLM - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 7 - - - bnRSUp - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 8 - - - lbLR2 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 9 - - - bnRSRight - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 10 - - - lbLL2 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 11 - - - bnR3 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 12 - - - lbLR1 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 13 - - - bnRSLeft - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 14 - - - lbLL1 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 15 - - - bnLSLeft - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 16 - - - lbLPS - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 17 - - - bnLSUp - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 18 - - - lbLLeft - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 19 - - - bnLSRight - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 20 - - - lbLright - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 21 - - - bnLSDown - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 22 - - - lbLDown - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 23 - - - bnR2 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 24 - - - bnUp - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 25 - - - bnDown - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 26 - - - bnTriangle - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 27 - - - bnR1 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 28 - - - bnSquare - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 29 - - - bnRight - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 30 - - - lbLUp - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 31 - - - bnLeft - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 32 - - - lbLShare - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 33 - - - bnOptions - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 34 - - - bnShare - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 35 - - - lbLOptions - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 36 - - - bnL1 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 37 - - - bnTouchRight - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 38 - - - bnL2 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 39 - - - lbLTriangle - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 40 - - - bnTouchLeft - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 41 - - - lbLSquare - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 42 - - - bnTouchMulti - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 43 - - - lbLCircle - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 44 - - - lbLCross - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 45 - - - bnTouchUpper - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 46 - - - btnLightbar - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 47 - - - bnPS - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 48 - - - bnCross - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 49 - - - bnCircle - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 50 - - - lbControlName - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 51 - - - 2, 2 - - - 2, 2, 2, 2 - - - 422, 230 - - - 282 - - - pnlController - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPControls - - - 3 - False @@ -7387,90 +5752,75 @@ with profile 51 - - pnlActions + + 2, 2 - + + 2, 2, 2, 2 + + + 422, 230 + + + 282 + + + pnlController + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - tPSpecial + + tPControls - - 0 - - - 4, 22 - - - 438, 455 - - + 3 - - Special Actions + + 4, 22 - - tPSpecial + + 3, 3, 3, 3 - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tCControls - - - 1 - - - lVActions - - - System.Windows.Forms.ListView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlActions - - - 0 - - - panel2 - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlActions - - - 1 - - - Fill - - - 0, 0 - - + 438, 455 - - 15 - - - pnlActions - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPSpecial - - + 0 + + Controls + + + tPControls + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tCControls + + + 0 + + + Name + + + 140 + + + Trigger + + + 105 + + + Action + + + 100 + Fill @@ -7495,135 +5845,6 @@ with profile 0 - - Name - - - 140 - - - Trigger - - - 105 - - - Action - - - 100 - - - fLPActionButtons - - - System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panel2 - - - 0 - - - lbActionsTip - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panel2 - - - 1 - - - Top - - - 0, 0 - - - 2, 2, 2, 2 - - - 438, 66 - - - 16 - - - panel2 - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlActions - - - 1 - - - btnNewAction - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPActionButtons - - - 0 - - - btnEditAction - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPActionButtons - - - 1 - - - btnRemAction - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPActionButtons - - - 2 - - - Fill - - - 0, 28 - - - 438, 38 - - - 15 - - - fLPActionButtons - - - System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panel2 - - - 0 - NoControl @@ -7705,6 +5926,30 @@ with profile 2 + + Fill + + + 0, 28 + + + 438, 38 + + + 15 + + + fLPActionButtons + + + System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel2 + + + 0 + Top @@ -7738,6 +5983,105 @@ with profile 1 + + Top + + + 0, 0 + + + 2, 2, 2, 2 + + + 438, 66 + + + 16 + + + panel2 + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlActions + + + 1 + + + Fill + + + 0, 0 + + + 438, 455 + + + 15 + + + pnlActions + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPSpecial + + + 0 + + + 4, 22 + + + 438, 455 + + + 3 + + + Special Actions + + + tPSpecial + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tCControls + + + 1 + + + Left + + + 0, 0 + + + 446, 481 + + + 253 + + + tCControls + + + System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 3 + 4, 22 @@ -7765,807 +6109,6 @@ with profile 0 - - nUDSixaxisZAntiDead - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - antiDeadzoneTabPage - - - 0 - - - nUDSixaxisXAntiDead - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - antiDeadzoneTabPage - - - 1 - - - label20 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - antiDeadzoneTabPage - - - 2 - - - label19 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - antiDeadzoneTabPage - - - 3 - - - nUDR2AntiDead - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - antiDeadzoneTabPage - - - 4 - - - label3 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - antiDeadzoneTabPage - - - 5 - - - nUDL2AntiDead - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - antiDeadzoneTabPage - - - 6 - - - label4 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - antiDeadzoneTabPage - - - 7 - - - nUDRSAntiDead - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - antiDeadzoneTabPage - - - 8 - - - label2 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - antiDeadzoneTabPage - - - 9 - - - nUDLSAntiDead - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - antiDeadzoneTabPage - - - 10 - - - label1 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - antiDeadzoneTabPage - - - 11 - - - 4, 22 - - - 3, 3, 3, 3 - - - 264, 52 - - - 2 - - - Anti-Deadzone - - - antiDeadzoneTabPage - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tCSens - - - 1 - - - nUDSixAxisZMaxZone - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - maxZoneTabPage - - - 0 - - - nUDSixAxisXMaxZone - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - maxZoneTabPage - - - 1 - - - label18 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - maxZoneTabPage - - - 2 - - - label17 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - maxZoneTabPage - - - 3 - - - nUDR2Maxzone - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - maxZoneTabPage - - - 4 - - - nUDL2Maxzone - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - maxZoneTabPage - - - 5 - - - label8 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - maxZoneTabPage - - - 6 - - - label7 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - maxZoneTabPage - - - 7 - - - nUDRSMaxZone - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - maxZoneTabPage - - - 8 - - - label6 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - maxZoneTabPage - - - 9 - - - nUDLSMaxZone - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - maxZoneTabPage - - - 10 - - - label5 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - maxZoneTabPage - - - 11 - - - 4, 22 - - - 3, 3, 3, 3 - - - 264, 52 - - - 3 - - - Max Zone - - - maxZoneTabPage - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tCSens - - - 2 - - - Linear - - - Quadratic - - - Cubic - - - 151, 29 - - - 71, 21 - - - 7 - - - cBR2OutputCurve - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPOutCurve - - - 0 - - - Linear - - - Quadratic - - - Cubic - - - 31, 28 - - - 73, 21 - - - 6 - - - cBL2OutputCurve - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPOutCurve - - - 1 - - - True - - - 120, 31 - - - 24, 13 - - - 5 - - - R2: - - - label22 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPOutCurve - - - 2 - - - True - - - 6, 31 - - - 22, 13 - - - 4 - - - L2: - - - label21 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPOutCurve - - - 3 - - - Linear - - - Enhanced Precison - - - Quadratic - - - Cubic - - - 151, 2 - - - 71, 21 - - - 3 - - - rsOutCurveComboBox - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPOutCurve - - - 4 - - - Linear - - - Enhanced Precision - - - Quadratic - - - Cubic - - - 31, 2 - - - 71, 21 - - - 2 - - - lsOutCurveComboBox - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPOutCurve - - - 5 - - - True - - - NoControl - - - 120, 4 - - - 25, 13 - - - 1 - - - RS: - - - label10 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPOutCurve - - - 6 - - - True - - - NoControl - - - 6, 5 - - - 23, 13 - - - 0 - - - LS: - - - label9 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPOutCurve - - - 7 - - - 4, 22 - - - 264, 52 - - - 4 - - - Output Curve - - - tPOutCurve - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tCSens - - - 3 - - - nUDLSCurve - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPCurve - - - 0 - - - nUDRSCurve - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPCurve - - - 1 - - - lbRSCurve - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPCurve - - - 2 - - - lbRSCurvePercent - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPCurve - - - 3 - - - lbLSCurvePercent - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPCurve - - - 4 - - - lbLSCurve - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPCurve - - - 5 - - - 4, 22 - - - 3, 3, 3, 3 - - - 264, 52 - - - 1 - - - Curve (Input) - - - tPCurve - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tCSens - - - 4 - - - nUDRSRotation - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tpRotation - - - 0 - - - label14 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tpRotation - - - 1 - - - nUDLSRotation - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tpRotation - - - 2 - - - label13 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tpRotation - - - 3 - - - 4, 22 - - - 3, 3, 3, 3 - - - 264, 52 - - - 5 - - - Rotation - - - tpRotation - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tCSens - - - 5 - - - 281, 55 - - - 272, 78 - - - 234 - - - tCSens - - - System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPSettings - - - 3 - 214, 29 @@ -8611,6 +6154,9 @@ with profile True + + NoControl + 160, 31 @@ -8638,6 +6184,9 @@ with profile True + + NoControl + 160, 6 @@ -8866,6 +6415,33 @@ with profile 11 + + 4, 22 + + + 3, 3, 3, 3 + + + 264, 52 + + + 2 + + + Anti-Deadzone + + + antiDeadzoneTabPage + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tCSens + + + 1 + 220, 29 @@ -9172,6 +6748,423 @@ with profile 11 + + 4, 22 + + + 3, 3, 3, 3 + + + 264, 52 + + + 3 + + + Max Zone + + + maxZoneTabPage + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tCSens + + + 2 + + + Linear + + + Quadratic + + + Cubic + + + 221, 28 + + + 40, 21 + + + 11 + + + cBSixaxisZOutputCurve + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPOutCurve + + + 0 + + + Linear + + + Quadratic + + + Cubic + + + 221, 1 + + + 40, 21 + + + 10 + + + cBSixaxisXOutputCurve + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPOutCurve + + + 1 + + + True + + + NoControl + + + 168, 31 + + + 52, 13 + + + 9 + + + Sixaxis Z: + + + label24 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPOutCurve + + + 2 + + + True + + + NoControl + + + 168, 4 + + + 52, 13 + + + 8 + + + Sixaxis X: + + + label23 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPOutCurve + + + 3 + + + Linear + + + Quadratic + + + Cubic + + + 111, 28 + + + 49, 21 + + + 7 + + + cBR2OutputCurve + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPOutCurve + + + 4 + + + Linear + + + Quadratic + + + Cubic + + + 31, 28 + + + 46, 21 + + + 6 + + + cBL2OutputCurve + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPOutCurve + + + 5 + + + True + + + NoControl + + + 86, 31 + + + 24, 13 + + + 5 + + + R2: + + + label22 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPOutCurve + + + 6 + + + True + + + NoControl + + + 6, 31 + + + 22, 13 + + + 4 + + + L2: + + + label21 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPOutCurve + + + 7 + + + Linear + + + Enhanced Precison + + + Quadratic + + + Cubic + + + 111, 3 + + + 49, 21 + + + 3 + + + rsOutCurveComboBox + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPOutCurve + + + 8 + + + Linear + + + Enhanced Precision + + + Quadratic + + + Cubic + + + 31, 2 + + + 46, 21 + + + 2 + + + lsOutCurveComboBox + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPOutCurve + + + 9 + + + True + + + NoControl + + + 85, 5 + + + 25, 13 + + + 1 + + + RS: + + + label10 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPOutCurve + + + 10 + + + True + + + NoControl + + + 6, 5 + + + 23, 13 + + + 0 + + + LS: + + + label9 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPOutCurve + + + 11 + + + 4, 22 + + + 264, 52 + + + 4 + + + Output Curve + + + tPOutCurve + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tCSens + + + 3 + 36, 16 @@ -9340,6 +7333,33 @@ with profile 5 + + 4, 22 + + + 3, 3, 3, 3 + + + 264, 52 + + + 1 + + + Curve (Input) + + + tPCurve + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tCSens + + + 4 + 160, 21 @@ -9442,266 +7462,56 @@ with profile 3 - - True + + 4, 22 - - rBSAControls + + 3, 3, 3, 3 - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 264, 52 - - gBGyro - - - 0 - - - rBSAMouse - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBGyro - - - 1 - - - pnlSAMouse - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBGyro - - - 2 - - - 3, 253 - - - 272, 224 - - - 248 - - - Gyro - - - gBGyro - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPSettings - - - 1 - - - lbL2S - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBSensitivity - - - 0 - - - nUDL2S - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBSensitivity - - - 1 - - - nUDLSS - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBSensitivity - - - 2 - - - lbSixaxisXS - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBSensitivity - - - 3 - - - nUDR2S - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBSensitivity - - - 4 - - - lbSixaxisZS - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBSensitivity - - + 5 - - nUDRSS + + Rotation - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + tpRotation - - gBSensitivity + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 6 + + tCSens - - lbR2LS + + 5 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 281, 55 - - gBSensitivity + + 272, 78 - - 7 + + 234 - - nUDSXS + + tCSens - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - gBSensitivity - - - 8 - - - lbRSS - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBSensitivity - - - 9 - - - lbLSS - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBSensitivity - - - 10 - - - nUDSZS - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBSensitivity - - - 11 - - - 281, 139 - - - 272, 76 - - - 257 - - - Sensitivity - - - gBSensitivity - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - + fLPSettings - - 4 + + 3 - - Fill - - - TopDown - - - 446, 0 - - - 2, 2, 2, 2 - - - 565, 481 - - - 254 - - - fLPSettings - - - System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 2 + + True True @@ -9769,234 +7579,6 @@ with profile 1 - - cBGyroMouseXAxis - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 0 - - - label16 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 1 - - - lbGyroSmooth - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 2 - - - cBGyroSmooth - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 3 - - - lbSmoothWeight - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 4 - - - nUDGyroSmoothWeight - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 5 - - - label12 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 6 - - - nUDGyroMouseVertScale - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 7 - - - label11 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 8 - - - gyroTriggerBehavior - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 9 - - - cBGyroInvertY - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 10 - - - cBGyroInvertX - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 11 - - - lbGyroInvert - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 12 - - - lbGyroTriggers - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 13 - - - btnGyroTriggers - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 14 - - - nUDGyroSensitivity - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 15 - - - lbGyroSens - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 16 - - - 6, 43 - - - 2, 2, 2, 2 - - - 263, 170 - - - 259 - - - pnlSAMouse - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBGyro - - - 2 - Yaw @@ -10498,6 +8080,54 @@ with profile 16 + + 6, 43 + + + 2, 2, 2, 2 + + + 263, 170 + + + 259 + + + pnlSAMouse + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBGyro + + + 2 + + + 3, 253 + + + 272, 224 + + + 248 + + + Gyro + + + gBGyro + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + fLPSettings + + + 1 + True @@ -10816,18 +8446,63 @@ with profile 11 + + 281, 139 + + + 272, 76 + + + 257 + + + Sensitivity + + + gBSensitivity + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + fLPSettings + + + 4 + + + Fill + + + TopDown + + + 446, 0 + + + 2, 2, 2, 2 + + + 565, 481 + + + 254 + + + fLPSettings + + + System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 2 + 482, 17 - - 195, 444 - - - cMGyroTriggers - - - System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 194, 22 @@ -10948,6 +8623,15 @@ with profile Always on + + 195, 444 + + + cMGyroTriggers + + + System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + 647, 17 From 1b0ddfd910fbf841c14294b660cc4dd22294e843 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Thu, 20 Jul 2017 00:57:14 -0500 Subject: [PATCH 22/24] Minor changes --- DS4Windows/DS4Control/Mapping.cs | 80 ++++++++++++++--------------- DS4Windows/DS4Library/DS4Sixaxis.cs | 8 +-- 2 files changed, 41 insertions(+), 47 deletions(-) diff --git a/DS4Windows/DS4Control/Mapping.cs b/DS4Windows/DS4Control/Mapping.cs index 1b3c1e2..033ed41 100644 --- a/DS4Windows/DS4Control/Mapping.cs +++ b/DS4Windows/DS4Control/Mapping.cs @@ -407,11 +407,11 @@ namespace DS4Windows public static DS4State SetCurveAndDeadzone(int device, DS4State cState) { double rotation = tempDoubleArray[device] = getLSRotation(device); - if (rotation != 0.0) + if (rotation > 0.0 || rotation < 0.0) cState.rotateLSCoordinates(rotation); double rotationRS = tempDoubleArray[device] = getRSRotation(device); - if (rotationRS != 0.0) + if (rotationRS > 0.0 || rotationRS < 0.0) cState.rotateRSCoordinates(rotationRS); DS4State dState = new DS4State(cState); @@ -503,17 +503,17 @@ namespace DS4Windows } else if ((lsDeadzone > 0 && lsSquared > lsDeadzoneSquared) || lsAntiDead > 0 || lsMaxZone != 100) { - double r = Math.Atan2(-(dState.LY - 127.5f), (dState.LX - 127.5f)); + double r = Math.Atan2(-(dState.LY - 127.5), (dState.LX - 127.5)); double maxXValue = dState.LX >= 127.5 ? 127.5 : -127.5; double maxYValue = dState.LY >= 127.5 ? 127.5 : -127.5; double ratio = lsMaxZone / 100.0; - double maxZoneXNegValue = (ratio * -127.5f) + 127.5f; - double maxZoneXPosValue = (ratio * 127.5f) + 127.5f; + double maxZoneXNegValue = (ratio * -127.5) + 127.5; + double maxZoneXPosValue = (ratio * 127.5) + 127.5; double maxZoneYNegValue = maxZoneXNegValue; double maxZoneYPosValue = maxZoneXPosValue; - double maxZoneX = dState.LX >= 127.5 ? (maxZoneXPosValue - 127.5f) : (maxZoneXNegValue - 127.5f); - double maxZoneY = dState.LY >= 127.5 ? (maxZoneYPosValue - 127.5f) : (maxZoneYNegValue - 127.5f); + double maxZoneX = dState.LX >= 127.5 ? (maxZoneXPosValue - 127.5) : (maxZoneXNegValue - 127.5); + double maxZoneY = dState.LY >= 127.5 ? (maxZoneYPosValue - 127.5) : (maxZoneYNegValue - 127.5); double tempLsXDead = 0.0, tempLsYDead = 0.0; double tempOutputX = 0.0, tempOutputY = 0.0; @@ -526,16 +526,16 @@ namespace DS4Windows { double currentX = Global.Clamp(maxZoneXNegValue, dState.LX, maxZoneXPosValue); double currentY = Global.Clamp(maxZoneYNegValue, dState.LY, maxZoneYPosValue); - tempOutputX = ((currentX - 127.5f - tempLsXDead) / (maxZoneX - tempLsXDead)); - tempOutputY = ((currentY - 127.5f - tempLsYDead) / (maxZoneY - tempLsYDead)); + tempOutputX = ((currentX - 127.5 - tempLsXDead) / (maxZoneX - tempLsXDead)); + tempOutputY = ((currentY - 127.5 - tempLsYDead) / (maxZoneY - tempLsYDead)); } } else { double currentX = Global.Clamp(maxZoneXNegValue, dState.LX, maxZoneXPosValue); double currentY = Global.Clamp(maxZoneYNegValue, dState.LY, maxZoneYPosValue); - tempOutputX = (currentX - 127.5f) / maxZoneX; - tempOutputY = (currentY - 127.5f) / maxZoneY; + tempOutputX = (currentX - 127.5) / maxZoneX; + tempOutputY = (currentY - 127.5) / maxZoneY; } double tempLsXAntiDeadPercent = 0.0, tempLsYAntiDeadPercent = 0.0; @@ -547,7 +547,7 @@ namespace DS4Windows if (tempOutputX > 0.0) { - dState.LX = (byte)((((1.0 - tempLsXAntiDeadPercent) * tempOutputX + tempLsXAntiDeadPercent)) * maxXValue + 127.5f); + dState.LX = (byte)((((1.0 - tempLsXAntiDeadPercent) * tempOutputX + tempLsXAntiDeadPercent)) * maxXValue + 127.5); } else { @@ -556,7 +556,7 @@ namespace DS4Windows if (tempOutputY > 0.0) { - dState.LY = (byte)((((1.0 - tempLsYAntiDeadPercent) * tempOutputY + tempLsYAntiDeadPercent)) * maxYValue + 127.5f); + dState.LY = (byte)((((1.0 - tempLsYAntiDeadPercent) * tempOutputY + tempLsYAntiDeadPercent)) * maxYValue + 127.5); } else { @@ -570,7 +570,7 @@ namespace DS4Windows int rsMaxZone = getRSMaxzone(device); if (rsDeadzone > 0 || rsAntiDead > 0 || rsMaxZone != 100) { - double rsSquared = Math.Pow(cState.RX - 127.5f, 2) + Math.Pow(cState.RY - 127.5f, 2); + double rsSquared = Math.Pow(cState.RX - 127.5, 2) + Math.Pow(cState.RY - 127.5, 2); double rsDeadzoneSquared = Math.Pow(rsDeadzone, 2); if (rsDeadzone > 0 && rsSquared <= rsDeadzoneSquared) { @@ -579,17 +579,17 @@ namespace DS4Windows } else if ((rsDeadzone > 0 && rsSquared > rsDeadzoneSquared) || rsAntiDead > 0 || rsMaxZone != 100) { - double r = Math.Atan2(-(dState.RY - 127.5f), (dState.RX - 127.5f)); + double r = Math.Atan2(-(dState.RY - 127.5), (dState.RX - 127.5)); double maxXValue = dState.RX >= 127.5 ? 127.5 : -127.5; double maxYValue = dState.RY >= 127.5 ? 127.5 : -127.5; double ratio = rsMaxZone / 100.0; - double maxZoneXNegValue = (ratio * -127.5f) + 127.5f; - double maxZoneXPosValue = (ratio * 127.5f) + 127.5f; + double maxZoneXNegValue = (ratio * -127.5) + 127.5; + double maxZoneXPosValue = (ratio * 127.5) + 127.5; double maxZoneYNegValue = maxZoneXNegValue; double maxZoneYPosValue = maxZoneXPosValue; - double maxZoneX = dState.RX >= 127.5 ? (maxZoneXPosValue - 127.5f) : (maxZoneXNegValue - 127.5f); - double maxZoneY = dState.RY >= 127.5 ? (maxZoneYPosValue - 127.5f) : (maxZoneYNegValue - 127.5f); + double maxZoneX = dState.RX >= 127.5 ? (maxZoneXPosValue - 127.5) : (maxZoneXNegValue - 127.5); + double maxZoneY = dState.RY >= 127.5 ? (maxZoneYPosValue - 127.5) : (maxZoneYNegValue - 127.5); double tempRsXDead = 0.0, tempRsYDead = 0.0; double tempOutputX = 0.0, tempOutputY = 0.0; @@ -603,8 +603,8 @@ namespace DS4Windows double currentX = Global.Clamp(maxZoneXNegValue, dState.RX, maxZoneXPosValue); double currentY = Global.Clamp(maxZoneYNegValue, dState.RY, maxZoneYPosValue); - tempOutputX = ((currentX - 127.5f - tempRsXDead) / (maxZoneX - tempRsXDead)); - tempOutputY = ((currentY - 127.5f - tempRsYDead) / (maxZoneY - tempRsYDead)); + tempOutputX = ((currentX - 127.5 - tempRsXDead) / (maxZoneX - tempRsXDead)); + tempOutputY = ((currentY - 127.5 - tempRsYDead) / (maxZoneY - tempRsYDead)); } } else @@ -612,8 +612,8 @@ namespace DS4Windows double currentX = Global.Clamp(maxZoneXNegValue, dState.RX, maxZoneXPosValue); double currentY = Global.Clamp(maxZoneYNegValue, dState.RY, maxZoneYPosValue); - tempOutputX = (currentX - 127.5f) / maxZoneX; - tempOutputY = (currentY - 127.5f) / maxZoneY; + tempOutputX = (currentX - 127.5) / maxZoneX; + tempOutputY = (currentY - 127.5) / maxZoneY; } double tempRsXAntiDeadPercent = 0.0, tempRsYAntiDeadPercent = 0.0; @@ -625,7 +625,7 @@ namespace DS4Windows if (tempOutputX > 0.0) { - dState.RX = (byte)((((1.0 - tempRsXAntiDeadPercent) * tempOutputX + tempRsXAntiDeadPercent)) * maxXValue + 127.5f); + dState.RX = (byte)((((1.0 - tempRsXAntiDeadPercent) * tempOutputX + tempRsXAntiDeadPercent)) * maxXValue + 127.5); } else { @@ -634,7 +634,7 @@ namespace DS4Windows if (tempOutputY > 0.0) { - dState.RY = (byte)((((1.0 - tempRsYAntiDeadPercent) * tempOutputY + tempRsYAntiDeadPercent)) * maxYValue + 127.5f); + dState.RY = (byte)((((1.0 - tempRsYAntiDeadPercent) * tempOutputY + tempRsYAntiDeadPercent)) * maxYValue + 127.5); } else { @@ -648,17 +648,17 @@ namespace DS4Windows int l2Maxzone = getL2Maxzone(device); if (l2Deadzone > 0 || l2AntiDeadzone > 0 || l2Maxzone != 100) { - double tempL2Output = (cState.L2 / 255.0); + double tempL2Output = cState.L2 / 255.0; double tempL2AntiDead = 0.0; - double ratio = (l2Maxzone / 100.0); - double maxValue = 255 * ratio; + double ratio = l2Maxzone / 100.0; + double maxValue = 255.0 * ratio; if (l2Deadzone > 0) { if (cState.L2 > l2Deadzone) { double current = Global.Clamp(0, dState.L2, maxValue); - tempL2Output = ((current - l2Deadzone) / (maxValue - l2Deadzone)); + tempL2Output = (current - l2Deadzone) / (maxValue - l2Deadzone); } else { @@ -673,7 +673,7 @@ namespace DS4Windows if (tempL2Output > 0.0) { - dState.L2 = (byte)(((1.0 - tempL2AntiDead) * tempL2Output + tempL2AntiDead) * 255); + dState.L2 = (byte)(((1.0 - tempL2AntiDead) * tempL2Output + tempL2AntiDead) * 255.0); } else { @@ -686,9 +686,9 @@ namespace DS4Windows int r2Maxzone = getR2Maxzone(device); if (r2Deadzone > 0 || r2AntiDeadzone > 0 || r2Maxzone != 100) { - double tempR2Output = (cState.R2 / 255.0); + double tempR2Output = cState.R2 / 255.0; double tempR2AntiDead = 0.0; - double ratio = (r2Maxzone / 100.0); + double ratio = r2Maxzone / 100.0; double maxValue = 255 * ratio; if (r2Deadzone > 0) @@ -696,7 +696,7 @@ namespace DS4Windows if (cState.R2 > r2Deadzone) { double current = Global.Clamp(0, dState.R2, maxValue); - tempR2Output = ((current - r2Deadzone) / (maxValue - r2Deadzone)); + tempR2Output = (current - r2Deadzone) / (maxValue - r2Deadzone); } else { @@ -711,7 +711,7 @@ namespace DS4Windows if (tempR2Output > 0.0) { - dState.R2 = (byte)(((1.0 - tempR2AntiDead) * tempR2Output + tempR2AntiDead) * 255); + dState.R2 = (byte)(((1.0 - tempR2AntiDead) * tempR2Output + tempR2AntiDead) * 255.0); } else { @@ -722,15 +722,15 @@ namespace DS4Windows double lsSens = getLSSens(device); if (lsSens != 1.0) { - dState.LX = (byte)Global.Clamp(0, lsSens * (dState.LX - 127.5f) + 127.5f, 255); - dState.LY = (byte)Global.Clamp(0, lsSens * (dState.LY - 127.5f) + 127.5f, 255); + dState.LX = (byte)Global.Clamp(0, lsSens * (dState.LX - 127.5) + 127.5, 255); + dState.LY = (byte)Global.Clamp(0, lsSens * (dState.LY - 127.5) + 127.5, 255); } double rsSens = getRSSens(device); if (rsSens != 1.0) { - dState.RX = (byte)Global.Clamp(0, rsSens * (dState.RX - 127.5f) + 127.5f, 255); - dState.RY = (byte)Global.Clamp(0, rsSens * (dState.RY - 127.5f) + 127.5f, 255); + dState.RX = (byte)Global.Clamp(0, rsSens * (dState.RX - 127.5) + 127.5, 255); + dState.RY = (byte)Global.Clamp(0, rsSens * (dState.RY - 127.5) + 127.5, 255); } double l2Sens = getL2Sens(device); @@ -861,7 +861,7 @@ namespace DS4Windows } } - int l2OutCurveMode = getL2OutCurveMode(device); + int l2OutCurveMode = tempIntArray[device] = getL2OutCurveMode(device); if (l2OutCurveMode > 0) { double temp = dState.L2 / 255.0; @@ -877,7 +877,7 @@ namespace DS4Windows } } - int r2OutCurveMode = getR2OutCurveMode(device); + int r2OutCurveMode = tempIntArray[device] = getR2OutCurveMode(device); if (r2OutCurveMode > 0) { double temp = dState.R2 / 255.0; diff --git a/DS4Windows/DS4Library/DS4Sixaxis.cs b/DS4Windows/DS4Library/DS4Sixaxis.cs index 0639c75..b9093a3 100644 --- a/DS4Windows/DS4Library/DS4Sixaxis.cs +++ b/DS4Windows/DS4Library/DS4Sixaxis.cs @@ -15,7 +15,7 @@ namespace DS4Windows public class SixAxis { - public int gyroYaw, gyroPitch, gyroRoll, deltaX, deltaY, deltaZ, accelX, accelY, accelZ; + public int gyroYaw, gyroPitch, gyroRoll, accelX, accelY, accelZ; public readonly int gyroYawFull, gyroPitchFull, gyroRollFull; public int accelXFull, accelYFull, accelZFull; public readonly byte touchID; @@ -42,12 +42,6 @@ namespace DS4Windows elapsed = milliseconds; previousAxis = prevAxis; - if (previousAxis != null) - { - deltaX = gyroYaw - previousAxis.gyroYaw; - deltaY = gyroPitch - previousAxis.gyroPitch; - deltaZ = gyroRoll - previousAxis.gyroRoll; - } } } From 3dcd4d94b934ec530e8e235baa9223e932baef3f Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Thu, 20 Jul 2017 04:25:15 -0500 Subject: [PATCH 23/24] Added clamping for rotation. Fixed bug with identical dict keys --- DS4Windows/DS4Control/Mapping.cs | 16 ++++++++-------- DS4Windows/DS4Library/DS4State.cs | 12 ++++-------- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/DS4Windows/DS4Control/Mapping.cs b/DS4Windows/DS4Control/Mapping.cs index 033ed41..8d858cb 100644 --- a/DS4Windows/DS4Control/Mapping.cs +++ b/DS4Windows/DS4Control/Mapping.cs @@ -1440,28 +1440,28 @@ namespace DS4Windows if (macroControl[24]) MappedState.RY = 0; if (IfAxisIsNotModified(device, ShiftTrigger2(GetDS4STrigger(device, DS4Controls.LXNeg), device, cState, eState, tp, fieldMapping), DS4Controls.LXNeg)) - tempControlDict.Add(DS4Controls.LXNeg, DS4Controls.LXNeg); + tempControlDict[DS4Controls.LXNeg] = DS4Controls.LXNeg; if (IfAxisIsNotModified(device, ShiftTrigger2(GetDS4STrigger(device, DS4Controls.LXPos), device, cState, eState, tp, fieldMapping), DS4Controls.LXPos)) - tempControlDict.Add(DS4Controls.LXPos, DS4Controls.LXPos); + tempControlDict[DS4Controls.LXPos] = DS4Controls.LXPos; if (IfAxisIsNotModified(device, ShiftTrigger2(GetDS4STrigger(device, DS4Controls.LYNeg), device, cState, eState, tp, fieldMapping), DS4Controls.LYNeg)) - tempControlDict.Add(DS4Controls.LYNeg, DS4Controls.LYNeg); + tempControlDict[DS4Controls.LYNeg] = DS4Controls.LYNeg; if (IfAxisIsNotModified(device, ShiftTrigger2(GetDS4STrigger(device, DS4Controls.LYPos), device, cState, eState, tp, fieldMapping), DS4Controls.LYPos)) - tempControlDict.Add(DS4Controls.LYPos, DS4Controls.LYPos); + tempControlDict[DS4Controls.LYPos] = DS4Controls.LYPos; if (IfAxisIsNotModified(device, ShiftTrigger2(GetDS4STrigger(device, DS4Controls.RXNeg), device, cState, eState, tp, fieldMapping), DS4Controls.RXNeg)) - tempControlDict.Add(DS4Controls.RXNeg, DS4Controls.RXNeg); + tempControlDict[DS4Controls.RXNeg] = DS4Controls.RXNeg; if (IfAxisIsNotModified(device, ShiftTrigger2(GetDS4STrigger(device, DS4Controls.RXPos), device, cState, eState, tp, fieldMapping), DS4Controls.RXPos)) - tempControlDict.Add(DS4Controls.RXPos, DS4Controls.RXPos); + tempControlDict[DS4Controls.RXPos] = DS4Controls.RXPos; if (IfAxisIsNotModified(device, ShiftTrigger2(GetDS4STrigger(device, DS4Controls.RYNeg), device, cState, eState, tp, fieldMapping), DS4Controls.RYNeg)) - tempControlDict.Add(DS4Controls.RYNeg, DS4Controls.RYNeg); + tempControlDict[DS4Controls.RYNeg] = DS4Controls.RYNeg; if (IfAxisIsNotModified(device, ShiftTrigger2(GetDS4STrigger(device, DS4Controls.RYPos), device, cState, eState, tp, fieldMapping), DS4Controls.RYPos)) - tempControlDict.Add(DS4Controls.RYPos, DS4Controls.RYPos); + tempControlDict[DS4Controls.RYPos] = DS4Controls.RYPos; Dictionary.KeyCollection controlKeys = tempControlDict.Keys; //Dictionary>.KeyCollection controlKeys = tempControlDict.Keys; diff --git a/DS4Windows/DS4Library/DS4State.cs b/DS4Windows/DS4Library/DS4State.cs index 21e1e55..d7fb3de 100644 --- a/DS4Windows/DS4Library/DS4State.cs +++ b/DS4Windows/DS4Library/DS4State.cs @@ -169,20 +169,16 @@ namespace DS4Windows { double sinAngle = Math.Sin(rotation), cosAngle = Math.Cos(rotation); double tempLX = LX - 127.5, tempLY = LY - 127.5; - Byte tempx = (Byte)(tempLX * cosAngle - tempLY * sinAngle + 127.5); - Byte tempy = (Byte)(tempLX * sinAngle + tempLY * cosAngle + 127.5); - LX = tempx; - LY = tempy; + LX = (Byte)(Global.Clamp(-127.5, (tempLX * cosAngle - tempLY * sinAngle), 127.5) + 127.5); + LY = (Byte)(Global.Clamp(-127.5, (tempLX * sinAngle + tempLY * cosAngle), 127.5) + 127.5); } public void rotateRSCoordinates(double rotation) { double sinAngle = Math.Sin(rotation), cosAngle = Math.Cos(rotation); double tempRX = RX - 127.5, tempRY = RY - 127.5; - Byte tempx = (Byte)(tempRX * cosAngle - tempRY * sinAngle + 127.5); - Byte tempy = (Byte)(tempRX * sinAngle + tempRY * cosAngle + 127.5); - RX = tempx; - RY = tempy; + RX = (Byte)(Global.Clamp(-127.5, (tempRX * cosAngle - tempRY * sinAngle), 127.5) + 127.5); + RY = (Byte)(Global.Clamp(-127.5, (tempRX * sinAngle + tempRY * cosAngle), 127.5) + 127.5); } } } From a8442d2772d8b869142d946445bc676029543684 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Thu, 20 Jul 2017 13:49:55 -0500 Subject: [PATCH 24/24] Version 1.4.86 --- DS4Windows/Properties/AssemblyInfo.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DS4Windows/Properties/AssemblyInfo.cs b/DS4Windows/Properties/AssemblyInfo.cs index d841a79..b6f3c9a 100644 --- a/DS4Windows/Properties/AssemblyInfo.cs +++ b/DS4Windows/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.4.85")] -[assembly: AssemblyFileVersion("1.4.85")] +[assembly: AssemblyVersion("1.4.86")] +[assembly: AssemblyFileVersion("1.4.86")]