Skip to content

Commit

Permalink
fix: fix typo issues with save zoffset for probes
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Dej <meteyou@gmail.com>
  • Loading branch information
meteyou committed Mar 17, 2024
1 parent 972266d commit f80ce91
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
// this is to check all kinds of writings
return this.endstop_pin.startsWith('probe:') && this.endstop_pin.endsWith('z_virtual_endstop')
}

get existZOffsetApplyProbe() {
Expand Down

0 comments on commit f80ce91

Please sign in to comment.