Add Ultimaker upgrade page in first run wizard, which helps in setting better defaults.

master
daid303 2012-12-05 12:45:20 +01:00
parent bdc1441f07
commit 2081a9cc9a
4 changed files with 35 additions and 6 deletions

View File

@ -262,6 +262,27 @@ class MachineSelectPage(InfoPage):
profile.putProfileSetting('nozzle_size', '0.5')
profile.putProfileSetting('wall_thickness', float(profile.getProfileSetting('nozzle_size')) * 2)
class SelectParts(InfoPage):
def __init__(self, parent):
super(SelectParts, self).__init__(parent, "Select upgraded parts you have")
self.AddText('To assist you in having better default settings for your Ultimaker\nCura would like to know which upgrades you have in your machine.')
self.AddSeperator()
self.springExtruder = self.AddCheckbox('Extruder drive upgrade')
self.heatedBed = self.AddCheckbox('Heated printer bed (self build)')
self.dualExtrusion = self.AddCheckbox('Dual extrusion (experimental)')
self.AddSeperator()
self.AddText('If you have an Ultimaker bought after october 2012 you will have the\nExtruder drive upgrade. If you do not have this upgrade,\nit is highly recommended to improve reliablity.')
self.AddText('This upgrade can be bought from the Ultimaker webshop shop\nor found on thingiverse as thing:26094')
self.springExtruder.SetValue(True)
def StoreData(self):
profile.putPreference('ultimaker_extruder_upgrade', str(self.springExtruder.GetValue()))
profile.putPreference('has_heated_bed', str(self.heatedBed.GetValue()))
if self.dualExtrusion.GetValue():
profile.putPreference('extruder_amount', '2')
if getPreference('ultimaker_extruder_upgrade') == 'True':
putProfileSetting('retraction_enable', 'True')
class FirmwareUpgradePage(InfoPage):
def __init__(self, parent):
super(FirmwareUpgradePage, self).__init__(parent, "Upgrade Ultimaker Firmware")
@ -628,6 +649,7 @@ class configWizard(wx.wizard.Wizard):
self.firstInfoPage = FirstInfoPage(self)
self.machineSelectPage = MachineSelectPage(self)
self.ultimakerSelectParts = SelectParts(self)
self.ultimakerFirmwareUpgradePage = FirmwareUpgradePage(self)
self.ultimakerCheckupPage = UltimakerCheckupPage(self)
self.ultimakerCalibrationPage = UltimakerCalibrationPage(self)
@ -635,7 +657,8 @@ class configWizard(wx.wizard.Wizard):
self.repRapInfoPage = RepRapInfoPage(self)
wx.wizard.WizardPageSimple.Chain(self.firstInfoPage, self.machineSelectPage)
wx.wizard.WizardPageSimple.Chain(self.machineSelectPage, self.ultimakerFirmwareUpgradePage)
wx.wizard.WizardPageSimple.Chain(self.machineSelectPage, self.ultimakerSelectParts)
wx.wizard.WizardPageSimple.Chain(self.ultimakerSelectParts, self.ultimakerFirmwareUpgradePage)
wx.wizard.WizardPageSimple.Chain(self.ultimakerFirmwareUpgradePage, self.ultimakerCheckupPage)
#wx.wizard.WizardPageSimple.Chain(self.ultimakerCheckupPage, self.ultimakerCalibrationPage)
#wx.wizard.WizardPageSimple.Chain(self.ultimakerCalibrationPage, self.ultimakerCalibrateStepsPerEPage)

View File

@ -555,10 +555,11 @@ class printWindow(wx.Frame):
def mcTempUpdate(self, temp, bedTemp, targetTemp, bedTargetTemp):
self.temperatureGraph.addPoint(temp, targetTemp, bedTemp, bedTargetTemp)
if self.temperatureSelect.GetValue() != targetTemp:
wx.CallAfter(self.temperatureSelect.SetValue, targetTemp)
if self.bedTemperatureSelect.GetValue() != bedTargetTemp:
wx.CallAfter(self.bedTemperatureSelect.SetValue, bedTargetTemp)
#ToFix, this causes problems with setting the temperature with the keyboard
#if self.temperatureSelect.GetValue() != targetTemp:
# wx.CallAfter(self.temperatureSelect.SetValue, targetTemp)
#if self.bedTemperatureSelect.GetValue() != bedTargetTemp:
# wx.CallAfter(self.bedTemperatureSelect.SetValue, bedTargetTemp)
def mcStateChange(self, state):
if self.machineCom != None:

View File

@ -154,6 +154,7 @@ preferencesDefaultSettings = {
'machine_depth': '205',
'machine_height': '200',
'machine_type': 'unknown',
'ultimaker_extruder_upgrade': 'False',
'has_heated_bed': 'False',
'extruder_amount': '1',
'extruder_offset_x1': '-22.0',
@ -215,7 +216,11 @@ def resetGlobalProfile():
global globalProfileParser
globalProfileParser = ConfigParser.ConfigParser()
if getPreference('machine_type') == 'reprap':
if getPreference('machine_type') == 'ultimaker':
putProfileSetting('nozzle_size', '0.4')
if getPreference('ultimaker_extruder_upgrade') == 'True':
putProfileSetting('retraction_enable', 'True')
else:
putProfileSetting('nozzle_size', '0.5')
def saveGlobalProfile(filename):