コード例 #1
0
        private void CallibrateAxis(object e)
        {
            AxisCallibrationViewModel dialogViewModel = new AxisCallibrationViewModel(m_device, SelectedAxis);

            Global.Dialogs.ShowDialog(this, dialogViewModel);
            if (dialogViewModel.Result == AxisCallibrationViewModel.CallibrationResult.Ok)
            {
                CallibrationReport report = new CallibrationReport();
                report.Callibration = new AxisCallibration()
                {
                    ZeroValue = (ushort)dialogViewModel.ZeroValue, MinusOneVariation = (ushort)dialogViewModel.MinusVariation, PlusOneVariation = (ushort)dialogViewModel.PlusVariation
                };

                m_device.SelectAxis(SelectedAxis.Type);
                m_device.SetCallibration(report);
                m_device.SaveCallibration();
            }
            else if (dialogViewModel.Result == AxisCallibrationViewModel.CallibrationResult.ErrorOccurred)
            {
                OnErrorOccurred();
            }
        }
コード例 #2
0
 public unsafe void SetCallibration(CallibrationReport report)
 {
     BuildAndSend(report, sizeof(CallibrationReport), ReportType.ReportSetCallibration);
 }