fix: add gcode offset to live position in gcodeviewer (#1341)
This commit is contained in:
parent
c598d6260d
commit
ab777d5e04
@ -436,10 +436,23 @@ export default class Viewer extends Mixins(BaseMixin) {
|
|||||||
return this.$store.state.printer.print_stats?.filename ?? ''
|
return this.$store.state.printer.print_stats?.filename ?? ''
|
||||||
}
|
}
|
||||||
|
|
||||||
get currentPosition() {
|
get livePosition() {
|
||||||
return this.$store.state.printer.motion_report?.live_position ?? [0, 0, 0, 0]
|
return this.$store.state.printer.motion_report?.live_position ?? [0, 0, 0, 0]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get gcodeOffset() {
|
||||||
|
return this.$store.state.printer?.gcode_move?.homing_origin ?? [0, 0, 0]
|
||||||
|
}
|
||||||
|
|
||||||
|
get currentPosition() {
|
||||||
|
return [
|
||||||
|
this.livePosition[0] - this.gcodeOffset[0],
|
||||||
|
this.livePosition[1] - this.gcodeOffset[1],
|
||||||
|
this.livePosition[2] - this.gcodeOffset[2],
|
||||||
|
this.livePosition[3],
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
get showTrackingButton() {
|
get showTrackingButton() {
|
||||||
return this.printerIsPrinting && this.sdCardFilePath === this.loadedFile
|
return this.printerIsPrinting && this.sdCardFilePath === this.loadedFile
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user