Skip to content

Commit

Permalink
Version 3.3-rc3
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
chrishamm committed May 24, 2021
1 parent 0f6ac3f commit 95c286c
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
2 changes: 2 additions & 0 deletions WHATS_NEW.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Compatible versions:
- RepRapFirmware 2 or newer (1.2x may work but untested)

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

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

Version 3.3-rc2
==============
Expand Down
4 changes: 2 additions & 2 deletions src/components/lists/JobFileList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,6 @@ export default {
} else {
this.$root.$emit(menuItem.action, path);
}
}
},
mounted() {
Expand All @@ -288,7 +287,8 @@ export default {
},
lastJobFile(to) {
if (Path.equals(this.directory, Path.extractDirectory(to))) {
this.$refs.filelist.refresh();
// Refresh the filelist after a short moment so DSF can update the simulation time first
setTimeout(this.$refs.filelist.refresh.bind(this), 2000);
}
}
}
Expand Down
8 changes: 5 additions & 3 deletions src/store/machine/cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,17 +116,19 @@ export default function(connector, pluginCacheFields) {
addLastSentCode: (state, code) => state.lastSentCodes.push(code),
removeLastSentCode: (state, code) => state.lastSentCodes = state.lastSentCodes.filter(item => item !== code),

setFileInfo: (state, { filename, fileInfo }) => state.fileInfos[filename] = fileInfo,
setFileInfo(state, { filename, fileInfo }) {
state.fileInfos[filename] = fileInfo;
},
clearFileInfo(state, fileOrDirectory) {
if (fileOrDirectory) {
if (state.fileInfos[fileOrDirectory] !== undefined) {
// Delete specific item
delete state.fileInfos[fileOrDirectory];
Vue.delete(state.fileInfos, fileOrDirectory);
} else {
// Delete directory items
for (let filename in state.fileInfos) {
if (Path.startsWith(filename, fileOrDirectory)) {
delete state.fileInfos[filename];
Vue.delete(state.fileInfos, filename);
}
}
}
Expand Down
10 changes: 7 additions & 3 deletions src/store/machine/connector/PollConnector.js
Original file line number Diff line number Diff line change
Expand Up @@ -970,17 +970,21 @@ export default class PollConnector extends BaseConnector {
}

// Reset the layers when a new print is started
let doUpdate = false;
if (this.lastLayer === -1) {
this.lastLayer = 0;
this.layers = [];
doUpdate = true;
return true;
}

if (this.printFileSize === 0 && jobKey.file) {
this.printFileSize = jobKey.file.size;
}

// Don't continue from here unless the layer number is known
if (jobKey.layer === null) {
return false;
}

const numChangedLayers = Math.abs(jobKey.layer - this.lastLayer);
if (numChangedLayers > 0 && jobKey.layer > 0 && this.lastLayer > 0) {
// Compute average stats per changed layer
Expand Down Expand Up @@ -1038,7 +1042,7 @@ export default class PollConnector extends BaseConnector {
}

this.lastLayer = jobKey.layer;
return doUpdate;
return false;
}

async doUpdate() {
Expand Down

0 comments on commit 95c286c

Please sign in to comment.