Skip to content

Commit b94f488

Browse files
committed
[bug]:fix graph/gauge dynamic enable
1 parent d62d0db commit b94f488

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

src/renderer/src/views/uds/gauge.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,11 @@ function handleCheckChange(
239239
node.enable = checked
240240
}
241241
})
242+
if (checked) {
243+
window.logBus.on(data.id, dataUpdate)
244+
} else {
245+
window.logBus.detach(data.id, dataUpdate)
246+
}
242247
}
243248
244249
const addNode = () => {

src/renderer/src/views/uds/graph.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,11 @@ function handleCheckChange(
236236
node.enable = checked
237237
}
238238
})
239+
if (checked) {
240+
window.logBus.on(data.id, dataUpdate)
241+
} else {
242+
window.logBus.detach(data.id, dataUpdate)
243+
}
239244
}
240245
241246
const addNode = () => {

src/renderer/src/views/uds/lini.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,6 @@ const tableData = computed(() => {
302302
tables.push(t)
303303
i++
304304
}
305-
console.log(foundMasterReq, foundSlaveResp)
306305
if (!foundMasterReq || !foundSlaveResp) {
307306
const bytes = 8
308307
const baseTime = (bytes * 10 + 44) * (1 / db.global.LIN_speed)

0 commit comments

Comments
 (0)