feat: host EM observation dashboard

This commit is contained in:
梁薄云
2026-08-06 11:48:46 +08:00
parent 819ff7324b
commit fbd3ba618a
4 changed files with 361 additions and 13 deletions
@@ -24,6 +24,7 @@ internal static class TrajectoryObservationChecks
VerifiesObservationSourceUsesRequiredOperatorText();
VerifiesOperatorDocumentationUsesExactUiEntry();
VerifiesMovementTestVehicleInputsAndSettingsSnapshot();
VerifiesMovementTestKeepsNativePainterLazyAndConditional();
VerifiesPlanningConfigurationDiagnosticUsesEffectiveConfiguration();
RejectsInvalidObservationSettings();
VerifiesStartGoalBoundsUseOnlyConfiguredPadding();
@@ -1025,6 +1026,17 @@ internal static class TrajectoryObservationChecks
}
}
private static void VerifiesMovementTestKeepsNativePainterLazyAndConditional()
{
string movementTestPath = Path.Combine(Directory.GetCurrentDirectory(), "ClumsyPilot",
"ParkrobTrajplanner", "tarjplanner_movementtest", "MovementTest.TrajectoryObservationTest.cs");
string source = new UTF8Encoding(false, true).GetString(File.ReadAllBytes(movementTestPath));
Verification.True(!source.Contains("static readonly TrajectoryObservationPresentation"),
"MovementTest has no static eager Painter presentation");
Verification.True(source.Contains("settings.EnableNativePainterVisualization ? new TrajectoryObservationPresentation() : null"),
"MovementTest creates Painter only under the native visualization flag");
}
private static bool Throws(Action action)
{
try { action(); return false; }