From 8b8970705278f37bec3ad91d905fd05a2c87d526 Mon Sep 17 00:00:00 2001 From: Zeanon Date: Sun, 22 Dec 2024 19:11:58 +0100 Subject: [PATCH] . --- package.json | 2 +- .../Temperature/TemperaturePanelList.vue | 13 +++++++ src/components/ui/TopCornerMenuService.vue | 35 ++++++++++++++++--- 3 files changed, 45 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index ff83d0e77..3d5eb7eb9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mainsail", - "version": "2.13.4", + "version": "2.13.3", "private": true, "decription": "a klipper web interface", "author": { diff --git a/src/components/panels/Temperature/TemperaturePanelList.vue b/src/components/panels/Temperature/TemperaturePanelList.vue index 8bab6117b..2aa3030a8 100644 --- a/src/components/panels/Temperature/TemperaturePanelList.vue +++ b/src/components/panels/Temperature/TemperaturePanelList.vue @@ -136,6 +136,8 @@ export default class TemperaturePanelList extends Mixins(BaseMixin) { // hide MCU & Host sensors, if the function is enabled if (this.hideMcuHostSensors && this.checkMcuHostSensor(fullName)) return false + if (this.mcuSensorDisconnected(fullName)) return false + return !this.mpcBlockTemperatures.includes(fullName) && !this.mpcAmbientTemperatures.includes(fullName) }) @@ -160,6 +162,17 @@ export default class TemperaturePanelList extends Mixins(BaseMixin) { return ['temperature_mcu', 'temperature_host'].includes(sensor_type) } + mcuSensorDisconnected(fullName: string) { + const settingsObject = this.settings[fullName.toLowerCase()] ?? {} + const sensor_type = settingsObject.sensor_type ?? '' + + if (sensor_type != "temperature_mcu") return false + if (!(("mcu " + settingsObject.sensor_mcu) in this.$store.state.printer)) return false + + const mcu = this.$store.state.printer["mcu " + settingsObject.sensor_mcu] + return mcu.non_critical_disconnected ?? false + } + filterNamesAndSort(fullNames: string[]) { return fullNames.filter(this.isVisibleName).sort(this.sortObjectName) } diff --git a/src/components/ui/TopCornerMenuService.vue b/src/components/ui/TopCornerMenuService.vue index e87dcc78a..9af5eb81a 100644 --- a/src/components/ui/TopCornerMenuService.vue +++ b/src/components/ui/TopCornerMenuService.vue @@ -19,6 +19,14 @@ {{ mdiStop }} +