feat: 添加嵌入式逻辑分析仪

This commit is contained in:
2025-07-16 21:53:49 +08:00
parent 8e19587a16
commit e3b769b24e
10 changed files with 360 additions and 13 deletions

View File

@@ -1,6 +1,6 @@
<template>
<div class="h-full flex flex-col gap-7">
<div class="tabs tabs-box flex-shrink-0 shadow-xl">
<div class="tabs tabs-box flex-shrink-0 shadow-xl mx-5">
<label class="tab">
<input
type="radio"
@@ -42,9 +42,20 @@
:checked="checkID === 4"
@change="handleTabChange"
/>
<Zap class="icon" />
<Binary class="icon" />
逻辑分析仪
</label>
<label class="tab">
<input
type="radio"
name="function-bar"
id="5"
:checked="checkID === 5"
@change="handleTabChange"
/>
<Hand class="icon" />
嵌入式逻辑分析仪
</label>
<!-- 全屏按钮 -->
<button
class="fullscreen-btn ml-auto btn btn-ghost btn-sm"
@@ -67,6 +78,9 @@
<div v-else-if="checkID === 4" class="h-full overflow-y-auto">
<LogicAnalyzerView />
</div>
<div v-else-if="checkID === 5" class="h-full overflow-y-auto">
<Debugger />
</div>
</div>
</div>
</template>
@@ -78,7 +92,8 @@ import {
TerminalIcon,
MaximizeIcon,
MinimizeIcon,
Zap,
Binary,
Hand,
} from "lucide-vue-next";
import { useLocalStorage } from "@vueuse/core";
import VideoStreamView from "@/views/Project/VideoStream.vue";
@@ -86,8 +101,13 @@ import OscilloscopeView from "@/views/Project/Oscilloscope.vue";
import LogicAnalyzerView from "@/views/Project/LogicAnalyzer.vue";
import { isNull, toNumber } from "lodash";
import { onMounted, ref, watch } from "vue";
import { im } from "mathjs";
import Debugger from "./Debugger.vue";
import { useProvideLogicAnalyzer } from "@/components/LogicAnalyzer";
import { useProvideWaveformManager } from "@/components/WaveformDisplay/WaveformManager";
const analyzer = useProvideLogicAnalyzer();
const waveformManager = useProvideWaveformManager();
waveformManager.logicData.value = waveformManager.generateTestData();
const checkID = useLocalStorage("checkID", 1);