2 Commits

Author SHA1 Message Date
69bfda54e1 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>
2026-04-20 17:45:59 +02:00
e343006f45 feat: restore bench section UI with controls, PID RPM ramp, flowmeter charts, and fix CAN IDs
Restore the full bench control panel from the old source with MVVM architecture:

- Two-column left panel layout: bench info displays (RPM with target/voltage,
  temps, pressures, Q-flow, pump live values) and user commands (direction
  toggle, start/stop with RPM popup and quick-select buttons, oil pump toggle,
  turn downcounter with CAN send)
- PID RPM ramp controller (BenchPidController) with bumpless startup,
  anti-windup, and derivative-on-measurement for smooth motor speed transitions
- Real-time flowmeter charts (LiveChartsCore) for Q-Delivery and Q-Over
  with tolerance band overlays
- Bench/pump CAN liveness detection in PcanAdapter (receive-only IDs)
- K-Line connection status indicator (placeholder)
- Periodic relay bitmask sender (~21ms) and ElectronicMsg keepalive start
  on CAN connect, pump sender starts immediately on pump load

Fix critical CAN message ID bug: default bench XML values were incorrectly
converted from old source (decimal-notation hex parsed as actual hex digits,
e.g. "10" -> "A" instead of keeping "10" which parses as 0x10). Corrected
all IDs to match hardware: 0x10, 0x11, 0x13, 0x14, 0x15, 0x50, 0x51, 0x55.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 14:24:59 +02:00