| | |
| | | namespace A032.Process.Calibration |
| | | { |
| | | [Device("Calibration_9P_Dynamic", "动态9点标定", EnumHelper.DeviceAttributeType.OperationConfigCtrl)] |
| | | public partial class CtrlCalib9PDynamic : UserControl, IConfigCtrl<CameraBase, CalibrationConfigCollection> |
| | | public partial class CtrlCalib9PDynamic : UserControl//, IConfigCtrl<CameraBase, CalibrationConfigCollection> |
| | | { |
| | | PubSubCenter PubSubCenter = PubSubCenter.GetInstance(); |
| | | AutoResetEvent _confirmHandle = new AutoResetEvent(false); |
| | |
| | | InitializeComponent(); |
| | | } |
| | | |
| | | public CtrlCalib9PDynamic(ProcessControl process, IDevice device, IOperationConfig config, Action<List<CalibrationConfig>> finalCalculation) |
| | | public CtrlCalib9PDynamic(ProcessControl process, CalibrationConfigCollection calibConfig, AGVBindUnit bind, PathPosition position, Action<AGVBindUnit, int, int> commuAction, Action<CalibrationConfigCollection, AGVBindUnit, PathPosition> finalCalculation) |
| | | { |
| | | InitializeComponent(); |
| | | |
| | | ProcessControl = process; |
| | | Camera = device as CameraBase; |
| | | Config = config as CalibrationConfigCollection; |
| | | |
| | | Config = calibConfig as CalibrationConfigCollection; |
| | | |
| | | Camera = bind.Camera as CameraBase; |
| | | |
| | | Bind = bind; |
| | | Position = position; |
| | | CommuAction = commuAction; |
| | | FinalCalculation = finalCalculation; |
| | | } |
| | | |
| | | public CalibrationConfigCollection Config { get; set; } |
| | | public CameraBase Camera { get; set; } |
| | | public ProcessControl ProcessControl { get; set; } |
| | | public Action<List<CalibrationConfig>> FinalCalculation { get; set; } |
| | | AGVBindUnit Bind { get; set; } |
| | | PathPosition Position { get; set; } |
| | | Action<AGVBindUnit, int, int> CommuAction; |
| | | CalibrationConfigCollection Config { get; set; } |
| | | CameraBase Camera { get; set; } |
| | | ProcessControl ProcessControl { get; set; } |
| | | Action<CalibrationConfigCollection, AGVBindUnit, PathPosition> FinalCalculation { get; set; } |
| | | |
| | | public CalibrationConfigCollection GetConfig() |
| | | { |
| | |
| | | |
| | | private void btnStartCalib_Click(object sender, EventArgs e) |
| | | { |
| | | if (chkOfflineCalib.Checked) |
| | | { |
| | | //ProcessControl.Calibration_Pick_9P_Dynamic_Offline(Config.Configs); |
| | | } |
| | | else |
| | | { |
| | | //ProcessControl.SendCalibStartSignal(Config.TriggerAddress); |
| | | } |
| | | //if (chkOfflineCalib.Checked) |
| | | //{ |
| | | // //ProcessControl.Calibration_Pick_9P_Dynamic_Offline(Config.Configs); |
| | | //} |
| | | //else |
| | | //{ |
| | | // //ProcessControl.SendCalibStartSignal(Config.TriggerAddress); |
| | | //} |
| | | |
| | | ProcessControl.MultipleStepsProcess(Config, Bind, CommuAction); |
| | | } |
| | | |
| | | private void btnLoadOfflineImages_Click(object sender, EventArgs e) |
| | |
| | | |
| | | private void btnStepRun_Click(object sender, EventArgs e) |
| | | { |
| | | //CalibrationConfig config = propGridConfig.SelectedObject as CalibrationConfig; |
| | | CalibrationConfig config = propGridConfig.SelectedObject as CalibrationConfig; |
| | | //if (!chkOfflineRun.Checked) |
| | | //{ |
| | | // ProcessControl.CalibMarkPoint(Camera, config, _selectedStepIndex + 1); |
| | |
| | | //} |
| | | |
| | | //tsslInfo.Text = $"单步运算完成。标记点坐标:{config.ImageMarkPoint.X},{config.ImageMarkPoint.Y}"; |
| | | |
| | | ProcessControl.SingleStepProcess(config, CommuAction, Bind, Position.PositionNo, _selectedStepIndex); |
| | | tsslInfo.Text = $"单步运算完成。标记点坐标:{config.ImageMarkPoint.X},{config.ImageMarkPoint.Y}"; |
| | | } |
| | | |
| | | private void btnCalcuMatrix_Click(object sender, EventArgs e) |
| | | { |
| | | FinalCalculation.Invoke(Config.Configs); |
| | | FinalCalculation.Invoke(Config, Bind, Position); |
| | | } |
| | | |
| | | private void btnSnap_Click(object sender, EventArgs e) |