diff --git a/src/components/mixins/control.ts b/src/components/mixins/control.ts index 5c9527428..4d1a62417 100644 --- a/src/components/mixins/control.ts +++ b/src/components/mixins/control.ts @@ -55,7 +55,16 @@ export default class ControlMixin extends Vue { } get colorZTilt() { - const status = this.$store.state.printer.z_tilt?.applied ?? true + let status = true + + // normal Klipper z_tilt + if ('z_tilt' in this.$store.state.printer) { + status = this.$store.state.printer.z_tilt?.applied + } + // check Kalico next gen z_tilt + else if ('z_tilt_ng' in this.$store.state.printer) { + status = this.$store.state.printer.z_tilt_ng?.applied + } return status ? 'primary' : 'warning' } diff --git a/src/store/printer/getters.ts b/src/store/printer/getters.ts index ce9b15fa9..e5c800a24 100644 --- a/src/store/printer/getters.ts +++ b/src/store/printer/getters.ts @@ -780,9 +780,9 @@ export const getters: GetterTree = { }, existsZtilt: (state) => { - if (!state.configfile?.settings) return false + if (!state.gcode) return false - return 'z_tilt' in state.configfile.settings + return 'Z_TILT_ADJUST' in state.gcode.commands }, existsBedTilt: (state) => {