Files
HC_APTBS/Views/UserControls/StatusDisplayView.xaml
LucianoDev 4891eb6812 feat: redesign bench calibration (factor/offset), add Ttank/P2 displays, fix sensor calibration
- Replace P1-P6 rational transfer function with factor/offset model for bench params
- Add explicit rx/tx direction flags in bench XML configuration
- Add T.Tank (BenchTemp) and P2 (AnalogSensor2) to temperature/pressure display
- Apply SensorConfiguration calibration to pressure channels, fix empty sensors.xml fallback
- Add live value labels to flowmeter charts
- Hide pump live values and PSG encoder standalone label
- Add K-Line connection state model, improve KWP service and status displays
- Restructure .claude/skills into subdirectory format

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-14 21:25:30 +02:00

60 lines
2.7 KiB
XML

<UserControl x:Class="HC_APTBS.Views.UserControls.StatusDisplayView"
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:conv="clr-namespace:HC_APTBS.Converters"
mc:Ignorable="d"
d:DesignHeight="70" d:DesignWidth="375">
<UserControl.Resources>
<conv:HexColorToBrushConverter x:Key="HexToBrush"/>
</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="28"/>
<RowDefinition/>
</Grid.RowDefinitions>
<!-- Title -->
<TextBlock Text="{Binding Title}"
HorizontalAlignment="Center" VerticalAlignment="Center"
FontSize="14" FontWeight="SemiBold" Foreground="Black"/>
<!-- 16-bit indicator row -->
<ItemsControl Grid.Row="1"
ItemsSource="{Binding Bits}"
Margin="10,0,10,6">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Rows="1"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<!-- Each bit: coloured dot + bit-number label -->
<Grid Margin="1,0">
<Grid.RowDefinitions>
<RowDefinition Height="3*"/>
<RowDefinition Height="2*"/>
</Grid.RowDefinitions>
<Rectangle Fill="{Binding Color, Converter={StaticResource HexToBrush}}"
Stroke="#5D5D5D" StrokeThickness="1"
Width="12" Height="12"
HorizontalAlignment="Center" VerticalAlignment="Center"
ToolTip="{Binding Description}"
ToolTipService.InitialShowDelay="150"
ToolTipService.ShowDuration="30000"
SnapsToDevicePixels="True"/>
<TextBlock Grid.Row="1" FontSize="8"
Text="{Binding Index}"
HorizontalAlignment="Center" VerticalAlignment="Center"
Foreground="DimGray"/>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</Grid>
</UserControl>