Skip to content
This repository was archived by the owner on Jan 16, 2022. It is now read-only.

Commit 95c286c

Browse files
committed
Version 3.3-rc3
Bug fix: Simulation times were not correctly updated Bug fix: Layer chart still wasn't fully cleared when a new print started (in standalone mode)
1 parent 0f6ac3f commit 95c286c

File tree

4 files changed

+16
-8
lines changed

4 files changed

+16
-8
lines changed

WHATS_NEW.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Compatible versions:
1313
- RepRapFirmware 2 or newer (1.2x may work but untested)
1414

1515
Changed behaviour:
16+
- Job progress indicator now uses job.rawExtrusion instead of move.extruders[].rawPosition if possible
1617
- Changed caption of Third-Party Plugins to Machine-Specific Plugins
1718

1819
Bug fixes:
@@ -21,6 +22,7 @@ Bug fixes:
2122
- Fixed issue where global variables could be hidden on the OM browser after a reconnect
2223
- Reset prompt after expansion board update was shown even if the mainboard was updated
2324
- Layer chart was not immediately cleared when a new print was started
25+
- Cache for simulated files was not properly cleared
2426

2527
Version 3.3-rc2
2628
==============

src/components/lists/JobFileList.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,6 @@ export default {
274274
} else {
275275
this.$root.$emit(menuItem.action, path);
276276
}
277-
278277
}
279278
},
280279
mounted() {
@@ -288,7 +287,8 @@ export default {
288287
},
289288
lastJobFile(to) {
290289
if (Path.equals(this.directory, Path.extractDirectory(to))) {
291-
this.$refs.filelist.refresh();
290+
// Refresh the filelist after a short moment so DSF can update the simulation time first
291+
setTimeout(this.$refs.filelist.refresh.bind(this), 2000);
292292
}
293293
}
294294
}

src/store/machine/cache.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,17 +116,19 @@ export default function(connector, pluginCacheFields) {
116116
addLastSentCode: (state, code) => state.lastSentCodes.push(code),
117117
removeLastSentCode: (state, code) => state.lastSentCodes = state.lastSentCodes.filter(item => item !== code),
118118

119-
setFileInfo: (state, { filename, fileInfo }) => state.fileInfos[filename] = fileInfo,
119+
setFileInfo(state, { filename, fileInfo }) {
120+
state.fileInfos[filename] = fileInfo;
121+
},
120122
clearFileInfo(state, fileOrDirectory) {
121123
if (fileOrDirectory) {
122124
if (state.fileInfos[fileOrDirectory] !== undefined) {
123125
// Delete specific item
124-
delete state.fileInfos[fileOrDirectory];
126+
Vue.delete(state.fileInfos, fileOrDirectory);
125127
} else {
126128
// Delete directory items
127129
for (let filename in state.fileInfos) {
128130
if (Path.startsWith(filename, fileOrDirectory)) {
129-
delete state.fileInfos[filename];
131+
Vue.delete(state.fileInfos, filename);
130132
}
131133
}
132134
}

src/store/machine/connector/PollConnector.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -970,17 +970,21 @@ export default class PollConnector extends BaseConnector {
970970
}
971971

972972
// Reset the layers when a new print is started
973-
let doUpdate = false;
974973
if (this.lastLayer === -1) {
975974
this.lastLayer = 0;
976975
this.layers = [];
977-
doUpdate = true;
976+
return true;
978977
}
979978

980979
if (this.printFileSize === 0 && jobKey.file) {
981980
this.printFileSize = jobKey.file.size;
982981
}
983982

983+
// Don't continue from here unless the layer number is known
984+
if (jobKey.layer === null) {
985+
return false;
986+
}
987+
984988
const numChangedLayers = Math.abs(jobKey.layer - this.lastLayer);
985989
if (numChangedLayers > 0 && jobKey.layer > 0 && this.lastLayer > 0) {
986990
// Compute average stats per changed layer
@@ -1038,7 +1042,7 @@ export default class PollConnector extends BaseConnector {
10381042
}
10391043

10401044
this.lastLayer = jobKey.layer;
1041-
return doUpdate;
1045+
return false;
10421046
}
10431047

10441048
async doUpdate() {

0 commit comments

Comments
 (0)