提交位移台和对焦系统代码

This commit is contained in:
ldh
2026-11-18 08:55:40 +08:00
parent 19b7b10e97
commit c5908eff03
21 changed files with 2083 additions and 0 deletions
+11
View File
@@ -1,3 +1,5 @@
using HardwareControl.Core.AxisPlatform;
using HardwareControl.Core.FocusSystem;
using HardwareControl.Core.HardwareServiceImpl;
using HardwareControl.Core.HardwareServiceImpl.HardwareService;
using HardwareControl.Core.SampleAnalysis;
@@ -56,6 +58,15 @@ builder.Services.AddSingleton<BackgroundDiffSegmenter>();
builder.Services.AddSingleton<TargetOutlineAnalyzer>();
builder.Services.AddSingleton<ISampleAnalysisService, SampleAnalysisService>();
// 9. 位移台:串口优先取系统参数 translation_com,未配置时回退到 appsettings 的 AxisStage:ComPort
builder.Services.Configure<AxisStageOptions>(
builder.Configuration.GetSection(AxisStageOptions.SectionName));
builder.Services.AddSingleton<IAxisStageService, AxisStageService>();
// 10. 对焦系统:串口优先取系统参数 focus_com,未配置时回退到 appsettings 的 FocusSystem:ComPort
builder.Services.Configure<FocusSystemOptions>(
builder.Configuration.GetSection(FocusSystemOptions.SectionName));
builder.Services.AddSingleton<IFocusSystemService, FocusSystemService>();
builder.Services.AddControllers();
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
+14
View File
@@ -26,6 +26,20 @@
"Gain": null,
"SdkLogEnabled": false
},
"AxisStage": {
"ComPort": null,
"FrameHead": "Desktop2D",
"DefaultSpeed": 50,
"DefaultAccel": 10,
"ReadTimeoutMs": 1000,
"ReadRetryIntervalMs": 50
},
"FocusSystem": {
"ComPort": null,
"DefaultCalibrationSpeed": 50,
"ReadTimeoutMs": 1000,
"ReadRetryIntervalMs": 100
},
"CameraStream": {
"Enabled": true,
"FramesPerSecond": 15,