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

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