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);

View File

@@ -0,0 +1,11 @@
<template>
<div>
<div class="card">
<WaveformDisplay />
</div>
</div>
</template>
<script setup lang="ts">
import WaveformDisplay from '@/components/WaveformDisplay/WaveformDisplay.vue';
</script>

View File

@@ -78,7 +78,7 @@
id="splitter-group-v-panel-bar"
:default-size="isBottomBarFullscreen ? 100 : (100 - verticalSplitterSize)"
:min-size="isBottomBarFullscreen ? 100 : 15"
class="w-full overflow-hidden px-5 pt-3"
class="w-full overflow-hidden pt-3"
>
<BottomBar
:isFullscreen="isBottomBarFullscreen"

View File

@@ -1,7 +1,7 @@
<template>
<div class="bg-base-100 flex flex-col gap-10 mb-5">
<!-- 逻辑信号展示 -->
<div class="card bg-base-200 shadow-xl">
<div class="card bg-base-200 shadow-xl mx-5">
<div class="card-body">
<h2 class="card-title flex justify-between items-center">
<div class="flex items-center gap-2">
@@ -19,7 +19,7 @@
</div>
<!-- 触发设置 -->
<div class="card bg-base-200 shadow-xl">
<div class="card bg-base-200 shadow-xl mx-5">
<div class="card-body">
<h2 class="card-title">
<Settings class="w-5 h-5" />

View File

@@ -1,7 +1,7 @@
<template>
<div class="bg-base-100 flex flex-col">
<!-- 波形展示 -->
<div class="card bg-base-200 shadow-xl">
<div class="card bg-base-200 shadow-xl mx-5">
<div class="card-body">
<h2 class="card-title">
<Activity class="w-5 h-5" />

View File

@@ -1,7 +1,7 @@
<template>
<div class="bg-base-100 flex flex-col gap-7">
<!-- 控制面板 -->
<div class="card bg-base-200 shadow-xl">
<div class="card bg-base-200 shadow-xl mx-5">
<div class="card-body">
<h2 class="card-title text-primary">
<Settings class="w-6 h-6" />
@@ -153,7 +153,7 @@
</div>
<!-- 视频预览区域 -->
<div class="card bg-base-200 shadow-xl">
<div class="card bg-base-200 shadow-xl mx-5">
<div class="card-body">
<h2 class="card-title text-primary">
<Video class="w-6 h-6" />
@@ -299,7 +299,7 @@
</div>
<!-- 日志区域 -->
<div class="card bg-base-200 shadow-xl">
<div class="card bg-base-200 shadow-xl mx-5">
<div class="card-body">
<h2 class="card-title text-primary">
<FileText class="w-6 h-6" />