Build 41:

fix: #26 null ptr issue in Device Tuning with unassigned axes, rework of newly introduced changes with regards to not assigned items (Device, Deadzone, Invert)
improve: add tooltip with Device Name and GUID to Device Tabs
update: Beta Version tag includes build and beta tag

Build 40: fixed issue #25
pull/104/head v2.10beta2
bm98 10 years ago
parent 30db0e48dc
commit d7086deb69

43
Form1.Designer.cs generated

@ -64,6 +64,7 @@
this.tdiDelBinding = new System.Windows.Forms.ToolStripMenuItem();
this.tc1 = new System.Windows.Forms.TabControl();
this.tabJS1 = new System.Windows.Forms.TabPage();
this.UC_JoyPanel = new SCJMapper_V2.UC_JoyPanel();
this.panel1 = new System.Windows.Forms.Panel();
this.btClip = new System.Windows.Forms.Button();
this.txRebind = new System.Windows.Forms.TextBox();
@ -78,6 +79,7 @@
this.tlpanel = new System.Windows.Forms.TableLayoutPanel();
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.btDumpLog = new System.Windows.Forms.Button();
this.btJSTuning = new System.Windows.Forms.Button();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.btSettings = new System.Windows.Forms.Button();
@ -122,8 +124,6 @@
this.loadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.btDumpLog = new System.Windows.Forms.Button();
this.UC_JoyPanel = new SCJMapper_V2.UC_JoyPanel();
this.cmCopyPaste.SuspendLayout();
this.panel2.SuspendLayout();
this.cmAddDel.SuspendLayout();
@ -428,6 +428,7 @@
this.tc1.Multiline = true;
this.tc1.Name = "tc1";
this.tc1.SelectedIndex = 0;
this.tc1.ShowToolTips = true;
this.tc1.Size = new System.Drawing.Size(289, 349);
this.tc1.TabIndex = 15;
this.tc1.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.tc1_DrawItem);
@ -442,6 +443,15 @@
this.tabJS1.TabIndex = 0;
this.tabJS1.Text = "Joystick 1";
//
// UC_JoyPanel
//
this.UC_JoyPanel.Dock = System.Windows.Forms.DockStyle.Fill;
this.UC_JoyPanel.JsAssignment = 0;
this.UC_JoyPanel.Location = new System.Drawing.Point(3, 3);
this.UC_JoyPanel.Name = "UC_JoyPanel";
this.UC_JoyPanel.Size = new System.Drawing.Size(275, 315);
this.UC_JoyPanel.TabIndex = 0;
//
// panel1
//
this.tlpanel.SetColumnSpan(this.panel1, 3);
@ -605,6 +615,16 @@
this.tableLayoutPanel1.Size = new System.Drawing.Size(294, 151);
this.tableLayoutPanel1.TabIndex = 23;
//
// btDumpLog
//
this.btDumpLog.Location = new System.Drawing.Point(3, 63);
this.btDumpLog.Name = "btDumpLog";
this.btDumpLog.Size = new System.Drawing.Size(120, 24);
this.btDumpLog.TabIndex = 25;
this.btDumpLog.Text = "Dump Log-->";
this.btDumpLog.UseVisualStyleBackColor = true;
this.btDumpLog.Click += new System.EventHandler(this.btDumpLog_Click);
//
// btJSTuning
//
this.btJSTuning.Location = new System.Drawing.Point(3, 123);
@ -1075,25 +1095,6 @@
this.statusStrip1.TabIndex = 26;
this.statusStrip1.Text = "statusStrip1";
//
// btDumpLog
//
this.btDumpLog.Location = new System.Drawing.Point(3, 63);
this.btDumpLog.Name = "btDumpLog";
this.btDumpLog.Size = new System.Drawing.Size(120, 24);
this.btDumpLog.TabIndex = 25;
this.btDumpLog.Text = "Dump Log-->";
this.btDumpLog.UseVisualStyleBackColor = true;
this.btDumpLog.Click += new System.EventHandler(this.btDumpLog_Click);
//
// UC_JoyPanel
//
this.UC_JoyPanel.Dock = System.Windows.Forms.DockStyle.Fill;
this.UC_JoyPanel.JsAssignment = 0;
this.UC_JoyPanel.Location = new System.Drawing.Point(3, 3);
this.UC_JoyPanel.Name = "UC_JoyPanel";
this.UC_JoyPanel.Size = new System.Drawing.Size(275, 315);
this.UC_JoyPanel.TabIndex = 0;
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);

@ -191,7 +191,10 @@ namespace SCJMapper_V2
this.Location = m_AppSettings.FormLocation;
String version = Application.ProductVersion; // get the version information
lblTitle.Text += " - V " + version.Substring( 0, version.IndexOf( ".", version.IndexOf( "." ) + 1 ) ); // get the first two elements
// BETA VERSION; TODO - comment out if not longer
//lblTitle.Text += " - V " + version.Substring( 0, version.IndexOf( ".", version.IndexOf( "." ) + 1 ) ); // PRODUCTION
lblTitle.Text += " - V " + version + " beta"; // BETA
log.InfoFormat( "Application Version: {0}", version.ToString( ) );
// tooltips where needed
@ -432,19 +435,23 @@ namespace SCJMapper_V2
// first panel - The Tab content exists already
if ( gpDevice != null ) {
log.Debug( "Add first Gamepad panel" );
tc1.TabPages[0].Text = "Gamepad ";
UC_GpadPanel uUC_GpadPanelNew = new UC_GpadPanel( ); tc1.TabPages[0].Controls.Add( uUC_GpadPanelNew );
tc1.TabPages[tabs].Text = "Gamepad ";
UC_GpadPanel uUC_GpadPanelNew = new UC_GpadPanel( ); tc1.TabPages[tabs].Controls.Add( uUC_GpadPanelNew );
uUC_GpadPanelNew.Size = UC_JoyPanel.Size; uUC_GpadPanelNew.Location = UC_JoyPanel.Location;
UC_JoyPanel.Enabled = false; UC_JoyPanel.Visible = false; // don't use this one
log.Debug( "Create Gamepad instance" );
gs = new GamepadCls( gpDevice, uUC_GpadPanelNew, 0 ); // does all device related activities for that particular item
gs = new GamepadCls( gpDevice, uUC_GpadPanelNew, tabs ); // does all device related activities for that particular item
gs.SetDeviceName( instance.ProductName );
tc1.TabPages[tabs].ToolTipText = String.Format( "{0}\n{1}", gs.DevName, " " );
toolTip1.SetToolTip( tc1.TabPages[tabs], tc1.TabPages[tabs].ToolTipText );
}
else {
log.Debug( "Add first Joystick panel" );
log.Debug( "Create Joystick instance" );
tc1.TabPages[tabs].Text = String.Format( "Joystick {0}", nJs++ );
js = new JoystickCls( jsDevice, this, tabs + 1, UC_JoyPanel, 0 ); // does all device related activities for that particular item
js = new JoystickCls( jsDevice, this, tabs + 1, UC_JoyPanel, tabs ); // does all device related activities for that particular item
tc1.TabPages[tabs].ToolTipText = String.Format( "{0}\n{1}", js.DevName, js.DevInstanceGUID );
toolTip1.SetToolTip( tc1.TabPages[tabs], tc1.TabPages[tabs].ToolTipText );
}
}
else {
@ -453,10 +460,11 @@ namespace SCJMapper_V2
tc1.TabPages.Add( "Gamepad " );
UC_GpadPanel uUC_GpadPanelNew = new UC_GpadPanel( ); tc1.TabPages[tabs].Controls.Add( uUC_GpadPanelNew );
uUC_GpadPanelNew.Size = UC_JoyPanel.Size; uUC_GpadPanelNew.Location = UC_JoyPanel.Location;
UC_JoyPanel.Enabled = false; UC_JoyPanel.Visible = false; // don't use this one
log.Debug( "Create Gamepad instance" );
gs = new GamepadCls( gpDevice, uUC_GpadPanelNew, tabs ); // does all device related activities for that particular item
gs.SetDeviceName( instance.ProductName );
tc1.TabPages[tabs].ToolTipText = String.Format( "{0}\n{1}", gs.DevName, " " );
toolTip1.SetToolTip( tc1.TabPages[tabs], tc1.TabPages[tabs].ToolTipText );
}
else {
log.Debug( "Add next Joystick panel" );
@ -466,6 +474,8 @@ namespace SCJMapper_V2
uUC_JoyPanelNew.Size = UC_JoyPanel.Size; uUC_JoyPanelNew.Location = UC_JoyPanel.Location;
log.Debug( "Create Joystick instance" );
js = new JoystickCls( jsDevice, this, tabs + 1, uUC_JoyPanelNew, tabs ); // does all device related activities for that particular item
tc1.TabPages[tabs].ToolTipText = String.Format( "{0}\n{1}", js.DevName, js.DevInstanceGUID );
toolTip1.SetToolTip( tc1.TabPages[tabs], tc1.TabPages[tabs].ToolTipText );
}
}
@ -1045,6 +1055,7 @@ namespace SCJMapper_V2
}
}
m_AT.ActionMaps.TuningY.Reset( ); // set defaults
if ( dev != null ) {
// JS commands that are supported
if ( nodeText.ToLowerInvariant( ).EndsWith( "_x" ) || nodeText.ToLowerInvariant( ).EndsWith( "_rotx" ) ) {
@ -1093,6 +1104,7 @@ namespace SCJMapper_V2
}
}
m_AT.ActionMaps.TuningP.Reset( ); // set defaults
if ( dev != null ) {
// JS commands that are supported
if ( nodeText.ToLowerInvariant( ).EndsWith( "_x" ) || nodeText.ToLowerInvariant( ).EndsWith( "_rotx" ) ) {
@ -1134,6 +1146,7 @@ namespace SCJMapper_V2
dev = m_Joystick.Find_jsN( JoystickCls.JSNum( ActionTreeNode.CommandFromNodeText( nodeText ) ) );
}
m_AT.ActionMaps.TuningR.Reset( ); // set defaults
if ( dev != null ) {
// JS commands that are supported
if ( nodeText.ToLowerInvariant( ).EndsWith( "_x" ) || nodeText.ToLowerInvariant( ).EndsWith( "_rotx" ) ) {

@ -128,7 +128,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABI
DwAAAk1TRnQBSQFMAgEBCAEAAdABCwHQAQsBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
DwAAAk1TRnQBSQFMAgEBCAEAAdgBCwHYAQsBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAATADAAEBAQABCAYAAQwYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA

@ -111,8 +111,8 @@ namespace SCJMapper_V2
public bool InvertUsed
{
get { return m_cbInvert.Checked; }
set { m_cbInvert.Checked = value; }
get { return ( m_cbInvert == null ) ? false : m_cbInvert.Checked; }
set { if ( m_cbInvert != null ) m_cbInvert.Checked = value; }
}
public CheckBox CBInvert
{
@ -151,6 +151,14 @@ namespace SCJMapper_V2
#endregion
// reset some defaults
public void Reset()
{
GameDevice = null;
Deadzone = null;
Action = "";
}
/// <summary>
/// Derive values from a command (e.g. v_pitch - js1_x)

@ -29,7 +29,7 @@ namespace SCJMapper_V2
/// <returns>A string</returns>
private String Chk( String s, String d )
{
if ( s.Length > 12 ) return d; else return s;
if ( s.Length > 12 ) return s.Substring(0,12) ; else return s;
}

@ -438,9 +438,10 @@
// lblYCmd
//
this.lblYCmd.AutoSize = true;
this.lblYCmd.Font = new System.Drawing.Font("Segoe UI", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblYCmd.Location = new System.Drawing.Point(37, 0);
this.lblYCmd.Name = "lblYCmd";
this.lblYCmd.Size = new System.Drawing.Size(59, 13);
this.lblYCmd.Size = new System.Drawing.Size(47, 12);
this.lblYCmd.TabIndex = 2;
this.lblYCmd.Text = "Command";
//
@ -648,9 +649,10 @@
// lblPCmd
//
this.lblPCmd.AutoSize = true;
this.lblPCmd.Font = new System.Drawing.Font("Segoe UI", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblPCmd.Location = new System.Drawing.Point(37, 0);
this.lblPCmd.Name = "lblPCmd";
this.lblPCmd.Size = new System.Drawing.Size(59, 13);
this.lblPCmd.Size = new System.Drawing.Size(47, 12);
this.lblPCmd.TabIndex = 3;
this.lblPCmd.Text = "Command";
//
@ -858,9 +860,10 @@
// lblRCmd
//
this.lblRCmd.AutoSize = true;
this.lblRCmd.Font = new System.Drawing.Font("Segoe UI", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblRCmd.Location = new System.Drawing.Point(37, 0);
this.lblRCmd.Name = "lblRCmd";
this.lblRCmd.Size = new System.Drawing.Size(59, 13);
this.lblRCmd.Size = new System.Drawing.Size(47, 12);
this.lblRCmd.TabIndex = 4;
this.lblRCmd.Text = "Command";
//

@ -139,7 +139,6 @@ namespace SCJMapper_V2
private DeviceTuningParameter m_Ytuning = new DeviceTuningParameter( );
// live values
private DeviceCls m_Ydev = null;
private String m_liveYawCommand ="";
private float m_liveYdeadzone = 0.0f;
private float m_liveYsense = 1.0f;
@ -160,7 +159,6 @@ namespace SCJMapper_V2
set
{
m_Ytuning = value;
m_Ydev = m_Ytuning.GameDevice;
// populate from input
lblYCmd.Text = m_Ytuning.Action;
m_liveYawCommand = m_Ytuning.CommandCtrl;
@ -197,7 +195,7 @@ namespace SCJMapper_V2
private void YawUpdateTuning( )
{
// update from left area labels (xyUsed items are updated on change - so they are actual allready)
m_Ytuning.Deadzone.Deadzone = lblYdeadzone.Text;
if ( m_Ytuning.Deadzone != null ) m_Ytuning.Deadzone.Deadzone = lblYdeadzone.Text;
m_Ytuning.Sensitivity = lblYsense.Text;
m_Ytuning.Exponent = lblYexponent.Text;
List<String> pts = new List<String>( );
@ -215,7 +213,6 @@ namespace SCJMapper_V2
private DeviceTuningParameter m_Ptuning = new DeviceTuningParameter( );
// live values
private DeviceCls m_Pdev = null;
private String m_livePitchCommand ="";
private float m_livePdeadzone = 0.0f;
private float m_livePsense = 1.0f;
@ -237,7 +234,6 @@ namespace SCJMapper_V2
set
{
m_Ptuning = value;
m_Pdev = m_Ptuning.GameDevice;
// populate from input
lblPCmd.Text = m_Ptuning.Action; //
m_livePitchCommand = m_Ptuning.CommandCtrl;
@ -274,7 +270,7 @@ namespace SCJMapper_V2
private void PitchUpdateTuning( )
{
// update from left area labels (xyUsed items are updated on change - so they are actual allready)
m_Ptuning.Deadzone.Deadzone = lblPdeadzone.Text;
if ( m_Ptuning.Deadzone != null ) m_Ptuning.Deadzone.Deadzone = lblPdeadzone.Text;
m_Ptuning.Sensitivity = lblPsense.Text;
m_Ptuning.Exponent = lblPexponent.Text;
List<String> pts = new List<String>( );
@ -292,7 +288,6 @@ namespace SCJMapper_V2
private DeviceTuningParameter m_Rtuning = new DeviceTuningParameter( );
// live values
private DeviceCls m_Rdev = null;
private String m_liveRollCommand;
private float m_liveRdeadzone = 0.0f;
private float m_liveRsense = 1.0f;
@ -314,7 +309,6 @@ namespace SCJMapper_V2
set
{
m_Rtuning = value;
m_Rdev = m_Rtuning.GameDevice;
// populate from input
lblRCmd.Text = m_Rtuning.Action; //
m_liveRollCommand = m_Rtuning.CommandCtrl;
@ -351,7 +345,7 @@ namespace SCJMapper_V2
private void RollUpdateTuning( )
{
// update from left area labels (xyUsed items are updated on change - so they are actual allready)
m_Rtuning.Deadzone.Deadzone = lblRdeadzone.Text;
if ( m_Rtuning.Deadzone != null ) m_Rtuning.Deadzone.Deadzone = lblRdeadzone.Text;
m_Rtuning.Sensitivity = lblRsense.Text;
m_Rtuning.Exponent = lblRexponent.Text;
List<String> pts = new List<String>( );
@ -690,77 +684,83 @@ namespace SCJMapper_V2
int i_x = 0, i_y = 0, i_z = 0; // Joystick Input
int x = 0; int y = 0; int z = 0; // retain real input as i_xyz
// query the Josticks for the 3 controls
if ( m_Ydev != null ) m_Ydev.GetCmdData( m_liveYawCommand, out i_x ); // + = right
if ( m_Pdev != null ) m_Pdev.GetCmdData( m_livePitchCommand, out i_y ); // + = up
if ( m_Rdev != null ) m_Rdev.GetCmdData( m_liveRollCommand, out i_z ); // += twist right
if ( m_Ytuning.GameDevice != null ) m_Ytuning.GameDevice.GetCmdData( m_liveYawCommand, out i_x ); // + = right
if ( m_Ptuning.GameDevice != null ) m_Ptuning.GameDevice.GetCmdData( m_livePitchCommand, out i_y ); // + = up
if ( m_Rtuning.GameDevice != null ) m_Rtuning.GameDevice.GetCmdData( m_liveRollCommand, out i_z ); // += twist right
// apply the modifications of the control (deadzone, shape, sensitivity)
x = i_x; y = i_y; z = i_z; // retain real input as i_xyz
m_flightModel.Velocity = Vector3d.Zero;
// Yaw
if ( m_Ytuning.Deadzone.DeadzoneUsed ) {
int sx = Math.Sign( x );
x = ( int )( Math.Abs( x ) - m_liveYdeadzone ); x = ( x < 0 ) ? 0 : x * sx; // DZ is subtracted from the input
}
{
double fout = 0.0;
if ( m_Ytuning.ExponentUsed ) {
fout = Math.Pow( Math.Abs( x / 1000.0 ), m_liveYexponent ) * ( ( m_Ytuning.SensitivityUsed ) ? m_liveYsense : 1.0 ) * Math.Sign( x );
}
else if ( m_Ytuning.NonLinCurveUsed ) {
fout = m_liveYnonLinCurve.EvalX( x ) * ( ( m_Ytuning.SensitivityUsed ) ? m_liveYsense : 1.0 );
if ( m_Ytuning.GameDevice != null ) {
if ( ( m_Ytuning.Deadzone != null ) && m_Ytuning.Deadzone.DeadzoneUsed ) {
int sx = Math.Sign( x );
x = ( int )( Math.Abs( x ) - m_liveYdeadzone ); x = ( x < 0 ) ? 0 : x * sx; // DZ is subtracted from the input
}
else {
fout = Math.Abs( x / 1000.0 ) * ( ( m_Ytuning.SensitivityUsed ) ? m_liveYsense : 1.0 ) * Math.Sign( x );
{
double fout = 0.0;
if ( m_Ytuning.ExponentUsed ) {
fout = Math.Pow( Math.Abs( x / 1000.0 ), m_liveYexponent ) * ( ( m_Ytuning.SensitivityUsed ) ? m_liveYsense : 1.0 ) * Math.Sign( x );
}
else if ( m_Ytuning.NonLinCurveUsed ) {
fout = m_liveYnonLinCurve.EvalX( x ) * ( ( m_Ytuning.SensitivityUsed ) ? m_liveYsense : 1.0 );
}
else {
fout = Math.Abs( x / 1000.0 ) * ( ( m_Ytuning.SensitivityUsed ) ? m_liveYsense : 1.0 ) * Math.Sign( x );
}
fout = ( fout > 1.0 ) ? 1.0 : fout; // safeguard against any overshoots
// update in/out labels if active axis
lblYInput.Text = ( i_x / 1000.0 ).ToString( "0.00" ); lblYOutput.Text = ( fout ).ToString( "0.00" );
// calculate new direction vector
m.X = ( ( m_Ytuning.InvertUsed ) ? -1 : 1 ) * ( ( !cbYuse.Checked ) ? fout : 0 ) * m_msElapsed * DegPerMS;
}
fout = ( fout > 1.0 ) ? 1.0 : fout; // safeguard against any overshoots
// update in/out labels if active axis
lblYInput.Text = ( i_x / 1000.0 ).ToString( "0.00" ); lblYOutput.Text = ( fout ).ToString( "0.00" );
// calculate new direction vector
m.X = ( ( m_Ytuning.InvertUsed ) ? -1 : 1 ) * ( ( !cbYuse.Checked ) ? fout : 0 ) * m_msElapsed * DegPerMS;
}
// Pitch
if ( m_Ptuning.Deadzone.DeadzoneUsed ) {
int sy = Math.Sign( y );
y = ( int )( Math.Abs( y ) - m_livePdeadzone ); y = ( y < 0 ) ? 0 : y * sy;
}
{
double fout = 0.0;
if ( m_Ptuning.ExponentUsed ) {
fout = Math.Pow( Math.Abs( y / 1000.0 ), m_livePexponent ) * ( ( m_Ptuning.SensitivityUsed ) ? m_livePsense : 1.0 ) * Math.Sign( y );
}
else if ( m_Ptuning.NonLinCurveUsed ) {
fout = m_livePnonLinCurve.EvalX( y ) * ( ( m_Ptuning.SensitivityUsed ) ? m_livePsense : 1.0 );
if ( m_Ptuning.GameDevice != null ) {
if ( ( m_Ptuning.Deadzone != null ) && m_Ptuning.Deadzone.DeadzoneUsed ) {
int sy = Math.Sign( y );
y = ( int )( Math.Abs( y ) - m_livePdeadzone ); y = ( y < 0 ) ? 0 : y * sy;
}
else {
fout = Math.Abs( y / 1000.0 ) * ( ( m_Ptuning.SensitivityUsed ) ? m_livePsense : 1.0 ) * Math.Sign( y );
{
double fout = 0.0;
if ( m_Ptuning.ExponentUsed ) {
fout = Math.Pow( Math.Abs( y / 1000.0 ), m_livePexponent ) * ( ( m_Ptuning.SensitivityUsed ) ? m_livePsense : 1.0 ) * Math.Sign( y );
}
else if ( m_Ptuning.NonLinCurveUsed ) {
fout = m_livePnonLinCurve.EvalX( y ) * ( ( m_Ptuning.SensitivityUsed ) ? m_livePsense : 1.0 );
}
else {
fout = Math.Abs( y / 1000.0 ) * ( ( m_Ptuning.SensitivityUsed ) ? m_livePsense : 1.0 ) * Math.Sign( y );
}
fout = ( fout > 1.0 ) ? 1.0 : fout;
lblPInput.Text = ( i_y / 1000.0 ).ToString( "0.00" ); lblPOutput.Text = ( fout ).ToString( "0.00" );
m.Y = ( ( m_Ptuning.InvertUsed ) ? -1 : 1 ) * ( ( !cbPuse.Checked ) ? -fout : 0 ) * m_msElapsed * DegPerMS;
}
fout = ( fout > 1.0 ) ? 1.0 : fout;
lblPInput.Text = ( i_y / 1000.0 ).ToString( "0.00" ); lblPOutput.Text = ( fout ).ToString( "0.00" );
m.Y = ( ( m_Ptuning.InvertUsed ) ? -1 : 1 ) * ( ( !cbPuse.Checked ) ? -fout : 0 ) * m_msElapsed * DegPerMS;
}
// Roll
if ( m_Rtuning.Deadzone.DeadzoneUsed ) {
int sz = Math.Sign( z );
z = ( int )( Math.Abs( z ) - m_liveRdeadzone ); z = ( z < 0 ) ? 0 : z * sz;
}
{
double fout = 0.0;
if ( m_Rtuning.ExponentUsed ) {
fout = Math.Pow( Math.Abs( z / 1000.0 ), m_liveRexponent ) * ( ( m_Rtuning.SensitivityUsed ) ? m_liveRsense : 1.0 ) * Math.Sign( z );
}
else if ( m_Rtuning.NonLinCurveUsed ) {
fout = m_liveRnonLinCurve.EvalX( z ) * ( ( m_Rtuning.SensitivityUsed ) ? m_liveRsense : 1.0 );
if ( m_Rtuning.GameDevice != null ) {
if ( ( m_Rtuning.Deadzone != null ) && m_Rtuning.Deadzone.DeadzoneUsed ) {
int sz = Math.Sign( z );
z = ( int )( Math.Abs( z ) - m_liveRdeadzone ); z = ( z < 0 ) ? 0 : z * sz;
}
else {
fout = Math.Abs( z / 1000.0 ) * ( ( m_Rtuning.SensitivityUsed ) ? m_liveRsense : 1.0 ) * Math.Sign( z );
{
double fout = 0.0;
if ( m_Rtuning.ExponentUsed ) {
fout = Math.Pow( Math.Abs( z / 1000.0 ), m_liveRexponent ) * ( ( m_Rtuning.SensitivityUsed ) ? m_liveRsense : 1.0 ) * Math.Sign( z );
}
else if ( m_Rtuning.NonLinCurveUsed ) {
fout = m_liveRnonLinCurve.EvalX( z ) * ( ( m_Rtuning.SensitivityUsed ) ? m_liveRsense : 1.0 );
}
else {
fout = Math.Abs( z / 1000.0 ) * ( ( m_Rtuning.SensitivityUsed ) ? m_liveRsense : 1.0 ) * Math.Sign( z );
}
fout = ( fout > 1.0 ) ? 1.0 : fout;
lblRInput.Text = ( i_z / 1000.0 ).ToString( "0.00" ); lblROutput.Text = ( fout ).ToString( "0.00" );
m.Z = ( ( m_Rtuning.InvertUsed ) ? -1 : 1 ) * ( ( !cbRuse.Checked ) ? fout : 0 ) * m_msElapsed * DegPerMS;
}
fout = ( fout > 1.0 ) ? 1.0 : fout;
lblRInput.Text = ( i_z / 1000.0 ).ToString( "0.00" ); lblROutput.Text = ( fout ).ToString( "0.00" );
m.Z = ( ( m_Rtuning.InvertUsed ) ? -1 : 1 ) * ( ( !cbRuse.Checked ) ? fout : 0 ) * m_msElapsed * DegPerMS;
}
// finalize
@ -1188,6 +1188,8 @@ namespace SCJMapper_V2
private void cbxYdeadzone_CheckedChanged( object sender, EventArgs e )
{
if ( m_Ytuning.Deadzone == null ) return; // just not...
m_Ytuning.Deadzone.DeadzoneUsed = false;
if ( cbxYdeadzone.Checked == true ) {
m_Ytuning.Deadzone.DeadzoneUsed = true; // update storage
@ -1198,6 +1200,8 @@ namespace SCJMapper_V2
private void cbxPdeadzone_CheckedChanged( object sender, EventArgs e )
{
if ( m_Ptuning.Deadzone == null ) return; // just not...
m_Ptuning.Deadzone.DeadzoneUsed = false;
if ( cbxPdeadzone.Checked == true ) {
m_Ptuning.Deadzone.DeadzoneUsed = true; // update storage
@ -1208,6 +1212,8 @@ namespace SCJMapper_V2
private void cbxRdeadzone_CheckedChanged( object sender, EventArgs e )
{
if ( m_Rtuning.Deadzone == null ) return; // just not...
m_Rtuning.Deadzone.DeadzoneUsed = false;
if ( cbxRdeadzone.Checked == true ) {
m_Rtuning.Deadzone.DeadzoneUsed = true; // update storage

@ -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( "2.10.0.40" )]
[assembly: AssemblyFileVersion( "2.10.0.40" )]
[assembly: AssemblyVersion( "2.10.0.41" )]
[assembly: AssemblyFileVersion( "2.10.0.41" )]

@ -26,7 +26,7 @@
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>40</ApplicationRevision>
<ApplicationRevision>41</ApplicationRevision>
<ApplicationVersion>2.10.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>

@ -1,10 +1,10 @@
SC Joystick Mapper V 2.8 - Build 34 BETA
(c) Cassini, StandardToaster - 18-November-2014
SC Joystick Mapper V 2.10 - Build 40 BETA
(c) Cassini, StandardToaster - 22-December-2014
Contains 9 files:
SCJMapper.exe The program (V2.8 BETA)
SCJMapper.exe.config Program config (V2.8) - MUST be in the same folder as the Exe file
SCJMapper.exe The program (V2.10 BETA)
SCJMapper.exe.config Program config (V2.10) - MUST be in the same folder as the Exe file
SharpDX.DirectInput.dll Managed DirectInput Assembly - MUST be in the same folder as the Exe file
SharpDX.dll Managed DirectX Assembly - MUST be in the same folder as the Exe file
OpenTK.dll Managed OpenGL Assembly - MUST be in the same folder as the Exe file
@ -29,10 +29,25 @@ Scanned for viruses before packing...
cassini@burri-web.org
Changelog:
V 2.8 - BETA
V 2.10 - BETA Build 40
- rework for AC 1.0
- new feature - add DumpLog to get the AC detected Controller assignments from logfile
- new feature - add Invert checkboxes for supported option items
- new feature - context menu in treeview allows to add/delete action sub items (support addbind mapping in XML)
- update - cannot longer assign cross device mappings (AC 1.0 related - use addbind above)
- update - new options naming and structure (not compatible with pre 2.10 - delete them in the file and then reload)
- update - Profile Version to 1
V 2.8 - BETA Build 37
- new feature - add checkboxes to show Joystick, Gamepad, Kbd and Mapped Only
- fix - Blended ones don't reload with proper visual
V 2.8 - BETA Build 36
- new feature - add invert for single mappings
- improvement - initialization and assignment of Joystick devices
V 2.8 - BETA Build 34
- new feature - add keyboard input
- new feature - add gamepad input as xboxpad
- new feature - add gamepad for tuning
- new feature - blend single entries with <Space>
- fix - tuning copy to all axis now applies immediately
- improvement - cleanup of some inconsistencies
V 2.7 - Build 33

Loading…
Cancel
Save