Skip to content

Commit

Permalink
fix: fix typo issues with save zoffset for probes (#1821)
Browse files Browse the repository at this point in the history
  • Loading branch information
meteyou committed Mar 21, 2024
1 parent d14eee6 commit c859440
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/mixins/zoffset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,15 @@ export default class ZoffsetMixin extends Vue {
get endstop_pin() {
const stepperConfig = this.settings[this.stepper_name] ?? {}

return stepperConfig?.endstop_pin
return stepperConfig?.endstop_pin.trim()
}

get zOffset(): number {
return this.$store.state.printer?.gcode_move?.homing_origin[2].toFixed(3)
}
get isEndstopProbe() {
return this.endstop_pin.search('probe:z_virtual_endstop') !== -1
// remove spaces and search for probe:z_virtual_endstop
return this.endstop_pin.replaceAll(' ', '').search('probe:z_virtual_endstop') !== -1
}

get existZOffsetApplyProbe() {
Expand Down

0 comments on commit c859440

Please sign in to comment.