From 46fb0970141a455c1b5a76a8a1c92b3226704a89 Mon Sep 17 00:00:00 2001 From: daid Date: Wed, 18 Dec 2013 14:20:00 +0100 Subject: [PATCH] Fix bug in UM2 firmware where the abort print did not home the head. Added option to open the save location after saving an GCode file. --- Cura/gui/newVersionDialog.py | 1 + Cura/gui/sceneView.py | 11 ++++++++++- Cura/gui/util/openglGui.py | 14 ++++++++------ Cura/resources/firmware/MarlinUltimaker2.hex | 12 ++++++------ changelog | 1 + 5 files changed, 26 insertions(+), 13 deletions(-) diff --git a/Cura/gui/newVersionDialog.py b/Cura/gui/newVersionDialog.py index 52aeefa7..0301088f 100644 --- a/Cura/gui/newVersionDialog.py +++ b/Cura/gui/newVersionDialog.py @@ -51,6 +51,7 @@ class newVersionDialog(wx.Dialog): s.Add(wx.StaticLine(p), flag=wx.EXPAND|wx.TOP|wx.BOTTOM, border=10) s.Add(wx.StaticText(p, -1, 'New firmware for your Ultimaker2:')) s.Add(wx.StaticText(p, -1, '* Fixed bug in acceleration planning causing slow moves on rare occasions.')) + s.Add(wx.StaticText(p, -1, '* Fixed the problem where aborting a print did not always home the head.')) s.Add(wx.StaticText(p, -1, '* Disabled normal LCD menu curing USB printing.')) button = wx.Button(p, -1, 'Install now') self.Bind(wx.EVT_BUTTON, self.OnUltimaker2Firmware, button) diff --git a/Cura/gui/sceneView.py b/Cura/gui/sceneView.py index c7ad9c85..49c4ccc5 100644 --- a/Cura/gui/sceneView.py +++ b/Cura/gui/sceneView.py @@ -25,6 +25,7 @@ from Cura.util import sliceEngine from Cura.util import machineCom from Cura.util import removableStorage from Cura.util import gcodeInterpreter +from Cura.util import explorer from Cura.util.printerConnection import printerConnectionManager from Cura.gui.util import previewTools from Cura.gui.util import opengl @@ -306,13 +307,21 @@ class SceneView(openglGui.glGuiPanel): self.notification.message("Failed to save") else: if allowEject: - self.notification.message("Saved as %s" % (fileB), lambda : self.notification.message('You can now eject the card.') if removableStorage.ejectDrive(allowEject) else self.notification.message('Safe remove failed...')) + self.notification.message("Saved as %s" % (fileB), lambda : self._doEjectSD(allowEject), 31, 'Eject') + elif explorer.hasExplorer(): + self.notification.message("Saved as %s" % (fileB), lambda : explorer.openExplorer(fileB), 4, 'Open folder') else: self.notification.message("Saved as %s" % (fileB)) self.printButton.setProgressBar(None) if fileA == self._slicer.getGCodeFilename(): self._slicer.submitSliceInfoOnline() + def _doEjectSD(self, drive): + if removableStorage.ejectDrive(drive): + self.notification.message('You can now eject the card.') + else: + self.notification.message('Safe remove failed...') + def _showSliceLog(self): dlg = wx.TextEntryDialog(self, _("The slicing engine reported the following"), _("Engine log..."), '\n'.join(self._slicer.getSliceLog()), wx.TE_MULTILINE | wx.OK | wx.CENTRE) dlg.ShowModal() diff --git a/Cura/gui/util/openglGui.py b/Cura/gui/util/openglGui.py index bab767e3..19aa9ecf 100644 --- a/Cura/gui/util/openglGui.py +++ b/Cura/gui/util/openglGui.py @@ -709,7 +709,7 @@ class glNotification(glFrame): super(glNotification, self).__init__(parent, pos) glGuiLayoutGrid(self)._alignBottom = False self._label = glLabel(self, "Notification", (0, 0)) - self._buttonEject = glButton(self, 31, "Eject", (1, 0), self.onEject, 25) + self._buttonExtra = glButton(self, 31, "???", (1, 0), self.onExtraButton, 25) self._button = glButton(self, 30, "", (2, 0), self.onClose, 25) self._padding = glLabel(self, "", (0, 1)) self.setHidden(True) @@ -727,18 +727,20 @@ class glNotification(glFrame): self.updateLayout() super(glNotification, self).draw() - def message(self, text, ejectCallback = None): + def message(self, text, extraButtonCallback = None, extraButtonIcon = None, extraButtonTooltip = None): self._anim = animation(self._base, -20, 25, 1) self.setHidden(False) self._label.setLabel(text) - self._buttonEject.setHidden(ejectCallback is None) - self._ejectCallback = ejectCallback + self._buttonExtra.setHidden(extraButtonCallback is None) + self._buttonExtra._imageID = extraButtonIcon + self._buttonExtra._tooltip = extraButtonTooltip + self._extraButtonCallback = extraButtonCallback self._base._queueRefresh() self.updateLayout() - def onEject(self, button): + def onExtraButton(self, button): self.onClose(button) - self._ejectCallback() + self._extraButtonCallback() def onClose(self, button): if self._anim is not None: diff --git a/Cura/resources/firmware/MarlinUltimaker2.hex b/Cura/resources/firmware/MarlinUltimaker2.hex index f0f0a28d..8e06295e 100644 --- a/Cura/resources/firmware/MarlinUltimaker2.hex +++ b/Cura/resources/firmware/MarlinUltimaker2.hex @@ -154,11 +154,11 @@ :100990006E672066696C652E006F6B004D32390002 :1009A0002020506C616E6E6572427566666572429B :1009B000797465733A20002046726565204D656D37 -:1009C0006F72793A2000446563203136203230312D +:1009C0006F72793A2000446563203138203230312B :1009D0003300436F6D70696C65643A200056657230 :1009E00073696F6E2031332E313200207C204175C7 -:1009F00074686F723A2000446563203136203230CB -:100A000031332031353A30373A353500204C617377 +:1009F00074686F723A2000446563203138203230C9 +:100A000031332031333A35333A353600204C617377 :100A10007420557064617465643A2000312E302E64 :100A200030004D61726C696E200020536F667477E0 :100A30006172652052657365740020576174636844 @@ -652,8 +652,8 @@ :1028B00000746F2064656661756C743F00526573C7 :1028C00065742065766572797468696E67004E4F2D :1028D000005945530056657273696F6E2031332E6F -:1028E00031320044656320313620323031332031BB -:1028F000353A30383A30300052657475726E006D7A +:1028E00031320044656320313820323031332031B9 +:1028F000333A35343A30310052657475726E006D7A :102900006D2F736563004D61782073706565642079 :102910005A006D6D2F736563004D6178207370658B :1029200065642059006D6D2F736563004D617820DB @@ -5130,7 +5130,7 @@ :104080008F5F1817E0F760587F4F6A177B0719F0AA :10409000FB01852FF6CF842F90E080959095877057 :1040A00090702FEF30E002C0359527958A95E2F7A2 -:1040B000FB01952F209504C08081822381939F5F0F +:1040B000952FFB01209504C08081822381939F5F0F :1040C0001917D0F7DF91CF911F910895FF920F93A9 :1040D0001F93182FF42E022F282F30E0862F86955D :1040E00086958695E82FF0E0F695FE2FEE27F7955A diff --git a/changelog b/changelog index 34f2c190..6e5f0c81 100644 --- a/changelog +++ b/changelog @@ -6,6 +6,7 @@ Development * Fixed problem with retractions not happening when they should. Ultimaker2 - Firmware update - 13.12 +* Fixed the problem where aborting a print did not always home the head. * Fixed bug in acceleration planning causing slow moves on rare occasions. * Disable the normal menus during USB printing, and support for USB based menus. * Expert feature: Support M907 for setting the motor current. -- 2.30.2