/// <summary> /// Sends the updated speed to the TreadmillController /// </summary> public void UpdateSpeed() { if (!Communication.OptitrackCommandParser_Server.VirtualMotionCaputrePlayback) { realSpeed = Math.Round(speed * treadmillToVisuliserConversionValue, 1); if (realSpeed != TreadmillController.GetSpeed()) //only update if different { if (realSpeed >= minSpeed && realSpeed <= maxSpeed) { TreadmillController.SetSpeed((float)realSpeed); } } } }
private void button2_Click(object sender, EventArgs e) { //test the new ratio by sending out the real speed to all client applications TreadmillController.SetSpeed((float)Math.Round(speed * treadmillToVisuliserConversionValue, 1)); }