-
-
CH{{ index }}
-
-
+
+
+
+
-
-
-
+
-
-
+
+
+
+
+ 通道
+ 启用/触发
+ 标签
+ 颜色
+ 触发操作
+ 触发值
+
+
+
+
+
+
+
+
+ 通道
+ 启用
+ 标签
+ 颜色
+ 触发操作
+ 触发值
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 通道
+ 启用/触发
+ 标签
+ 颜色
+ 触发操作
+ 触发值
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
- {{ lastApplyResult.message }}
-
diff --git a/src/components/LogicAnalyzer/index.ts b/src/components/LogicAnalyzer/index.ts
index 8efbb07..3242f1c 100644
--- a/src/components/LogicAnalyzer/index.ts
+++ b/src/components/LogicAnalyzer/index.ts
@@ -1,78 +1,5 @@
import LogicalWaveFormDisplay from "./LogicalWaveFormDisplay.vue";
-type LogicDataType = {
- x: number[];
- y: number[][]; // 8 channels of digital data (0 or 1)
- xUnit: "s" | "ms" | "us" | "ns";
- channelNames: string[];
-};
-
-// Test data generator for 8-channel digital signals
-function generateTestLogicData(): LogicDataType {
- const sampleRate = 10000; // 10kHz sampling
- const duration = 1;
- const points = Math.floor(sampleRate * duration);
-
- const x = Array.from({ length: points }, (_, i) => (i / sampleRate) * 1000); // time in ms
-
- // Generate 8 channels with different digital patterns
- const y = [
- // Channel 0: Clock signal 100Hz
- Array.from(
- { length: points },
- (_, i) => Math.floor((100 * i) / sampleRate) % 2,
- ),
- // Channel 1: Clock/2 signal 50Hz
- Array.from(
- { length: points },
- (_, i) => Math.floor((50 * i) / sampleRate) % 2,
- ),
- // Channel 2: Clock/4 signal 25Hz
- Array.from(
- { length: points },
- (_, i) => Math.floor((25 * i) / sampleRate) % 2,
- ),
- // Channel 3: Clock/8 signal 12.5Hz
- Array.from(
- { length: points },
- (_, i) => Math.floor((12.5 * i) / sampleRate) % 2,
- ),
- // Channel 4: Data signal (pseudo-random pattern)
- Array.from(
- { length: points },
- (_, i) => Math.abs( Math.floor(Math.sin(i * 0.01) * 10) % 2 ),
- ),
- // Channel 5: Enable signal (periodic pulse)
- Array.from(
- { length: points },
- (_, i) => (Math.floor(i / 50) % 10) < 3 ? 1 : 0,
- ),
- // Channel 6: Reset signal (occasional pulse)
- Array.from(
- { length: points },
- (_, i) => (Math.floor(i / 200) % 20) === 0 ? 1 : 0,
- ),
- // Channel 7: Status signal (slow changing)
- Array.from(
- { length: points },
- (_, i) => Math.floor(i / 1000) % 2,
- ),
- ];
-
- const channelNames = [
- "CLK",
- "CLK/2",
- "CLK/4",
- "CLK/8",
- "PWM",
- "ENABLE",
- "RESET",
- "STATUS"
- ];
-
- return { x, y, xUnit: "ms", channelNames };
-}
-
-export { LogicalWaveFormDisplay, generateTestLogicData, type LogicDataType };
+export { LogicalWaveFormDisplay };
export { default as TriggerSettings } from './TriggerSettings.vue'
-export { default as ChannelConfig } from './ChannelConfig.vue'
\ No newline at end of file
+export { useProvideLogicAnalyzer , useLogicAnalyzerState } from './LogicAnalyzerManager.ts'
\ No newline at end of file
diff --git a/src/views/Project/LogicAnalyzer.vue b/src/views/Project/LogicAnalyzer.vue
index 28d6b9b..3173cfc 100644
--- a/src/views/Project/LogicAnalyzer.vue
+++ b/src/views/Project/LogicAnalyzer.vue
@@ -1,18 +1,25 @@
-
+
-
-
- 逻辑信号分析
+
+
+
+ 逻辑信号分析
+
+
+
+
-
+
-