Calibration 메뉴얼 버튼 추가
This commit is contained in:
parent
4e99433782
commit
25d96fcae4
@ -61,6 +61,15 @@
|
||||
<DataGridTextColumn Header="Master Y" Binding="{Binding MasterY}"/>
|
||||
<DataGridTextColumn Header="Vision X" Binding="{Binding VisionX}"/>
|
||||
<DataGridTextColumn Header="Vision Y" Binding="{Binding VisionY}"/>
|
||||
<DataGridTemplateColumn Header="Get Center Count">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Button Content="Click"
|
||||
Command="{Binding DataContext.CMD_GetCenterCnt, RelativeSource={RelativeSource AncestorType=DataGrid}}"
|
||||
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
</GroupBox>
|
||||
|
||||
@ -44,6 +44,7 @@ namespace WeldingCommon.Views
|
||||
public ICommand CMD_StopScannerCalibration { get; }
|
||||
public ICommand CMD_FindPattern { get; }
|
||||
public ICommand CMD_CalculateDistance { get; }
|
||||
public ICommand CMD_GetCenterCnt { get; }
|
||||
|
||||
//public ICommand CMD_ChangedCaltype { get; }
|
||||
//public ICommand CMD_SeqStop { get; }
|
||||
@ -182,6 +183,7 @@ namespace WeldingCommon.Views
|
||||
CMD_StopScannerCalibration = new DelegateCommand(PerformCmdStopScannerCalibration);
|
||||
CMD_FindPattern = new DelegateCommand(PerformCmdFindPattern);
|
||||
CMD_CalculateDistance = new DelegateCommand(PerformCmdCalculateDistance);
|
||||
CMD_GetCenterCnt = new DelegateCommand(PerformCmdGetCenterCount);
|
||||
|
||||
_MonitorTimer = new DispatcherTimer();
|
||||
_MonitorTimer.Tick += OnMonitoring;
|
||||
@ -191,6 +193,7 @@ namespace WeldingCommon.Views
|
||||
_Aurora.EventObservable.AsObservable(CommonSequenceIds.SeqScannerCalibration)
|
||||
.ObserveOnDispatcher().Subscribe(x => OnUpdateCorrectionTable(x));
|
||||
}
|
||||
|
||||
private void InitVariable()
|
||||
{
|
||||
GridRowCount = 13;
|
||||
@ -618,6 +621,19 @@ namespace WeldingCommon.Views
|
||||
Log.W($"{e.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
private void PerformCmdGetCenterCount(object obj)
|
||||
{
|
||||
_Scanner.GetXYPos(out double currentX, out double currentY);
|
||||
|
||||
// Vision Scanner Calibration인 경우
|
||||
int visionBitX = (int)(currentX * _Scanner.Config.ScaleXYFactor);
|
||||
int visionBitY = (int)(currentY * _Scanner.Config.ScaleXYFactor);
|
||||
|
||||
VisionCorrectionList[SelectedRowIndex].VisionX = visionBitX;
|
||||
VisionCorrectionList[SelectedRowIndex].VisionY = visionBitY;
|
||||
}
|
||||
|
||||
}
|
||||
public class CorrectionUnit : NotifyPropertyChangedBase
|
||||
{
|
||||
@ -647,5 +663,4 @@ namespace WeldingCommon.Views
|
||||
private double _Distance;
|
||||
public double Distance { get => _Distance; set => SetProperty(ref _Distance, value); }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user