LIN SCH的更改

This commit is contained in:
2025-10-13 11:41:24 +08:00
parent 443894fa9b
commit 3cb4747002
4 changed files with 174 additions and 11 deletions

View File

@@ -901,6 +901,48 @@ namespace CapMachine.Wpf.ViewModels
set { _DataBaudRateCbxItems = value; RaisePropertyChanged(); }
}
private DelegateCommand<object> _SchEnableCmd;
/// <summary>
/// 调度表的使能 操作的指令
/// </summary>
public DelegateCommand<object> SchEnableCmd
{
set
{
_SchEnableCmd = value;
}
get
{
if (_SchEnableCmd == null)
{
_SchEnableCmd = new DelegateCommand<object>((Par) => SchEnableCmdCall(Par));
}
return _SchEnableCmd;
}
}
/// <summary>
/// 调度表的使能信息
/// </summary>
/// <param name="par"></param>
/// <exception cref="NotImplementedException"></exception>
private void SchEnableCmdCall(object par)
{
var dd = SelectedLINConfigExdDto.SchEnable;
var Result = (bool)par;
if (Result)
{
LinDriveService.ToomossLinDrive.SchEnable = true;
}
else
{
LinDriveService.ToomossLinDrive.SchEnable = false;
}
}
private DelegateCommand<string> _LinOpCmd;
/// <summary>
/// LIN操作的指令
@@ -1047,6 +1089,12 @@ namespace CapMachine.Wpf.ViewModels
break;
case "CycleSend"://循环发送你
//有可能加载完毕后不手动改变状态,导致值没有传输,所以这里赋值
LinDriveService.ToomossLinDrive.SchEnable = SelectedLINConfigExdDto.SchEnable;
//无论有没有调度表都要把这个配置给LinDriveService
LinDriveService.ListLINScheduleConfig = ListLINScheduleConfigDto.ToList();
//循环发送数据
LinDriveService.CycleSendMsg();
@@ -1260,8 +1308,8 @@ namespace CapMachine.Wpf.ViewModels
//LinDriveService.ToomossLinDrive.LinTest();
LinDriveService.ToomossLinDrive.StartSchedule();
break;
//LinDriveService.ToomossLinDrive.StartSchedule();
//break;
//
if (LinDriveService.ToomossLinDrive.OpenState)
{