feat: redesign Bench page with Fluent card layout and radial advance monitor
Three-column layout replacing the old HMI grid: - BenchRpmCommandCard: inline numeric input, 2×4 preset grid, Start/Stop - BenchActuatorsCard: direction toggle, oil pump, temperature PID, misc relays with FluentStateToggle showing checked state via AccentFillColor - BenchLiveDataCard: 2×5 KPI tiles (RPM, P1, P2, Q-Delivery, Q-Over, temps) - BenchChartsCard: 2×2 compact chart grid (Delivery, Over, P1, P2) - AdvanceMonitorCard: RadialAngleGauge custom FrameworkElement + PSG/INJ readouts, Δ° lock offset input, Zero PSG / Zero INJ buttons Supporting changes: - AngleDisplayViewModel: promote _currentManualDegrees, _isLockSet to [ObservableProperty]; add PsgRelativeDegrees, InjEncoderDegreesValue, TargetLockAngle, IsRunningMode (29/31 hysteresis); computed PrimaryGaugeAngle, TargetAngleForGauge, SecondaryGaugeAngle - BenchControlViewModel: add IsDirectionLeft computed property, SetDirectionRightCommand, SetDirectionLeftCommand, ApplyRpmCommand - FlowmeterChartView: add IsCompact DP (false default) for 90px compact height - Styles.xaml: add IsChecked trigger to FluentStateToggle (accent fill + white text) - Strings.en/es.xaml: add all new card and actuator string keys Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5,62 +5,59 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:uc="clr-namespace:HC_APTBS.Views.UserControls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="900" d:DesignWidth="1280">
|
||||
d:DesignHeight="900" d:DesignWidth="1400">
|
||||
<!--
|
||||
Bench page — HMI-style manual hardware operation.
|
||||
Bench page — Fluent card redesign.
|
||||
DataContext = BenchPageViewModel.
|
||||
Three zones:
|
||||
A. Live readings (LCD panel + encoder angles)
|
||||
B. Live plots (Q flows + pressure traces)
|
||||
C. Controls (drive, temperature, relay bank)
|
||||
Interlock banner spans the page above zone contents when triggered.
|
||||
Row 0: InterlockBannerView (Auto).
|
||||
Row 1: three-column card layout.
|
||||
Col 0 (1* MinWidth=320): BenchRpmCommandCard (Auto) + BenchActuatorsCard (*).
|
||||
Col 1 (1.8* MinWidth=520): BenchLiveDataCard (Auto) + BenchChartsCard (*).
|
||||
Col 2 (1* MinWidth=300): AdvanceMonitorCard (*).
|
||||
-->
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
|
||||
<Grid Margin="6">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/> <!-- interlock banner -->
|
||||
<RowDefinition Height="*"/> <!-- main content -->
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Margin="12">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Interlock banner: hidden unless InterlockBannerViewModel raises a condition -->
|
||||
<uc:InterlockBannerView Grid.Row="0" DataContext="{Binding Interlock}"/>
|
||||
<!-- Interlock banner — hidden unless an interlock condition is active -->
|
||||
<uc:InterlockBannerView Grid.Row="0" DataContext="{Binding Interlock}"
|
||||
Margin="0,0,0,8"/>
|
||||
|
||||
<!-- Main content: 3 columns -->
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="400"/> <!-- Zone A: readings + angles -->
|
||||
<ColumnDefinition Width="*"/> <!-- Zone B: live plots -->
|
||||
<ColumnDefinition Width="210"/> <!-- Zone C: controls -->
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- ── Zone A: readings + encoder angles ──────────────────── -->
|
||||
<StackPanel Grid.Column="0" Margin="0,0,6,0">
|
||||
<uc:BenchReadingsView/>
|
||||
<uc:AngleDisplayView DataContext="{Binding AngleDisplay}"
|
||||
Margin="0,6,0,0"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- ── Zone B: live plots (flows + pressure) ──────────────── -->
|
||||
<StackPanel Grid.Column="1" Margin="0,0,6,0">
|
||||
<uc:FlowmeterChartView DataContext="{Binding FlowmeterChart.Delivery}"/>
|
||||
<uc:FlowmeterChartView DataContext="{Binding FlowmeterChart.Over}"
|
||||
Margin="0,4,0,0"/>
|
||||
<uc:FlowmeterChartView DataContext="{Binding PressureTrace.P1}"
|
||||
Margin="0,4,0,0"/>
|
||||
<uc:FlowmeterChartView DataContext="{Binding PressureTrace.P2}"
|
||||
Margin="0,4,0,0"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- ── Zone C: stacked control panels ─────────────────────── -->
|
||||
<StackPanel Grid.Column="2">
|
||||
<uc:BenchDriveControlView/>
|
||||
<uc:TemperatureControlView DataContext="{Binding TempControl}"
|
||||
Margin="0,10,0,0"/>
|
||||
<uc:RelayBankView DataContext="{Binding RelayBank}"
|
||||
Margin="0,10,0,0"/>
|
||||
</StackPanel>
|
||||
<!-- Three-column body -->
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*" MinWidth="320"/>
|
||||
<ColumnDefinition Width="8"/>
|
||||
<ColumnDefinition Width="1.8*" MinWidth="520"/>
|
||||
<ColumnDefinition Width="8"/>
|
||||
<ColumnDefinition Width="1*" MinWidth="300"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- ── Col 0: RPM command (top) + Actuators (fill) ──────────── -->
|
||||
<Grid Grid.Column="0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<uc:BenchRpmCommandCard Grid.Row="0"/>
|
||||
<uc:BenchActuatorsCard Grid.Row="1" Margin="0,8,0,0"/>
|
||||
</Grid>
|
||||
|
||||
<!-- ── Col 2: Live data (top) + Charts (fill) ───────────────── -->
|
||||
<Grid Grid.Column="2">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<uc:BenchLiveDataCard Grid.Row="0"/>
|
||||
<uc:BenchChartsCard Grid.Row="1" Margin="0,8,0,0"/>
|
||||
</Grid>
|
||||
|
||||
<!-- ── Col 4: Advance monitor (fills column) ────────────────── -->
|
||||
<uc:AdvanceMonitorCard Grid.Column="4"/>
|
||||
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
Reference in New Issue
Block a user