CAN的数据UI更新更改
This commit is contained in:
@@ -52,7 +52,14 @@ namespace CapMachine.Wpf.CanDrive
|
|||||||
public string? SignalRtValue
|
public string? SignalRtValue
|
||||||
{
|
{
|
||||||
get { return _SignalRtValue; }
|
get { return _SignalRtValue; }
|
||||||
set { _SignalRtValue = value; RaisePropertyChanged(); }
|
set
|
||||||
|
{
|
||||||
|
if (_SignalRtValue != value)
|
||||||
|
{
|
||||||
|
_SignalRtValue = value;
|
||||||
|
RaisePropertyChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private StringBuilder _SignalRtValueSb = new StringBuilder(10);
|
private StringBuilder _SignalRtValueSb = new StringBuilder(10);
|
||||||
@@ -64,11 +71,11 @@ namespace CapMachine.Wpf.CanDrive
|
|||||||
get { return _SignalRtValueSb; }
|
get { return _SignalRtValueSb; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (_SignalRtValueSb != value)
|
//if (_SignalRtValueSb != value)
|
||||||
{
|
//{
|
||||||
SignalRtValue = value.ToString();
|
SignalRtValue = value.ToString();
|
||||||
_SignalRtValueSb = value;
|
_SignalRtValueSb = value;
|
||||||
}
|
//}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,10 +17,7 @@ namespace CapMachine.Wpf.Services
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class CanDriveService : BindableBase
|
public class CanDriveService : BindableBase
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// 当前选中的CanLinConfigPro 程序
|
|
||||||
/// </summary>
|
|
||||||
public CanLinConfigPro SelectedCanLinConfigPro { get; set; }
|
|
||||||
public HighSpeedDataService HighSpeedDataService { get; }
|
public HighSpeedDataService HighSpeedDataService { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -35,6 +32,12 @@ namespace CapMachine.Wpf.Services
|
|||||||
//ToomossCanDrive.StartCanDrive();
|
//ToomossCanDrive.StartCanDrive();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 当前选中的CanLinConfigPro 程序
|
||||||
|
/// </summary>
|
||||||
|
public CanLinConfigPro SelectedCanLinConfigPro { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 图莫斯 CAN Drive
|
/// 图莫斯 CAN Drive
|
||||||
/// ToomossCanDrive
|
/// ToomossCanDrive
|
||||||
|
|||||||
@@ -181,6 +181,9 @@ namespace CapMachine.Wpf.Services
|
|||||||
//TagManger.AddTag(new Tag<short>("通讯PTC模块温度", "通讯PTC模块温度[℃]", "ComPTCMdTemp", "程序", "VW15082", 100, 0, 10, "℃", new ShortTagValue(), false) { DecimalPoint = 1 });
|
//TagManger.AddTag(new Tag<short>("通讯PTC模块温度", "通讯PTC模块温度[℃]", "ComPTCMdTemp", "程序", "VW15082", 100, 0, 10, "℃", new ShortTagValue(), false) { DecimalPoint = 1 });
|
||||||
|
|
||||||
//【SongZhi】
|
//【SongZhi】
|
||||||
|
|
||||||
|
#region SongZhi
|
||||||
|
|
||||||
TagManger.AddTag(new Tag<short>(new ShortTagValue())
|
TagManger.AddTag(new Tag<short>(new ShortTagValue())
|
||||||
{
|
{
|
||||||
Name = "转速[rpm]",//名称带单位
|
Name = "转速[rpm]",//名称带单位
|
||||||
@@ -762,6 +765,8 @@ namespace CapMachine.Wpf.Services
|
|||||||
Index = "",
|
Index = "",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
#region
|
||||||
|
|
||||||
//TagManger.AddTag(new Tag<short>("OCR", "OCR[%]", "OCR", "程序", "VW15014", 100, 0, 10, "%", new ShortTagValue(), true) { DecimalPoint = 1 });
|
//TagManger.AddTag(new Tag<short>("OCR", "OCR[%]", "OCR", "程序", "VW15014", 100, 0, 10, "%", new ShortTagValue(), true) { DecimalPoint = 1 });
|
||||||
//TagManger.AddTag(new Tag<short>("HV[V]", "HV[V]", "HV", "程序", "VW15016", 100, 0, 10, "V", new ShortTagValue(), true) { DecimalPoint = 1 });
|
//TagManger.AddTag(new Tag<short>("HV[V]", "HV[V]", "HV", "程序", "VW15016", 100, 0, 10, "V", new ShortTagValue(), true) { DecimalPoint = 1 });
|
||||||
//TagManger.AddTag(new Tag<short>("HV[A]", "HV[A]", "HVCur", "程序", "VW15018", 100, 0, 1, "A", new ShortTagValue(), false) { DecimalPoint = 1 });
|
//TagManger.AddTag(new Tag<short>("HV[A]", "HV[A]", "HVCur", "程序", "VW15018", 100, 0, 1, "A", new ShortTagValue(), false) { DecimalPoint = 1 });
|
||||||
|
|||||||
@@ -58,14 +58,15 @@ namespace CapMachine.Wpf.ViewModels
|
|||||||
new CbxItems(){ Key="使能",Text="使能"},
|
new CbxItems(){ Key="使能",Text="使能"},
|
||||||
new CbxItems(){ Key="Anti_Sleep",Text="Anti_Sleep"},
|
new CbxItems(){ Key="Anti_Sleep",Text="Anti_Sleep"},
|
||||||
};
|
};
|
||||||
|
|
||||||
ReadNameCbxItems = new ObservableCollection<CbxItems>()
|
ReadNameCbxItems = new ObservableCollection<CbxItems>()
|
||||||
{
|
{
|
||||||
new CbxItems(){ Key="实际转速",Text="实际转速"},
|
new CbxItems(){ Key="通讯转速",Text="通讯转速"},
|
||||||
new CbxItems(){ Key="输入电压",Text="输入电压"},
|
new CbxItems(){ Key="通讯母线电压",Text="通讯母线电压"},
|
||||||
new CbxItems(){ Key="输入电流",Text="输入电流"},
|
new CbxItems(){ Key="通讯母线电流",Text="通讯母线电流"},
|
||||||
new CbxItems(){ Key="输入功率",Text="输入功率"},
|
new CbxItems(){ Key="通讯相电流",Text="通讯相电流"},
|
||||||
new CbxItems(){ Key="相电流",Text="相电流"},
|
new CbxItems(){ Key="通信功率",Text="通信功率"},
|
||||||
new CbxItems(){ Key="ECU温度",Text="ECU温度"},
|
new CbxItems(){ Key="通讯芯片温度",Text="通讯芯片温度"},
|
||||||
};
|
};
|
||||||
InitLoadCanConfigPro();
|
InitLoadCanConfigPro();
|
||||||
|
|
||||||
|
|||||||
@@ -485,8 +485,7 @@
|
|||||||
<Button
|
<Button
|
||||||
Margin="5,0"
|
Margin="5,0"
|
||||||
Command="{Binding CanOpCmd}"
|
Command="{Binding CanOpCmd}"
|
||||||
CommandParameter="CycleSend"
|
CommandParameter="CycleSend">
|
||||||
Content="循环发送">
|
|
||||||
<Button.Style>
|
<Button.Style>
|
||||||
<Style BasedOn="{StaticResource MaterialDesignFlatDarkBgButton}" TargetType="Button">
|
<Style BasedOn="{StaticResource MaterialDesignFlatDarkBgButton}" TargetType="Button">
|
||||||
<Style.Triggers>
|
<Style.Triggers>
|
||||||
@@ -501,12 +500,24 @@
|
|||||||
</Style.Triggers>
|
</Style.Triggers>
|
||||||
</Style>
|
</Style>
|
||||||
</Button.Style>
|
</Button.Style>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<TextBlock
|
||||||
|
Margin="2,0"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
FontFamily="/Assets/Fonts/#iconfont"
|
||||||
|
FontSize="18"
|
||||||
|
Text="" />
|
||||||
|
<TextBlock
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
FontSize="14"
|
||||||
|
Text="循环发送" />
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
Margin="5,0"
|
Margin="5,0"
|
||||||
Command="{Binding CanOpCmd}"
|
Command="{Binding CanOpCmd}"
|
||||||
CommandParameter="CycleRecive"
|
CommandParameter="CycleRecive">
|
||||||
Content="循环接收">
|
|
||||||
<Button.Style>
|
<Button.Style>
|
||||||
<Style BasedOn="{StaticResource MaterialDesignFlatDarkBgButton}" TargetType="Button">
|
<Style BasedOn="{StaticResource MaterialDesignFlatDarkBgButton}" TargetType="Button">
|
||||||
<Style.Triggers>
|
<Style.Triggers>
|
||||||
@@ -521,6 +532,18 @@
|
|||||||
</Style.Triggers>
|
</Style.Triggers>
|
||||||
</Style>
|
</Style>
|
||||||
</Button.Style>
|
</Button.Style>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<TextBlock
|
||||||
|
Margin="2,0"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
FontFamily="/Assets/Fonts/#iconfont"
|
||||||
|
FontSize="18"
|
||||||
|
Text="" />
|
||||||
|
<TextBlock
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
FontSize="14"
|
||||||
|
Text="循环接收" />
|
||||||
|
</StackPanel>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user