其他程序的CAN CANFD LIN的移植

This commit is contained in:
2025-09-07 22:08:21 +08:00
parent 566a3d2ca6
commit e2e28935d1
55 changed files with 9087 additions and 677 deletions

View File

@@ -406,7 +406,14 @@
FontSize="18"
Text="" />
<TextBlock Style="{StaticResource TextBlockStyle}" Text="波特率" />
<TextBox Style="{StaticResource TextBoxStyle}" Text="{Binding SelectedLINConfigExdDto.BaudRate}" />
<ComboBox
Width="100"
DisplayMemberPath="Text"
FontSize="16"
ItemsSource="{Binding DataBaudRateCbxItems}"
SelectedValue="{Binding SelectedLINConfigExdDto.BaudRate, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
SelectedValuePath="Key" />
<!--<TextBox Style="{StaticResource TextBoxStyle}" Text="{Binding SelectedLINConfigExdDto.BaudRate}" />-->
</StackPanel>
<StackPanel Grid.Row="1" Orientation="Horizontal">
@@ -573,6 +580,84 @@
</StackPanel>
<StackPanel
Grid.Row="1"
Grid.Column="1"
Margin="-20,0"
Orientation="Horizontal">
<TextBlock
VerticalAlignment="Center"
FontFamily="/Assets/Fonts/#iconfont"
FontSize="20"
Text="&#xe977;" />
<TextBlock
Width="80"
Style="{StaticResource TextBlockStyle}"
Text="报文状态:" />
<Border
Margin="0,12"
BorderThickness="1"
CornerRadius="5">
<Border.Style>
<Style TargetType="Border">
<Setter Property="Background" Value="Gray" />
<Style.Triggers>
<DataTrigger Binding="{Binding LinDriveService.ToomossLinDrive.IsSendOk}" Value="true">
<Setter Property="Background" Value="LimeGreen" />
</DataTrigger>
</Style.Triggers>
</Style>
</Border.Style>
<TextBlock
Margin="5"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Foreground="White"
Text="发送" />
</Border>
<Border
Margin="2,12"
BorderThickness="1"
CornerRadius="5">
<Border.Style>
<Style TargetType="Border">
<Setter Property="Background" Value="Gray" />
<Style.Triggers>
<DataTrigger Binding="{Binding LinDriveService.ToomossLinDrive.IsReviceOk}" Value="true">
<Setter Property="Background" Value="LimeGreen" />
</DataTrigger>
</Style.Triggers>
</Style>
</Border.Style>
<TextBlock
Margin="5"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Foreground="White"
Text="接收" />
</Border>
<TextBlock
Margin="5,0,0,0"
VerticalAlignment="Center"
FontFamily="/Assets/Fonts/#iconfont"
FontSize="20"
Text="&#xe796;" />
<TextBlock
Width="90"
Style="{StaticResource TextBlockStyle}"
Text="启用调度表:" />
<ToggleButton
Width="40"
Margin="5,2"
Command="{Binding SchEnableCmd}"
CommandParameter="{Binding SelectedCANConfigExdDto.SchEnable}"
IsChecked="{Binding SelectedCANConfigExdDto.SchEnable}"
Style="{StaticResource MaterialDesignSwitchToggleButton}"
ToolTip="启用调度表" />
</StackPanel>
</Grid>
</Grid>
@@ -631,6 +716,24 @@
Margin="0,0,15,0"
HorizontalAlignment="Right"
Orientation="Horizontal">
<Button
Margin="5,0"
Command="{Binding WriteCmd}"
CommandParameter="WriteSch"
Foreground="White">
<StackPanel Orientation="Horizontal">
<TextBlock
Margin="2,0"
VerticalAlignment="Center"
FontFamily="/Assets/Fonts/#iconfont"
FontSize="18"
Text="&#xe796;" />
<TextBlock
VerticalAlignment="Center"
FontSize="14"
Text="调度表" />
</StackPanel>
</Button>
<Button
Margin="5,0"
Command="{Binding WriteCmd}"