コード例 #1
0
ファイル: mainWindow.py プロジェクト: smeraz24/3DPrinter
	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)
コード例 #2
0
 def OnUltimaker2Firmware(self, e):
     firmwareInstall.InstallFirmware(machineIndex=self.hasUltimaker2)
コード例 #3
0
 def OnDefaultMarlinFirmware(self, e):
     firmwareInstall.InstallFirmware()
コード例 #4
0
 def OnBCN3DRFirmware(self, e):
     firmwareInstall.InstallFirmware(machineIndex=self.hasBCN3DR)
コード例 #5
0
 def OnUpgradeClick(self, e):
     if firmwareInstall.InstallFirmware():
         self.GetParent().FindWindowById(wx.ID_FORWARD).Enable()
コード例 #6
0
 def OnFirmwareInstall(self, index):
     firmwareInstall.InstallFirmware(machineIndex=index)