Code changes

This commit is contained in:
2024-04-27 00:50:07 -05:00
parent cdac51a0f5
commit efdbb11f92
2 changed files with 7 additions and 2 deletions

View File

@@ -202,6 +202,7 @@
autoConnectCheckBox.TabIndex = 71; autoConnectCheckBox.TabIndex = 71;
autoConnectCheckBox.Text = "Auto-connect on start"; autoConnectCheckBox.Text = "Auto-connect on start";
autoConnectCheckBox.UseVisualStyleBackColor = true; autoConnectCheckBox.UseVisualStyleBackColor = true;
autoConnectCheckBox.CheckedChanged += autoConnectCheckBox_CheckedChanged;
// //
// button1 // button1
// //
@@ -967,6 +968,7 @@
mixerAutoConnectCheckbox.TabIndex = 8; mixerAutoConnectCheckbox.TabIndex = 8;
mixerAutoConnectCheckbox.Text = "Auto-connect on start"; mixerAutoConnectCheckbox.Text = "Auto-connect on start";
mixerAutoConnectCheckbox.UseVisualStyleBackColor = true; mixerAutoConnectCheckbox.UseVisualStyleBackColor = true;
mixerAutoConnectCheckbox.CheckedChanged += checkBox43_CheckedChanged;
// //
// mixerLabel // mixerLabel
// //
@@ -982,6 +984,7 @@
notifyIcon1.Icon = (Icon)resources.GetObject("notifyIcon1.Icon"); notifyIcon1.Icon = (Icon)resources.GetObject("notifyIcon1.Icon");
notifyIcon1.Text = "notifyIcon1"; notifyIcon1.Text = "notifyIcon1";
notifyIcon1.Visible = true; notifyIcon1.Visible = true;
notifyIcon1.Click += notifyIcon1_Click;
// //
// Form1 // Form1
// //
@@ -1058,6 +1061,7 @@
Name = "Form1"; Name = "Form1";
Text = "Form1"; Text = "Form1";
FormClosing += Form1_FormClosing; FormClosing += Form1_FormClosing;
Resize += Form1_Resize;
groupBox1.ResumeLayout(false); groupBox1.ResumeLayout(false);
groupBox1.PerformLayout(); groupBox1.PerformLayout();
((System.ComponentModel.ISupportInitialize)trackBar1).EndInit(); ((System.ComponentModel.ISupportInitialize)trackBar1).EndInit();

View File

@@ -177,8 +177,9 @@ namespace HidSliders.Gui
{ {
// adjusted regression of yamaha board is approx y = 5.8456 + 17.0486 * ln(x) // adjusted regression of yamaha board is approx y = 5.8456 + 17.0486 * ln(x)
// Truncate to first decimal (move decimal, int truncate, move decimal) // Truncate to first decimal (move decimal, int truncate, move decimal)
var realResult = 5.8456f + 17.0486f * (float)Math.Log(Math.Max(hidValue / Resolution, 0.02)); //var realResult = 5.8456f + 17.0486f * (float)Math.Log(Math.Max(hidValue / Resolution, 0.02));
return ((int)(realResult * 10)) / 10.0f; //return ((int)(realResult * 10)) / 10.0f;
return hidValue - 60;
} }
private void trackBar_Scroll(object sender, EventArgs e) private void trackBar_Scroll(object sender, EventArgs e)