feat: 移除电源控制按钮,在jtag操作时自动开启

This commit is contained in:
alivender
2025-07-31 13:20:45 +08:00
parent d7c02ee6c9
commit 0cc35ce541
4 changed files with 16 additions and 15 deletions

View File

@@ -41,16 +41,12 @@
</div>
<div class="divider"></div>
<h1 class="font-bold text-center text-2xl">外设</h1>
<div class="flex flex-row justify-around">
<div class="flex flex-row justify-center">
<div class="flex flex-row">
<input type="checkbox" class="checkbox" :checked="eqps.enableMatrixKey"
@change="handleMatrixkeyCheckboxChange" />
<p class="mx-2">启用矩阵键盘</p>
</div>
<div class="flex flex-row">
<input type="checkbox" class="checkbox" :checked="eqps.enablePower" @change="handlePowerCheckboxChange" />
<p class="mx-2">启用电源</p>
</div>
</div>
</div>
</template>
@@ -120,16 +116,6 @@ async function handleMatrixkeyCheckboxChange(event: Event) {
}
}
async function handlePowerCheckboxChange(event: Event) {
const target = event.target as HTMLInputElement;
const ret = await eqps.powerSetOnOff(target.checked);
if (target.checked) {
eqps.enablePower = ret;
} else {
eqps.enablePower = !ret;
}
}
async function toggleJtagBoundaryScan() {
eqps.enableJtagBoundaryScan = !eqps.enableJtagBoundaryScan;
}