feat: 修改示波器外观

This commit is contained in:
2025-07-22 02:17:45 +08:00
parent ef267721fd
commit 10e4a82e5b
2 changed files with 65 additions and 106 deletions

View File

@@ -26,7 +26,7 @@ const DEFAULT_CONFIG: OscilloscopeFullConfig = new OscilloscopeFullConfig({
triggerLevel: 128,
triggerRisingEdge: true,
horizontalShift: 0,
decimationRate: 0,
decimationRate: 50,
autoRefreshRAM: false,
});
@@ -137,6 +137,7 @@ const [useProvideOscilloscope, useOscilloscopeState] = createInjectionState(() =
if (refreshIntervalId !== undefined) {
clearInterval(refreshIntervalId);
refreshIntervalId = undefined;
isCapturing.value = false;
}
};
@@ -161,7 +162,6 @@ const [useProvideOscilloscope, useOscilloscopeState] = createInjectionState(() =
isCapturing.value = false;
stopAutoRefresh();
} finally {
isCapturing.value = false;
release();
}
};
@@ -181,6 +181,7 @@ const [useProvideOscilloscope, useOscilloscopeState] = createInjectionState(() =
alert.info("捕获已停止", 2000);
} catch (error) {
alert.error("停止捕获失败", 3000);
isCapturing.value = true;
} finally {
release();
}
@@ -226,7 +227,7 @@ const [useProvideOscilloscope, useOscilloscopeState] = createInjectionState(() =
try {
const ok = await client.refreshRAM();
if (ok) {
alert.success("RAM已刷新", 2000);
// alert.success("RAM已刷新", 2000);
} else {
throw new Error();
}