feat(uart) clear RX/TX byte count on click
This commit is contained in:
parent
8a84b215a7
commit
d534fd4ec8
|
@ -442,6 +442,16 @@ export const useDataViewerStore = defineStore('text-viewer', () => {
|
||||||
let RxByteCountLocal = 0;
|
let RxByteCountLocal = 0;
|
||||||
let RxTotalByteCountLocal = 0;
|
let RxTotalByteCountLocal = 0;
|
||||||
|
|
||||||
|
function clearRxCounter() {
|
||||||
|
RxByteCountLocal = 0;
|
||||||
|
RxTotalByteCountLocal = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
function clearTxCounter() {
|
||||||
|
TxByteCountLocal = 0;
|
||||||
|
TxTotalByteCountLocal = 0;
|
||||||
|
}
|
||||||
|
|
||||||
const enableFilter = ref(true);
|
const enableFilter = ref(true);
|
||||||
const forceToBottom = ref(true);
|
const forceToBottom = ref(true);
|
||||||
const filterChanged = ref(false);
|
const filterChanged = ref(false);
|
||||||
|
@ -745,6 +755,8 @@ export const useDataViewerStore = defineStore('text-viewer', () => {
|
||||||
RxTotalByteCount,
|
RxTotalByteCount,
|
||||||
TxByteCount,
|
TxByteCount,
|
||||||
TxTotalByteCount,
|
TxTotalByteCount,
|
||||||
|
clearRxCounter,
|
||||||
|
clearTxCounter,
|
||||||
forceToBottom,
|
forceToBottom,
|
||||||
filterChanged,
|
filterChanged,
|
||||||
|
|
||||||
|
|
|
@ -207,12 +207,12 @@
|
||||||
</el-link>
|
</el-link>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex gap-2">
|
<div class="flex gap-2">
|
||||||
<el-link>
|
<el-link @click="store.clearTxCounter()">
|
||||||
<el-tag class="font-mono font-bold" size="small">
|
<el-tag class="font-mono font-bold" size="small">
|
||||||
{{ `TX(B):${store.TxByteCount}/ ${store.TxTotalByteCount}` }}
|
{{ `TX(B):${store.TxByteCount}/ ${store.TxTotalByteCount}` }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</el-link>
|
</el-link>
|
||||||
<el-link type="success">
|
<el-link type="success" @click="store.clearRxCounter()">
|
||||||
<el-tag class="font-mono font-bold" size="small" type="success">
|
<el-tag class="font-mono font-bold" size="small" type="success">
|
||||||
{{ `RX(B):${store.RxByteCount}/ ${store.RxTotalByteCount}` }}
|
{{ `RX(B):${store.RxByteCount}/ ${store.RxTotalByteCount}` }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
|
|
Loading…
Reference in New Issue