From 0202b22639f265f18cc04ca6f708dee71dd1f432 Mon Sep 17 00:00:00 2001 From: Guilherme Maia Date: Fri, 2 Sep 2022 20:22:45 -0300 Subject: [PATCH 1/4] - Adjusts for drifting - checking front and rear tire slip separately - Added global effect multiplier, allowing for effects to be disabled per trigger --- Program.cs | 37 +++++++++++++-------- Settings.cs | 8 +++-- appsettings.ini | 8 +++-- bin/Release/net6.0/win-x64/ForzaDSX.dll | Bin 49152 -> 50176 bytes bin/Release/net6.0/win-x64/ForzaDSX.pdb | Bin 24676 -> 24884 bytes bin/Release/net6.0/win-x64/appsettings.ini | 8 +++-- 6 files changed, 41 insertions(+), 20 deletions(-) diff --git a/Program.cs b/Program.cs index 1851c39..ecbcf49 100644 --- a/Program.cs +++ b/Program.cs @@ -14,7 +14,7 @@ namespace ForzaDSX { class Program { - public const String VERSION = "0.3.1"; + public const String VERSION = "0.4.0"; static Settings settings = new Settings(); static bool verbose = false; static bool logToCsv = false; @@ -109,8 +109,10 @@ static void SendData(DataPacket data, CsvWriter csv) //Get average tire slippage. This value runs from 0.0 upwards with a value of 1.0 or greater meaning total loss of grip. float combinedTireSlip = (Math.Abs(data.TireCombinedSlipFrontLeft) + Math.Abs(data.TireCombinedSlipFrontRight) + Math.Abs(data.TireCombinedSlipRearLeft) + Math.Abs(data.TireCombinedSlipRearRight)) / 4; + float combinedFrontTireSlip = (Math.Abs(data.TireCombinedSlipFrontLeft) + Math.Abs(data.TireCombinedSlipFrontRight)) / 2; + float combinedRearTireSlip = (Math.Abs(data.TireCombinedSlipRearLeft) + Math.Abs(data.TireCombinedSlipRearRight)) / 2; - uint currentClass = LastValidCarClass; + uint currentClass = LastValidCarClass; if (data.CarClass > 0) { LastValidCarClass = currentClass = data.CarClass; @@ -215,14 +217,19 @@ static void SendData(DataPacket data, CsvWriter csv) avgAccel = (float)Math.Sqrt((settings.TURN_ACCEL_MOD * (data.AccelerationX * data.AccelerationX)) + (settings.FORWARD_ACCEL_MOD * (data.AccelerationZ * data.AccelerationZ))); + // Define losing grip as front tires slipping or rear tires slipping while accelerating a fair ammount + bool bLosingAccelGrip = + combinedFrontTireSlip > settings.THROTTLE_GRIP_LOSS_VAL + || (combinedRearTireSlip > settings.THROTTLE_GRIP_LOSS_VAL && data.Accelerator > 200); + // If losing grip, start to "vibrate" - if (combinedTireSlip > settings.THROTTLE_GRIP_LOSS_VAL) + if (bLosingAccelGrip) { freq = (int)Math.Floor(Map(combinedTireSlip, settings.THROTTLE_GRIP_LOSS_VAL, 5, 0, settings.MAX_ACCEL_GRIPLOSS_VIBRATION)); resistance = (int)Math.Floor(Map(avgAccel, 0, settings.ACCELRATION_LIMIT, settings.MIN_ACCEL_GRIPLOSS_STIFFNESS, settings.MAX_ACCEL_GRIPLOSS_STIFFNESS)); //resistance = settings.MIN_ACCEL_GRIPLOSS_STIFFNESS - (int)Math.Floor(Map(data.Accelerator, 0, 255, settings.MIN_ACCEL_GRIPLOSS_STIFFNESS, settings.MAX_ACCEL_GRIPLOSS_STIFFNESS)); - filteredResistance = EWMA(resistance, lastThrottleResistance, settings.EWMA_ALPHA_THROTTLE); - filteredFreq = EWMA(freq, lastThrottleFreq, settings.EWMA_ALPHA_THROTTLE_FREQ); + filteredResistance = (int)Math.Floor(EWMA(resistance, lastThrottleResistance, settings.EWMA_ALPHA_THROTTLE) * settings.RIGHT_TRIGGER_EFFECT_INTENSITY); + filteredFreq = (int)Math.Floor(EWMA(freq, lastThrottleFreq, settings.EWMA_ALPHA_THROTTLE_FREQ) * settings.RIGHT_TRIGGER_EFFECT_INTENSITY); lastThrottleResistance = filteredResistance; lastThrottleFreq = filteredFreq; @@ -247,7 +254,7 @@ static void SendData(DataPacket data, CsvWriter csv) { //It should probably always be uniformly stiff resistance = (int)Math.Floor(Map(avgAccel, 0, settings.ACCELRATION_LIMIT, settings.MIN_THROTTLE_RESISTANCE, settings.MAX_THROTTLE_RESISTANCE)); - filteredResistance = EWMA(resistance, lastThrottleResistance, settings.EWMA_ALPHA_THROTTLE); + filteredResistance = (int)Math.Floor(EWMA(resistance, lastThrottleResistance, settings.EWMA_ALPHA_THROTTLE) * settings.RIGHT_TRIGGER_EFFECT_INTENSITY); lastThrottleResistance = filteredResistance; p.instructions[2].parameters = new object[] { controllerIndex, Trigger.Right, TriggerMode.Resistance, 0, filteredResistance }; @@ -262,7 +269,7 @@ static void SendData(DataPacket data, CsvWriter csv) if (verbose) { - Console.WriteLine($"Average Acceleration: {avgAccel}; Throttle Resistance: {filteredResistance}"); + Console.WriteLine($"Average Acceleration: {avgAccel}; Throttle Resistance: {filteredResistance}; Accelerator: {data.Accelerator}"); } #endregion @@ -273,8 +280,8 @@ static void SendData(DataPacket data, CsvWriter csv) { freq = settings.MAX_BRAKE_VIBRATION - (int)Math.Floor(Map(combinedTireSlip, settings.GRIP_LOSS_VAL, 1, 0, settings.MAX_BRAKE_VIBRATION)); resistance = settings.MIN_BRAKE_STIFFNESS - (int)Math.Floor(Map(data.Brake, 0, 255, settings.MAX_BRAKE_STIFFNESS, settings.MIN_BRAKE_STIFFNESS)); - filteredResistance = EWMA(resistance, lastBrakeResistance, settings.EWMA_ALPHA_BRAKE); - filteredFreq = EWMA(freq, lastBrakeFreq, settings.EWMA_ALPHA_BRAKE_FREQ); + filteredResistance = (int)Math.Floor(EWMA(resistance, lastBrakeResistance, settings.EWMA_ALPHA_BRAKE) * settings.LEFT_TRIGGER_EFFECT_INTENSITY); + filteredFreq = (int)Math.Floor(EWMA(freq, lastBrakeFreq, settings.EWMA_ALPHA_BRAKE_FREQ) * settings.LEFT_TRIGGER_EFFECT_INTENSITY); lastBrakeFreq = filteredFreq; lastBrakeResistance = filteredResistance; if (filteredFreq <= settings.MIN_BRAKE_VIBRATION) @@ -298,7 +305,7 @@ static void SendData(DataPacket data, CsvWriter csv) { //By default, Increasingly resistant to force resistance = (int)Math.Floor(Map(data.Brake, 0, 255, settings.MIN_BRAKE_RESISTANCE, settings.MAX_BRAKE_RESISTANCE)); - filteredResistance = EWMA(resistance, lastBrakeResistance, settings.EWMA_ALPHA_BRAKE); + filteredResistance = (int)Math.Floor(EWMA(resistance, lastBrakeResistance, settings.EWMA_ALPHA_BRAKE) * settings.LEFT_TRIGGER_EFFECT_INTENSITY); lastBrakeResistance = filteredResistance; p.instructions[0].parameters = new object[] { controllerIndex, Trigger.Left, TriggerMode.Resistance, 0, filteredResistance }; } @@ -333,7 +340,7 @@ static void SendData(DataPacket data, CsvWriter csv) if (verbose) { - Console.WriteLine($"Engine RPM: {data.CurrentEngineRpm}"); + Console.WriteLine($"Engine RPM: {data.CurrentEngineRpm}; Engine Max RPM: {data.EngineMaxRpm}; Engine Idle RPM: {data.EngineIdleRpm}"); } #endregion } @@ -666,8 +673,12 @@ static async Task Main(string[] args) } Console.WriteLine("Forza and DSX are running. Let's Go!"); } - //Connect to DualSenseX - Connect(); + + settings.LEFT_TRIGGER_EFFECT_INTENSITY = Math.Clamp(settings.LEFT_TRIGGER_EFFECT_INTENSITY, 0.0f, 1.0f); + settings.RIGHT_TRIGGER_EFFECT_INTENSITY = Math.Clamp(settings.RIGHT_TRIGGER_EFFECT_INTENSITY, 0.0f, 1.0f); + + //Connect to DualSenseX + Connect(); //Connect to Forza ipEndPoint = new IPEndPoint(IPAddress.Loopback, settings.FORZA_PORT); diff --git a/Settings.cs b/Settings.cs index 4ded17a..179d359 100644 --- a/Settings.cs +++ b/Settings.cs @@ -10,12 +10,12 @@ public class Settings public float EWMA_ALPHA_THROTTLE { get; set; } = 0.01f; //Smoothing for Throttle Resistance output. Lower = smoother. Must be greater than 0 public float EWMA_ALPHA_BRAKE { get; set; } = 1.0f; //Smoothing for Brake Resistance output. Lower = smoother. Must be greater than 0 public float EWMA_ALPHA_BRAKE_FREQ { get; set; } = 1.0f; //Smoothing for Brake Resistance output. Lower = smoother. Must be greater than 0 - public float EWMA_ALPHA_THROTTLE_FREQ { get; set; } = 1.0f; //Smoothing for Brake Resistance output. Lower = smoother. Must be greater than 0 + public float EWMA_ALPHA_THROTTLE_FREQ { get; set; } = 0.5f; //Smoothing for Throttle Resistance output. Lower = smoother. Must be greater than 0 public float FORWARD_ACCEL_MOD { get; set; } = 1.0f;//How to scale Forward acceleration in determining throttle stiffness. public int MAX_ACCEL_GRIPLOSS_VIBRATION { get; set; } = 35; //The maximum acceleration frequency in Hz (avoid over 40). COrrelates to better grip public int MIN_ACCEL_GRIPLOSS_VIBRATION { get; set; } = 3; //The Minimum acceleration frequency in Hz (avoid over 40). Helps avoid clicking in controller public int MIN_ACCEL_GRIPLOSS_STIFFNESS { get; set; } = 200; //On a scale of 1-200 with 1 being most stiff - public int MAX_ACCEL_GRIPLOSS_STIFFNESS { get; set; } = 1; //On a scale of 1-200 with 1 being most stiff + public int MAX_ACCEL_GRIPLOSS_STIFFNESS { get; set; } = 75; //On a scale of 1-200 with 1 being most stiff public int MIN_BRAKE_STIFFNESS { get; set; } = 200; //On a scale of 1-200 with 1 being most stiff public int MAX_BRAKE_STIFFNESS { get; set; } = 1; //On a scale of 1-200 with 1 being most stiff public int BRAKE_VIBRATION_START { get; set; } = 20; //The position (0-255) at which the brake should feel engaged with low grip surfaces @@ -29,5 +29,7 @@ public class Settings public bool DISABLE_APP_CHECK { get; set; } = false; //Should we disable the check for running applications? public int DSX_PORT { get; set; } = 6969; //Port for DSX Port Listener public int FORZA_PORT { get; set; } = 5300; //Port for Forza UDP server - } + public float LEFT_TRIGGER_EFFECT_INTENSITY { get; set; } = 1.0f; // The percentage of the trigger effects. 1 = 100%, 0.5 = 50%, 0 = 0% (off) + public float RIGHT_TRIGGER_EFFECT_INTENSITY { get; set; } = 0.5f; // The percentage of the trigger effects. 1 = 100%, 0.5 = 50%, 0 = 0% (off) + } } \ No newline at end of file diff --git a/appsettings.ini b/appsettings.ini index 1bea9f1..7fd5a11 100644 --- a/appsettings.ini +++ b/appsettings.ini @@ -46,6 +46,10 @@ MIN_ACCEL_GRIPLOSS_VIBRATION = 3 ;On a scale of 1-200 with 1 being most stiff MIN_ACCEL_GRIPLOSS_STIFFNESS = 200 ;On a scale of 1-200 with 1 being most stiff -MAX_ACCEL_GRIPLOSS_STIFFNESS = 1 +MAX_ACCEL_GRIPLOSS_STIFFNESS = 75 ; The percentage of the current RPM when we are in the "redline" of the engine -RPM_REDLINE_RATIO = 0.95 \ No newline at end of file +RPM_REDLINE_RATIO = 0.95 +; // The percentage of the trigger effects. 1 = 100%, 0.5 = 50%, 0 = 0% (off) +LEFT_TRIGGER_EFFECT_INTENSITY = 1.0 +; // The percentage of the trigger effects. 1 = 100%, 0.5 = 50%, 0 = 0% (off) +RIGHT_TRIGGER_EFFECT_INTENSITY = 0.5 \ No newline at end of file diff --git a/bin/Release/net6.0/win-x64/ForzaDSX.dll b/bin/Release/net6.0/win-x64/ForzaDSX.dll index f3c235842c25d31a88aa1c2a7c947423ef1a4a59..45b1819d3db2b5a9ae8d1f2c3dddb11f4705e445 100644 GIT binary patch delta 17901 zcmc(m3wTu3wa3>vCo_3X9+L@qkdVwIA(@Z|;hg}&MBXBZ5ap#Z5fG?AY)~HZI1^A1 zt0)}`6<-s@ii%bmR8Z7OD?YDOi?#&{OaK*w#z(|}BHXqAvjRwMZ}0cr+rpRM?B7~@ z?{)S*XU-%uiO*;F?lA7XBc;R86U`+5zN8$A)ys%>u6<~urFb7vmH*0D`}-GZsWA&* z;!aNf+Ueh@6=|>dU)L_RelwP+d{sldewj_*9M>=@zOUxLHX-%$9Pa0t?1d~ zQ;A~qnw9O%36i!gn@<$sh|_C+$*Gjy@!>{iN1RV3mMu`(c>j)s3@zUOVZwW6g7Yj- z>_`kh*zNH*E?dZbCOeYsam$u)t5>BxY1vY4q^!Gf(rkA+*PZ1^kXY&ku|$cbT@bUE zuhNKkre*CjnLnP%#8fJH@l-1I zD}G`s6}xyU75nj2PlTu9a}v>O0Pn!#yS$vNL}YhL?dmT!|uN~DXT-mU2Y=nk(UzO?Z$fr5UQ9F?6CU*wf_Bc21e-Q^Cy&xFx*2BT)E(j*Mjc{&o}XM0 zO#D%>Kq}eWqo1Ge>h8ox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`V}xM82L( Date: Sat, 3 Sep 2022 02:34:06 -0300 Subject: [PATCH 2/4] - A little better RPM scaling for the LED - Added missing throttle threshold --- Program.cs | 8 +++++--- Settings.cs | 5 +++-- appsettings.ini | 10 ++++++---- bin/Release/net6.0/win-x64/ForzaDSX.dll | Bin 50176 -> 50688 bytes bin/Release/net6.0/win-x64/ForzaDSX.pdb | Bin 24884 -> 24976 bytes bin/Release/net6.0/win-x64/appsettings.ini | 10 ++++++---- 6 files changed, 20 insertions(+), 13 deletions(-) diff --git a/Program.cs b/Program.cs index ecbcf49..8050e4e 100644 --- a/Program.cs +++ b/Program.cs @@ -234,7 +234,8 @@ static void SendData(DataPacket data, CsvWriter csv) lastThrottleResistance = filteredResistance; lastThrottleFreq = filteredFreq; - if (filteredFreq <= settings.MIN_ACCEL_GRIPLOSS_VIBRATION) + if (filteredFreq <= settings.MIN_ACCEL_GRIPLOSS_VIBRATION + || data.Accelerator <= settings.THROTTLE_VIBRATION_MODE_START) { p.instructions[2].parameters = new object[] { controllerIndex, Trigger.Right, TriggerMode.Resistance, 0, filteredResistance }; @@ -327,8 +328,9 @@ static void SendData(DataPacket data, CsvWriter csv) #region Light Bar //Update the light bar //Currently registers intensity on the green channel based on engine RPM as a percantage of the maxium. Changes to red if RPM ratio > 80% (usually red line) - float CurrentRPMRatio = currentRPM / data.EngineMaxRpm; - int GreenChannel = (int)Math.Floor(CurrentRPMRatio * 255); + float engineRange = data.EngineMaxRpm - data.EngineIdleRpm; + float CurrentRPMRatio = (currentRPM - data.EngineIdleRpm) / engineRange; + int GreenChannel = Math.Max((int)Math.Floor(CurrentRPMRatio * 255), 50); int RedChannel = (int)Math.Floor(CurrentRPMRatio * 255); if (CurrentRPMRatio >= settings.RPM_REDLINE_RATIO) { diff --git a/Settings.cs b/Settings.cs index 179d359..28ac1c6 100644 --- a/Settings.cs +++ b/Settings.cs @@ -20,7 +20,8 @@ public class Settings public int MAX_BRAKE_STIFFNESS { get; set; } = 1; //On a scale of 1-200 with 1 being most stiff public int BRAKE_VIBRATION_START { get; set; } = 20; //The position (0-255) at which the brake should feel engaged with low grip surfaces public int BRAKE_VIBRATION__MODE_START { get; set; } = 10; //The depression of the brake lever at which the program should switch to vibration mode rather than smooth resistance. This helps to avoid clicking as vibration mode clicks when no force is applied. - public int MAX_THROTTLE_RESISTANCE { get; set; } = 6; //The Maximum resistance on the throttle (0-7) + public int THROTTLE_VIBRATION_MODE_START { get; set; } = 5; //The depression of the throttle lever at which the program should switch to vibration mode rather than smooth resistance. This helps to avoid clicking as vibration mode clicks when no force is applied. + public int MAX_THROTTLE_RESISTANCE { get; set; } = 6; //The Maximum resistance on the throttle (0-7) public int MAX_BRAKE_RESISTANCE { get; set; } = 6;//The Maximum resistance on the Brake (0-7) public int MIN_THROTTLE_RESISTANCE { get; set; } = 1;//The Minimum resistance on the throttle (0-7) public int MIN_BRAKE_RESISTANCE { get; set; } = 1;//The Minimum resistance on the Brake (0-7) @@ -30,6 +31,6 @@ public class Settings public int DSX_PORT { get; set; } = 6969; //Port for DSX Port Listener public int FORZA_PORT { get; set; } = 5300; //Port for Forza UDP server public float LEFT_TRIGGER_EFFECT_INTENSITY { get; set; } = 1.0f; // The percentage of the trigger effects. 1 = 100%, 0.5 = 50%, 0 = 0% (off) - public float RIGHT_TRIGGER_EFFECT_INTENSITY { get; set; } = 0.5f; // The percentage of the trigger effects. 1 = 100%, 0.5 = 50%, 0 = 0% (off) + public float RIGHT_TRIGGER_EFFECT_INTENSITY { get; set; } = 1.0f; // The percentage of the trigger effects. 1 = 100%, 0.5 = 50%, 0 = 0% (off) } } \ No newline at end of file diff --git a/appsettings.ini b/appsettings.ini index 7fd5a11..c710653 100644 --- a/appsettings.ini +++ b/appsettings.ini @@ -35,6 +35,8 @@ EWMA_ALPHA_BRAKE = 0.9 EWMA_ALPHA_BRAKE_FREQ = 0.9 ;The depression of the brake lever at which the program should switch to vibration mode rather than smooth resistance. This helps to avoid clicking as vibration mode clicks when no force is applied. BRAKE_VIBRATION__MODE_START = 1 +;The depression of the throttle lever at which the program should switch to vibration mode rather than smooth resistance. This helps to avoid clicking as vibration mode clicks when no force is applied. +THROTTLE_VIBRATION_MODE_START = 5 ;The Minimum brake frequency in Hz (avoid over 40). Helps avoid clicking in controller MIN_BRAKE_VIBRATION = 1 ;Smoothing for Brake Resistance output. Lower = smoother. Must be greater than 0 @@ -42,14 +44,14 @@ EWMA_ALPHA_THROTTLE_FREQ = 1 ;The maximum acceleration frequency in Hz (avoid over 40). COrrelates to better grip MAX_ACCEL_GRIPLOSS_VIBRATION = 35 ;The Minimum acceleration frequency in Hz (avoid over 40). Helps avoid clicking in controller -MIN_ACCEL_GRIPLOSS_VIBRATION = 3 +MIN_ACCEL_GRIPLOSS_VIBRATION = 5 ;On a scale of 1-200 with 1 being most stiff MIN_ACCEL_GRIPLOSS_STIFFNESS = 200 ;On a scale of 1-200 with 1 being most stiff -MAX_ACCEL_GRIPLOSS_STIFFNESS = 75 +MAX_ACCEL_GRIPLOSS_STIFFNESS = 100 ; The percentage of the current RPM when we are in the "redline" of the engine -RPM_REDLINE_RATIO = 0.95 +RPM_REDLINE_RATIO = 0.9 ; // The percentage of the trigger effects. 1 = 100%, 0.5 = 50%, 0 = 0% (off) LEFT_TRIGGER_EFFECT_INTENSITY = 1.0 ; // The percentage of the trigger effects. 1 = 100%, 0.5 = 50%, 0 = 0% (off) -RIGHT_TRIGGER_EFFECT_INTENSITY = 0.5 \ No newline at end of file +RIGHT_TRIGGER_EFFECT_INTENSITY = 0.8 \ No newline at end of file diff --git a/bin/Release/net6.0/win-x64/ForzaDSX.dll b/bin/Release/net6.0/win-x64/ForzaDSX.dll index 45b1819d3db2b5a9ae8d1f2c3dddb11f4705e445..2df7ba9b35a0488194e3f353e626306af68a7e37 100644 GIT binary patch delta 16373 zcmc(md3;l4*2mAiY0@n%-6(}Zo0KjoZQ4RvT4YH9%f2syfTSV{E))u~T5bx8pddmN zcTE)s6xS&#Dog4NIO>SYxQ&dMA|g;^jT(^U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Rha#yamM__1&_r$kaIz;!tB>6%znMX?DJ!YFPQyh3bVglVfGth%=60yJdsea zLSY`@NricUMupj5sWAIZ3bVgTVfI&>Ea#UCSd&oDtS}GIqA(AzR$=!23bVgXVfNQ6 z%zmq69W8!bupyyfqr&WOQkVy5Q<(kD3bVgOVfMEw%zitw9(zr=U|T{#hr;Y{SC|KQ zN@4ap6=uInVfJ?@%zigmk8c_-=t(HpsWAJy6y^bX6=uIrVfJ?`%znSZ?C%kzPwrYS zcsikAufpu_6OPIHRCs~O_n1h-XFkp|QF{dk2J>{>Vdgg=<~(pA^5-P$c5LywKZXf;Ygzg>R+lI0iBA*Z~HPQ#rdM^2$H zk*CrORHji5^1Jzn(zL?#GI_0SX|&&JoLu#tqauB;gS-|>H(pu&OF^xOt`yOB5$zSxLn8XB zh`uYLmqc__M8|_x{7qTGuE;xUtU`<#?=|O%UyTdRLt?to(9)lomdcxMK`1jd7)9a^ zWks&Fd?>_#5%!;OZcky?7kWunm4=SW*bq8wtXTJ>j-wT~HLF+#XOS67Wym(YY}3n` zB|CEpWyrmv4rdGPugkz{faQ^GnQ7ZW(&PxUhb+2pE;E QWny_`N9!#C*s^i%f0BI}O#lD@ diff --git a/bin/Release/net6.0/win-x64/appsettings.ini b/bin/Release/net6.0/win-x64/appsettings.ini index 7fd5a11..c710653 100644 --- a/bin/Release/net6.0/win-x64/appsettings.ini +++ b/bin/Release/net6.0/win-x64/appsettings.ini @@ -35,6 +35,8 @@ EWMA_ALPHA_BRAKE = 0.9 EWMA_ALPHA_BRAKE_FREQ = 0.9 ;The depression of the brake lever at which the program should switch to vibration mode rather than smooth resistance. This helps to avoid clicking as vibration mode clicks when no force is applied. BRAKE_VIBRATION__MODE_START = 1 +;The depression of the throttle lever at which the program should switch to vibration mode rather than smooth resistance. This helps to avoid clicking as vibration mode clicks when no force is applied. +THROTTLE_VIBRATION_MODE_START = 5 ;The Minimum brake frequency in Hz (avoid over 40). Helps avoid clicking in controller MIN_BRAKE_VIBRATION = 1 ;Smoothing for Brake Resistance output. Lower = smoother. Must be greater than 0 @@ -42,14 +44,14 @@ EWMA_ALPHA_THROTTLE_FREQ = 1 ;The maximum acceleration frequency in Hz (avoid over 40). COrrelates to better grip MAX_ACCEL_GRIPLOSS_VIBRATION = 35 ;The Minimum acceleration frequency in Hz (avoid over 40). Helps avoid clicking in controller -MIN_ACCEL_GRIPLOSS_VIBRATION = 3 +MIN_ACCEL_GRIPLOSS_VIBRATION = 5 ;On a scale of 1-200 with 1 being most stiff MIN_ACCEL_GRIPLOSS_STIFFNESS = 200 ;On a scale of 1-200 with 1 being most stiff -MAX_ACCEL_GRIPLOSS_STIFFNESS = 75 +MAX_ACCEL_GRIPLOSS_STIFFNESS = 100 ; The percentage of the current RPM when we are in the "redline" of the engine -RPM_REDLINE_RATIO = 0.95 +RPM_REDLINE_RATIO = 0.9 ; // The percentage of the trigger effects. 1 = 100%, 0.5 = 50%, 0 = 0% (off) LEFT_TRIGGER_EFFECT_INTENSITY = 1.0 ; // The percentage of the trigger effects. 1 = 100%, 0.5 = 50%, 0 = 0% (off) -RIGHT_TRIGGER_EFFECT_INTENSITY = 0.5 \ No newline at end of file +RIGHT_TRIGGER_EFFECT_INTENSITY = 0.8 \ No newline at end of file From b890f74f1bf04852abc66a4d89e9bb675651ab37 Mon Sep 17 00:00:00 2001 From: Guilherme Maia Date: Sat, 3 Sep 2022 03:13:22 -0300 Subject: [PATCH 3/4] - New default values with smoother behavior overall --- appsettings.ini | 10 +++++----- bin/Release/net6.0/win-x64/appsettings.ini | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/appsettings.ini b/appsettings.ini index c710653..9627c76 100644 --- a/appsettings.ini +++ b/appsettings.ini @@ -17,7 +17,7 @@ BRAKE_VIBRATION_START=20 ;The Maximum resistance on the throttle (0-7) MAX_THROTTLE_RESISTANCE=4 ;The Maximum resistance on the Brake (0-7) -MAX_BRAKE_RESISTANCE=7 +MAX_BRAKE_RESISTANCE=6 ;The Minimum resistance on the throttle (0-7) MIN_THROTTLE_RESISTANCE=0 ;The Minimum resistance on the Brake (0-7) @@ -42,16 +42,16 @@ MIN_BRAKE_VIBRATION = 1 ;Smoothing for Brake Resistance output. Lower = smoother. Must be greater than 0 EWMA_ALPHA_THROTTLE_FREQ = 1 ;The maximum acceleration frequency in Hz (avoid over 40). COrrelates to better grip -MAX_ACCEL_GRIPLOSS_VIBRATION = 35 +MAX_ACCEL_GRIPLOSS_VIBRATION = 55 ;The Minimum acceleration frequency in Hz (avoid over 40). Helps avoid clicking in controller MIN_ACCEL_GRIPLOSS_VIBRATION = 5 ;On a scale of 1-200 with 1 being most stiff -MIN_ACCEL_GRIPLOSS_STIFFNESS = 200 +MIN_ACCEL_GRIPLOSS_STIFFNESS = 255 ;On a scale of 1-200 with 1 being most stiff -MAX_ACCEL_GRIPLOSS_STIFFNESS = 100 +MAX_ACCEL_GRIPLOSS_STIFFNESS = 150 ; The percentage of the current RPM when we are in the "redline" of the engine RPM_REDLINE_RATIO = 0.9 ; // The percentage of the trigger effects. 1 = 100%, 0.5 = 50%, 0 = 0% (off) LEFT_TRIGGER_EFFECT_INTENSITY = 1.0 ; // The percentage of the trigger effects. 1 = 100%, 0.5 = 50%, 0 = 0% (off) -RIGHT_TRIGGER_EFFECT_INTENSITY = 0.8 \ No newline at end of file +RIGHT_TRIGGER_EFFECT_INTENSITY = 1.0 \ No newline at end of file diff --git a/bin/Release/net6.0/win-x64/appsettings.ini b/bin/Release/net6.0/win-x64/appsettings.ini index c710653..9627c76 100644 --- a/bin/Release/net6.0/win-x64/appsettings.ini +++ b/bin/Release/net6.0/win-x64/appsettings.ini @@ -17,7 +17,7 @@ BRAKE_VIBRATION_START=20 ;The Maximum resistance on the throttle (0-7) MAX_THROTTLE_RESISTANCE=4 ;The Maximum resistance on the Brake (0-7) -MAX_BRAKE_RESISTANCE=7 +MAX_BRAKE_RESISTANCE=6 ;The Minimum resistance on the throttle (0-7) MIN_THROTTLE_RESISTANCE=0 ;The Minimum resistance on the Brake (0-7) @@ -42,16 +42,16 @@ MIN_BRAKE_VIBRATION = 1 ;Smoothing for Brake Resistance output. Lower = smoother. Must be greater than 0 EWMA_ALPHA_THROTTLE_FREQ = 1 ;The maximum acceleration frequency in Hz (avoid over 40). COrrelates to better grip -MAX_ACCEL_GRIPLOSS_VIBRATION = 35 +MAX_ACCEL_GRIPLOSS_VIBRATION = 55 ;The Minimum acceleration frequency in Hz (avoid over 40). Helps avoid clicking in controller MIN_ACCEL_GRIPLOSS_VIBRATION = 5 ;On a scale of 1-200 with 1 being most stiff -MIN_ACCEL_GRIPLOSS_STIFFNESS = 200 +MIN_ACCEL_GRIPLOSS_STIFFNESS = 255 ;On a scale of 1-200 with 1 being most stiff -MAX_ACCEL_GRIPLOSS_STIFFNESS = 100 +MAX_ACCEL_GRIPLOSS_STIFFNESS = 150 ; The percentage of the current RPM when we are in the "redline" of the engine RPM_REDLINE_RATIO = 0.9 ; // The percentage of the trigger effects. 1 = 100%, 0.5 = 50%, 0 = 0% (off) LEFT_TRIGGER_EFFECT_INTENSITY = 1.0 ; // The percentage of the trigger effects. 1 = 100%, 0.5 = 50%, 0 = 0% (off) -RIGHT_TRIGGER_EFFECT_INTENSITY = 0.8 \ No newline at end of file +RIGHT_TRIGGER_EFFECT_INTENSITY = 1.0 \ No newline at end of file From fdaf841566793f541b7a5f340ab38b525eac414d Mon Sep 17 00:00:00 2001 From: cosmii02 Date: Sat, 3 Sep 2022 12:56:46 +0300 Subject: [PATCH 4/4] Update Program.cs --- Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Program.cs b/Program.cs index 8050e4e..5864ae7 100644 --- a/Program.cs +++ b/Program.cs @@ -14,7 +14,7 @@ namespace ForzaDSX { class Program { - public const String VERSION = "0.4.0"; + public const String VERSION = "0.4.1"; static Settings settings = new Settings(); static bool verbose = false; static bool logToCsv = false;