import type { Metrics, PidState, SystemStatus } from '../domain/types'; interface PidPanelProps { pid: PidState; metrics: Metrics; status: SystemStatus; } export default function PidPanel({ pid, status }: PidPanelProps) { const fill = Math.min((pid.actualSpeedMps / Math.max(pid.targetSpeedMps, 0.01)) * 100, 100); return (

Conveyor control loop

PID imitation

targetSpeedMps {pid.targetSpeedMps.toFixed(2)}
actualSpeedMps {pid.actualSpeedMps.toFixed(2)}
pidError {pid.pidError.toFixed(2)}
correction {pid.correction.toFixed(2)}

Status {status}: actual speed follows target during flow and decays to zero on jam/emergency.

); }