Skip to content

Commit

Permalink
Merge pull request #51 from NilsRo/Development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
NilsRo authored Oct 31, 2022
2 parents 3435d91 + 49fa1bb commit d5612ad
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion octoprint_SlicerEstimator/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def _detect_slicer(self):
return SLICER_SUPERSLICER
elif "Simplify3D" in line:
self._logger.info("Detected Simplify3D")
self._regex = re.compile("; Build time: ([0-9]+) hours? ([0-9]+) minutes")
self._regex = re.compile("; Build time: ([0-9]+) hours? ([0-9]+) minutes?")
return SLICER_SIMPLIFY3D
else:
self._logger.warning("Autoselection of slicer not successful!")
Expand Down
7 changes: 6 additions & 1 deletion octoprint_SlicerEstimator/static/js/SlicerEstimator.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,12 @@ $(function() {
let cnt = 0;
for (const [key, value] of Object.entries(data.slicer_filament_change)) {
cnt += 1;
let changeTimeString = self.filamentChangeTimeFormat(data.slicer_additional["printtime"] - value[1]);
let changeTimeString;
if (value[1] == null) {
changeTimeString = self.filamentChangeTimeFormat(data.slicer_additional["printtime"] * (value[3] / data.size));
} else {
changeTimeString = self.filamentChangeTimeFormat(data.slicer_additional["printtime"] - value[1]);
}
let changeType;
if (value[0] == "M600") {
changeType = gettext("filament change (M600)");
Expand Down
1 change: 0 additions & 1 deletion octoprint_SlicerEstimator/static/less/SlicerEstimator.less
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
// TODO: Put your plugin's LESS here, have it generated to ../css.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
plugin_name = "OctoPrint-SlicerEstimator"

# The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module
plugin_version = "1.5.6"
plugin_version = "1.5.7"

# The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin
# module
Expand Down

0 comments on commit d5612ad

Please sign in to comment.