feat: chart grid, pressure tolerance bands, QDelivery RPM normalization, pump page polish

Charts
- Add faint background grid (0.75px, #E0E0E0) to all live charts; matches PDF report style
- Show min/max tolerance bands on P1/P2 pressure charts during test runs (previously only Q-Delivery/Q-Over)
- Broaden BenchService.ToleranceUpdated to fire for every phase receive; UI routes by name
- Clear P1/P2 traces on PhaseChanged alongside Delivery/Over

CAN
- Normalize QDelivery flow rate to 1000 RPM reference before IIR filter so RPM spikes are low-pass filtered with flow-rate transients (matches old_source behavior)

Pump page
- Reorder columns: identification left, commands center, live data right
- PreIn control always visible; disabled when pump lacks pre-injection (rename IsPreInVisible -> IsPreInAvailable)
- Swap value/label order in command cards
- Remove redundant KlineErrors row from identification card

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-04-20 21:42:30 +02:00
parent 69bfda54e1
commit d9775b48be
8 changed files with 80 additions and 39 deletions

View File

@@ -32,12 +32,12 @@
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*" MinWidth="260"/>
<ColumnDefinition Width="1.5*"/>
<ColumnDefinition Width="1*" MinWidth="280"/>
<ColumnDefinition Width="1.5*" />
</Grid.ColumnDefinitions>
<!-- Col 0: Commands (top 2*) + Idling Calibration (bottom 1*) -->
<Grid Grid.Column="0">
<Grid Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition Height="2*"/>
<RowDefinition Height="1*"/>
@@ -48,10 +48,10 @@
</Grid>
<!-- Col 1: Live Data (full height) -->
<uc:PumpLiveDataCard Grid.Column="1"/>
<uc:PumpLiveDataCard Grid.Column="2"/>
<!-- Col 2: Identification (Auto) + DTCs (*) -->
<Grid Grid.Column="2">
<Grid Grid.Column="0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>

View File

@@ -10,8 +10,6 @@
<!-- DataContext = PumpControlViewModel (via {Binding PumpControl}) -->
<UserControl.Resources>
<BooleanToVisibilityConverter x:Key="BoolToVis"/>
<Style x:Key="SettingsTextBox" TargetType="TextBox">
<Setter Property="Width" Value="44"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
@@ -81,15 +79,15 @@
Style="{StaticResource PumpCommandLabel}"
Margin="0,2,0,6"/>
<!-- Parameter name (above current value) -->
<TextBlock Text="{DynamicResource Pump.Commands.Fbkw}"
Style="{StaticResource PumpCommandLabel}"
Margin="0,0,0,2"/>
<!-- Editable value box -->
<TextBox Text="{Binding FbkwValue, UpdateSourceTrigger=PropertyChanged, StringFormat=F2}"
Style="{StaticResource PumpCommandValue}"/>
<!-- Parameter name -->
<TextBlock Text="{DynamicResource Pump.Commands.Fbkw}"
Style="{StaticResource PumpCommandLabel}"
Margin="0,6,0,0"/>
<!-- Settings popup -->
<Popup IsOpen="{Binding IsChecked, ElementName=FbkwToggle}"
StaysOpen="False" Placement="Bottom" AllowsTransparency="True">
@@ -140,12 +138,12 @@
Style="{StaticResource PumpCommandLabel}"
Margin="0,2,0,6"/>
<TextBox Text="{Binding MeValue, UpdateSourceTrigger=PropertyChanged, StringFormat=F2}"
Style="{StaticResource PumpCommandValue}"/>
<TextBlock Text="{DynamicResource Pump.Commands.Me}"
Style="{StaticResource PumpCommandLabel}"
Margin="0,6,0,0"/>
Margin="0,0,0,2"/>
<TextBox Text="{Binding MeValue, UpdateSourceTrigger=PropertyChanged, StringFormat=F2}"
Style="{StaticResource PumpCommandValue}"/>
<Popup IsOpen="{Binding IsChecked, ElementName=MeToggle}"
StaysOpen="False" Placement="Bottom" AllowsTransparency="True">
@@ -168,9 +166,9 @@
</Popup>
</StackPanel>
<!-- ── PreIn (conditional) ─────────────────────────────── -->
<!-- ── PreIn (always visible; disabled when pump lacks pre-injection) ── -->
<StackPanel Grid.Column="2" HorizontalAlignment="Center"
Visibility="{Binding IsPreInVisible, Converter={StaticResource BoolToVis}}">
IsEnabled="{Binding IsPreInAvailable}">
<ToggleButton x:Name="PreInToggle"
Width="28" Height="22"
HorizontalAlignment="Center"
@@ -197,12 +195,12 @@
Style="{StaticResource PumpCommandLabel}"
Margin="0,2,0,6"/>
<TextBox Text="{Binding PreInValue, UpdateSourceTrigger=PropertyChanged, StringFormat=F2}"
Style="{StaticResource PumpCommandValue}"/>
<TextBlock Text="{DynamicResource Pump.Commands.PreIn}"
Style="{StaticResource PumpCommandLabel}"
Margin="0,6,0,0"/>
Margin="0,0,0,2"/>
<TextBox Text="{Binding PreInValue, UpdateSourceTrigger=PropertyChanged, StringFormat=F2}"
Style="{StaticResource PumpCommandValue}"/>
<Popup IsOpen="{Binding IsChecked, ElementName=PreInToggle}"
StaysOpen="False" Placement="Bottom" AllowsTransparency="True">

View File

@@ -122,11 +122,6 @@
<TextBlock Text="{DynamicResource PumpId.Dfi}" Style="{StaticResource IdLabel}"/>
<TextBlock Text="{Binding KlineDfi}" Style="{StaticResource IdValue}"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,2">
<TextBlock Text="{DynamicResource PumpId.Errors}" Style="{StaticResource IdLabel}"/>
<TextBlock Text="{Binding KlineErrors}" Style="{StaticResource IdValue}"
Foreground="{DynamicResource SystemFillColorCriticalBrush}"/>
</StackPanel>
</StackPanel>
</Grid>