fix: fix some issues with unreadable values in the control panel (#817)
This commit is contained in:
@@ -7,10 +7,6 @@ export default class ControlMixin extends Vue {
|
||||
return this.$store.state.printer?.gcode_move?.absolute_coordinates ?? true
|
||||
}
|
||||
|
||||
get homedAxes(): string {
|
||||
return this.$store.state.printer?.toolhead?.homed_axes ?? ''
|
||||
}
|
||||
|
||||
get enableXYHoming(): boolean {
|
||||
return this.$store.state.gui.control.enableXYHoming
|
||||
}
|
||||
@@ -63,6 +59,26 @@ export default class ControlMixin extends Vue {
|
||||
return this.$store.getters['gui/getDefaultControlActionButton']
|
||||
}
|
||||
|
||||
/**
|
||||
* Axes home states
|
||||
*/
|
||||
|
||||
get homedAxes(): string {
|
||||
return this.$store.state.printer?.toolhead?.homed_axes ?? ''
|
||||
}
|
||||
|
||||
get xAxisHomed(): boolean {
|
||||
return this.homedAxes.includes('x')
|
||||
}
|
||||
|
||||
get yAxisHomed(): boolean {
|
||||
return this.homedAxes.includes('y')
|
||||
}
|
||||
|
||||
get zAxisHomed(): boolean {
|
||||
return this.homedAxes.includes('z')
|
||||
}
|
||||
|
||||
doHome() {
|
||||
this.$store.dispatch('server/addEvent', { message: 'G28', type: 'command' })
|
||||
this.$socket.emit('printer.gcode.script', { script: 'G28' }, { loading: 'homeAll' })
|
||||
|
@@ -417,20 +417,5 @@ export default class CrossControl extends Mixins(BaseMixin, ControlMixin) {
|
||||
get stepsReversed() {
|
||||
return Array.from(new Set([...(this.stepsAll ?? [])])).sort((a, b) => a - b)
|
||||
}
|
||||
|
||||
/**
|
||||
* Axes home states
|
||||
*/
|
||||
get xAxisHomed(): boolean {
|
||||
return this.$store.state.printer.toolhead?.homed_axes.includes('x') ?? false
|
||||
}
|
||||
|
||||
get yAxisHomed(): boolean {
|
||||
return this.$store.state.printer.toolhead?.homed_axes.includes('y') ?? false
|
||||
}
|
||||
|
||||
get zAxisHomed(): boolean {
|
||||
return this.$store.state.printer.toolhead?.homed_axes.includes('z') ?? false
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@@ -97,21 +97,6 @@ export default class MoveToControl extends Mixins(BaseMixin, ControlMixin) {
|
||||
this.input.z.pos = newVal
|
||||
}
|
||||
|
||||
/**
|
||||
* Axes home states
|
||||
*/
|
||||
get xAxisHomed(): boolean {
|
||||
return this.$store.state.printer.toolhead?.homed_axes.includes('x') ?? false
|
||||
}
|
||||
|
||||
get yAxisHomed(): boolean {
|
||||
return this.$store.state.printer.toolhead?.homed_axes.includes('y') ?? false
|
||||
}
|
||||
|
||||
get zAxisHomed(): boolean {
|
||||
return this.$store.state.printer.toolhead?.homed_axes.includes('z') ?? false
|
||||
}
|
||||
|
||||
/**
|
||||
* Axis limits
|
||||
*/
|
||||
|
Reference in New Issue
Block a user