Set tracking position to 0 when starting tracking.
This commit is contained in:
1 parent
e896590eb0
commit
c27857d1bb
1 file changed
+4
-1
@@ -314,10 +314,13 @@ export default class Viewer extends Mixins(BaseMixin) {
|
||||
trackingBackup = newVal;
|
||||
if (!viewer) return;
|
||||
if (newVal) {
|
||||
viewer.gcodeProcessor.setLiveTracking(true);
|
||||
|
||||
this.loadedFile = this.sdCardFilePath;
|
||||
let fileToLoad = this.sdCardFilePath.replace('/home/pi/gcode_files/', '');
|
||||
await this.loadFile(this.apiUrl + '/server/files/gcodes/' + encodeURI(fileToLoad));
|
||||
viewer.gcodeProcessor.setLiveTracking(true);
|
||||
viewer.gcodeProcessor.updateFilePosition(0);
|
||||
|
||||
} else {
|
||||
viewer.gcodeProcessor.setLiveTracking(false);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user