fix: 修改示波器后端

This commit is contained in:
alivender
2025-08-18 16:15:08 +08:00
parent 3c52110a2f
commit f548462472
2 changed files with 80 additions and 36 deletions

View File

@@ -118,16 +118,16 @@ public class OscilloscopeApiController : ControllerBase
return StatusCode(StatusCodes.Status500InternalServerError, "设置抽样率失败");
}
// 刷新RAM
if (config.AutoRefreshRAM)
{
var refreshResult = await oscilloscope.RefreshRAM();
if (!refreshResult.IsSuccessful)
{
logger.Error($"刷新RAM失败: {refreshResult.Error}");
return StatusCode(StatusCodes.Status500InternalServerError, "刷新RAM失败");
}
}
// // 刷新RAM
// if (config.AutoRefreshRAM)
// {
// var refreshResult = await oscilloscope.RefreshRAM();
// if (!refreshResult.IsSuccessful)
// {
// logger.Error($"刷新RAM失败: {refreshResult.Error}");
// return StatusCode(StatusCodes.Status500InternalServerError, "刷新RAM失败");
// }
// }
// 设置捕获开关
var captureResult = await oscilloscope.SetCaptureEnable(config.CaptureEnabled);