Bundles several feature streams that have been iterating on the working tree: - Developer Tools page (Debug-only via DEVELOPER_TOOLS symbol): hosts the identification card, manual KWP write + transaction log, ROM/EEPROM dump card with progress banner and completion message, persisted custom-commands library, persisted EEPROM passwords library. New service primitives: IKwpService.SendRawCustomAsync / ReadEepromAsync / ReadRomEepromAsync. Persistence mirrors the Clients XML pattern in two new files (custom_commands.xml, eeprom_passwords.xml). - Auto-test orchestrator (IAutoTestOrchestrator + AutoTestState): linear K-Line read -> unlock -> bench-on -> test sequence with snackbar UI and progress dialog VM, gated on dashboard alarms. - BIP-STATUS display: BipDisplayViewModel + BipDisplayView, RAM read at 0x0106 via IKwpService.ReadBipStatusAsync; status definitions in BipStatusDefinition. - Tests page redesign: TestSectionCard + PhaseTileView replacing the old TestPlanView/TestRunningView/TestDoneView/TestPreconditionsView/ TestSectionView controls and their VMs. - Pump command sliders: Fluent thick-track style with overhang thumb, click-anywhere-and-drag, mouse-wheel adjustment. - Window startup: app.manifest declares PerMonitorV2 DPI awareness, MainWindow installs a WM_GETMINMAXINFO hook in OnSourceInitialized and maximizes there (after the hook is in place) so the app fits the work area exactly on any display configuration. - Misc: PercentToPixelsConverter, seed_aliases.py one-shot pump-alias importer, tools/Import-BipStatus.ps1, kline_eeprom_spec.md and dump-functions reference docs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
133 lines
7.6 KiB
XML
133 lines
7.6 KiB
XML
<UserControl x:Class="HC_APTBS.Views.UserControls.DfiCalibrationCard"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="260" d:DesignWidth="260">
|
|
|
|
<!-- DataContext = DfiManageViewModel (via {Binding DfiViewModel}) -->
|
|
<UserControl.Resources>
|
|
<BooleanToVisibilityConverter x:Key="BoolToVis"/>
|
|
</UserControl.Resources>
|
|
|
|
<Border Style="{StaticResource PumpCard}">
|
|
<DockPanel LastChildFill="True">
|
|
|
|
<!-- ── Card header ───────────────────────────────────────────── -->
|
|
<DockPanel DockPanel.Dock="Top" Margin="0,0,0,12">
|
|
<ui:SymbolIcon DockPanel.Dock="Left" Symbol="Gauge24" FontSize="16"
|
|
Foreground="{DynamicResource AccentTextFillColorPrimaryBrush}"
|
|
Margin="0,0,8,0" VerticalAlignment="Center"/>
|
|
<TextBlock Text="{DynamicResource Pump.Dfi.Title}"
|
|
Style="{StaticResource PumpCardHeader}" Margin="0"/>
|
|
</DockPanel>
|
|
|
|
<!-- ── Version selector row ──────────────────────────────────── -->
|
|
<Grid DockPanel.Dock="Top" Margin="0,0,0,10">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Grid.Column="0"
|
|
Text="{DynamicResource Pump.Dfi.Version}"
|
|
Style="{StaticResource PumpCommandLabel}"
|
|
VerticalAlignment="Center" Margin="0,0,8,0"/>
|
|
<ComboBox Grid.Column="1"
|
|
SelectedIndex="{Binding VersionIndex}"
|
|
Height="36">
|
|
<ComboBoxItem Content="V1"/>
|
|
<ComboBoxItem Content="V2"/>
|
|
<ComboBoxItem Content="V3"/>
|
|
<ComboBoxItem Content="V4"/>
|
|
</ComboBox>
|
|
<CheckBox Grid.Column="2" HorizontalAlignment="Right"
|
|
IsChecked="{Binding IsAutoMode}"
|
|
Content="{DynamicResource Dfi.Auto}"
|
|
FontSize="12"
|
|
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
|
VerticalAlignment="Center" Margin="8,0,0,0"/>
|
|
</Grid>
|
|
|
|
<!-- ── Current DFI readout ───────────────────────────────────── -->
|
|
<Border DockPanel.Dock="Top"
|
|
Background="{DynamicResource ControlFillColorSecondaryBrush}"
|
|
BorderBrush="{DynamicResource ControlStrokeColorDefaultBrush}"
|
|
BorderThickness="1" CornerRadius="6" Padding="12,8"
|
|
Margin="0,0,0,12">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Text="{DynamicResource Pump.Dfi.Current}"
|
|
FontSize="11"
|
|
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
|
|
VerticalAlignment="Center"/>
|
|
<TextBlock Grid.Column="1"
|
|
Text="{Binding CurrentDfi, StringFormat=F2, Mode=OneWay}"
|
|
FontFamily="Consolas" FontSize="22" FontWeight="SemiBold"
|
|
Foreground="{DynamicResource AccentTextFillColorPrimaryBrush}"
|
|
VerticalAlignment="Center"/>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- ── Busy indicator ─────────────────────────────────────────── -->
|
|
<ProgressBar DockPanel.Dock="Top"
|
|
Value="{Binding ProgressPercent, Mode=OneWay}"
|
|
Minimum="0" Maximum="100" Height="3"
|
|
Margin="0,0,0,6"
|
|
Visibility="{Binding IsBusy, Converter={StaticResource BoolToVis}}"/>
|
|
|
|
<!-- ── DFI slider ─────────────────────────────────────────────── -->
|
|
<Grid DockPanel.Dock="Top" Margin="0,0,0,8" Height="64">
|
|
<Slider Value="{Binding SliderRaw}"
|
|
Minimum="-145" Maximum="145"
|
|
TickFrequency="5" SmallChange="5" LargeChange="5"
|
|
IsSnapToTickEnabled="True" TickPlacement="BottomRight"
|
|
Margin="0,0,0,4" VerticalAlignment="Center"/>
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Grid.Column="0" Text="-1.45"
|
|
HorizontalAlignment="Left" VerticalAlignment="Bottom"
|
|
FontSize="10" Foreground="{DynamicResource TextFillColorTertiaryBrush}"/>
|
|
<TextBlock Grid.Column="1"
|
|
Text="{Binding SliderDfiValue, StringFormat=F2, Mode=OneWay}"
|
|
HorizontalAlignment="Center" VerticalAlignment="Bottom"
|
|
FontFamily="Consolas" FontSize="16" FontWeight="SemiBold"
|
|
Foreground="{DynamicResource AccentTextFillColorPrimaryBrush}"/>
|
|
<TextBlock Grid.Column="2" Text="+1.45"
|
|
HorizontalAlignment="Right" VerticalAlignment="Bottom"
|
|
FontSize="10" Foreground="{DynamicResource TextFillColorTertiaryBrush}"/>
|
|
</Grid>
|
|
</Grid>
|
|
|
|
<!-- ── Read / Write buttons ──────────────────────────────────── -->
|
|
<Grid DockPanel.Dock="Bottom" Margin="0,0,0,0">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="8"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<ui:Button Grid.Column="0" HorizontalAlignment="Stretch"
|
|
Content="{DynamicResource Dfi.Read}"
|
|
Command="{Binding ReadDfiCommand}"
|
|
Appearance="Secondary"
|
|
FontWeight="Bold" Height="32"/>
|
|
<ui:Button Grid.Column="2" HorizontalAlignment="Stretch"
|
|
Content="{DynamicResource Dfi.Write}"
|
|
Command="{Binding WriteDfiCommand}"
|
|
Appearance="Primary"
|
|
FontWeight="Bold" Height="32"/>
|
|
</Grid>
|
|
|
|
</DockPanel>
|
|
</Border>
|
|
</UserControl>
|