def OnCustomFirmware(self, e): if profile.getPreference('machine_type') == 'ultimaker': wx.MessageBox(language.getText('Warning: Installing a custom firmware does not guarantee that you machine will function correctly, and could damage your machine.'), language.getText('Firmware update'), wx.OK | wx.ICON_EXCLAMATION) dlg=wx.FileDialog(self, language.getText("Open firmware to upload"), os.path.split(profile.getPreference('lastFile'))[0], style=wx.FD_OPEN|wx.FD_FILE_MUST_EXIST) dlg.SetWildcard("HEX file (*.hex)|*.hex;*.HEX") if dlg.ShowModal() == wx.ID_OK: filename = dlg.GetPath() if not(os.path.exists(filename)): return #For some reason my Ubuntu 10.10 crashes here. firmwareInstall.InstallFirmware(filename)
def OnUltimaker2Firmware(self, e): firmwareInstall.InstallFirmware(machineIndex=self.hasUltimaker2)
def OnDefaultMarlinFirmware(self, e): firmwareInstall.InstallFirmware()
def OnBCN3DRFirmware(self, e): firmwareInstall.InstallFirmware(machineIndex=self.hasBCN3DR)
def OnUpgradeClick(self, e): if firmwareInstall.InstallFirmware(): self.GetParent().FindWindowById(wx.ID_FORWARD).Enable()
def OnFirmwareInstall(self, index): firmwareInstall.InstallFirmware(machineIndex=index)