Code changes
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user