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>
126 lines
7.5 KiB
XML
126 lines
7.5 KiB
XML
<UserControl x:Class="HC_APTBS.Views.UserControls.AdvanceMonitorCard"
|
|
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"
|
|
xmlns:ctrl="clr-namespace:HC_APTBS.Views.Controls"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="560" d:DesignWidth="320">
|
|
<!--
|
|
Advance Monitor card — radial angle gauge, PSG/INJ readouts,
|
|
Δ° offset input, Zero PSG / Zero INJ buttons.
|
|
DataContext = BenchPageViewModel; all bindings go through AngleDisplay.*.
|
|
-->
|
|
<Border Style="{StaticResource PumpCard}">
|
|
<DockPanel LastChildFill="True">
|
|
|
|
<!-- ── Card header ─────────────────────────────────────────── -->
|
|
<DockPanel DockPanel.Dock="Top" Margin="0,0,0,10">
|
|
<ui:SymbolIcon DockPanel.Dock="Left" Symbol="CompassNorthwest24" FontSize="16"
|
|
Foreground="{DynamicResource AccentTextFillColorPrimaryBrush}"
|
|
Margin="0,0,8,0" VerticalAlignment="Center"/>
|
|
<TextBlock Text="{DynamicResource Bench.Advance.Title}"
|
|
Style="{StaticResource PumpCardHeader}" Margin="0"/>
|
|
</DockPanel>
|
|
|
|
<!-- ── Zero buttons (docked bottom first) ─────────────────── -->
|
|
<UniformGrid DockPanel.Dock="Bottom" Rows="1" Columns="2" Margin="0,10,0,0">
|
|
<ui:Button Margin="0,0,4,0" Height="40" HorizontalAlignment="Stretch"
|
|
Content="{DynamicResource Bench.Advance.ZeroPsg}"
|
|
Command="{Binding AngleDisplay.SetPsgZeroCommand}"
|
|
Appearance="Secondary"/>
|
|
<ui:Button Margin="4,0,0,0" Height="40" HorizontalAlignment="Stretch"
|
|
Content="{DynamicResource Bench.Advance.ZeroInj}"
|
|
Command="{Binding AngleDisplay.SetInjZeroCommand}"
|
|
Appearance="Secondary"/>
|
|
</UniformGrid>
|
|
|
|
<!-- ── Δ° offset row (docked bottom) ──────────────────────── -->
|
|
<Grid DockPanel.Dock="Bottom" Margin="0,10,0,0">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="8"/>
|
|
<ColumnDefinition Width="90"/>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Grid.Column="0" Text="{DynamicResource Bench.Advance.Delta}"
|
|
FontSize="13" FontWeight="SemiBold"
|
|
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
|
|
VerticalAlignment="Center" Margin="0,0,8,0"/>
|
|
<TextBox Grid.Column="1"
|
|
Text="{Binding AngleDisplay.LockAngleDeltaInput,
|
|
UpdateSourceTrigger=PropertyChanged}"
|
|
FontFamily="Consolas" FontSize="16" FontWeight="SemiBold"
|
|
Height="36" VerticalContentAlignment="Center"
|
|
HorizontalContentAlignment="Right" Padding="8,0"/>
|
|
<Border Grid.Column="3"
|
|
Background="{DynamicResource ControlFillColorSecondaryBrush}"
|
|
BorderBrush="{DynamicResource ControlStrokeColorDefaultBrush}"
|
|
BorderThickness="1" CornerRadius="6" Padding="8,4">
|
|
<TextBlock Text="{Binding AngleDisplay.LockAngleDisplay}"
|
|
Foreground="{Binding AngleDisplay.LockAngleForeground}"
|
|
FontFamily="Consolas" FontSize="16" FontWeight="SemiBold"
|
|
VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
|
</Border>
|
|
</Grid>
|
|
|
|
<!-- ── PSG / INJ mini readouts (docked bottom) ────────────── -->
|
|
<UniformGrid DockPanel.Dock="Bottom" Rows="1" Columns="2" Margin="0,10,0,0">
|
|
|
|
<!-- PSG -->
|
|
<Border Margin="0,0,4,0"
|
|
Background="{DynamicResource ControlFillColorSecondaryBrush}"
|
|
BorderBrush="{DynamicResource ControlStrokeColorDefaultBrush}"
|
|
BorderThickness="1" CornerRadius="6" Padding="10,8">
|
|
<StackPanel>
|
|
<TextBlock Text="PSG" FontSize="10" FontWeight="SemiBold"
|
|
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
|
|
Margin="0,0,0,2"/>
|
|
<TextBlock Text="{Binding AngleDisplay.PsgRelativeAngle}"
|
|
Foreground="{Binding AngleDisplay.PsgAngleForeground}"
|
|
FontFamily="Consolas" FontSize="20" FontWeight="SemiBold"/>
|
|
<TextBlock Text="{Binding AngleDisplay.PsgEncoderAngle}"
|
|
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
|
|
FontFamily="Consolas" FontSize="11"
|
|
Margin="0,2,0,0"/>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<!-- INJ -->
|
|
<Border Margin="4,0,0,0"
|
|
Background="{DynamicResource ControlFillColorSecondaryBrush}"
|
|
BorderBrush="{DynamicResource ControlStrokeColorDefaultBrush}"
|
|
BorderThickness="1" CornerRadius="6" Padding="10,8">
|
|
<StackPanel>
|
|
<TextBlock Text="INJ" FontSize="10" FontWeight="SemiBold"
|
|
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
|
|
Margin="0,0,0,2"/>
|
|
<TextBlock Text="{Binding AngleDisplay.InjRelativeAngle}"
|
|
Foreground="{Binding AngleDisplay.InjAngleForeground}"
|
|
FontFamily="Consolas" FontSize="20" FontWeight="SemiBold"/>
|
|
<TextBlock Text="{Binding AngleDisplay.InjEncoderAngle}"
|
|
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
|
|
FontFamily="Consolas" FontSize="11"
|
|
Margin="0,2,0,0"/>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
</UniformGrid>
|
|
|
|
<!-- ── Radial gauge (fills remaining space) ────────────────── -->
|
|
<ctrl:RadialAngleGauge
|
|
HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Stretch"
|
|
MinHeight="200"
|
|
PrimaryAngle="{Binding AngleDisplay.PrimaryGaugeAngle}"
|
|
TargetAngle="{Binding AngleDisplay.TargetAngleForGauge}"
|
|
SecondaryAngle="{Binding AngleDisplay.SecondaryGaugeAngle}"
|
|
PrimaryBrush="{Binding AngleDisplay.PsgAngleForeground}"
|
|
TargetBrush="{Binding AngleDisplay.LockAngleForeground}"
|
|
IsRunningMode="{Binding AngleDisplay.IsRunningMode}"/>
|
|
|
|
</DockPanel>
|
|
</Border>
|
|
</UserControl>
|