💥 feat(planning)!: 拆分 C# ICSP 并默认 Rust
* 新增可选 Flyshot.CSharp.Planning 项目 * 将 icsp 映射到 Rust 后端并拒绝旧 icsp_rust * 补充后端注册、文档、调试页和回归测试 BREAKING CHANGE: method=icsp 现在默认调用 Rust 后端;C# ICSP 改为 method=icsp-csharp,旧 method=icsp_rust 不再作为正式入口。
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Flyshot.Core.Domain;
|
||||
using Flyshot.CSharp.Planning;
|
||||
using Flyshot.Core.Planning;
|
||||
using Flyshot.Native.Planning;
|
||||
|
||||
@@ -19,8 +20,8 @@ public sealed class RustIcspPlannerParityTests
|
||||
PlannedTrajectory managed = new ICspPlanner().Plan(request);
|
||||
PlannedTrajectory native = new RustIcspPlanner().Plan(request);
|
||||
|
||||
Assert.Equal(PlanningMethod.Icsp, managed.Method);
|
||||
Assert.Equal(PlanningMethod.IcspRust, native.Method);
|
||||
Assert.Equal(PlanningMethod.IcspCSharp, managed.Method);
|
||||
Assert.Equal(PlanningMethod.Icsp, native.Method);
|
||||
AssertTrajectoryMatches(managed, native, tolerance: 1e-9);
|
||||
}
|
||||
|
||||
@@ -35,8 +36,8 @@ public sealed class RustIcspPlannerParityTests
|
||||
PlannedTrajectory managed = new ICspPlanner(enforceFinalScale: false).Plan(request);
|
||||
PlannedTrajectory native = new RustIcspPlanner(options).Plan(request);
|
||||
|
||||
Assert.Equal(PlanningMethod.Icsp, managed.Method);
|
||||
Assert.Equal(PlanningMethod.IcspRust, native.Method);
|
||||
Assert.Equal(PlanningMethod.IcspCSharp, managed.Method);
|
||||
Assert.Equal(PlanningMethod.Icsp, native.Method);
|
||||
AssertTrajectoryMatches(managed, native, tolerance: 1e-9);
|
||||
}
|
||||
|
||||
@@ -116,7 +117,7 @@ public sealed class RustIcspPlannerParityTests
|
||||
.Select(_ => new IoAddressGroup([]))
|
||||
.ToArray());
|
||||
|
||||
return new TrajectoryRequest(robot, program, PlanningMethod.Icsp);
|
||||
return new TrajectoryRequest(robot, program, PlanningMethod.IcspCSharp);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user