profile.putPreference('machine_depth', '80')\r
profile.putPreference('machine_height', '60')\r
profile.putPreference('machine_type', 'reprap')\r
+ profile.putPreference('startMode', 'Normal')\r
profile.putProfileSetting('nozzle_size', '0.5')\r
profile.putProfileSetting('machine_center_x', '40')\r
profile.putProfileSetting('machine_center_y', '40')\r
def main():
#app = wx.App(False)
- if profile.getPreference('wizardDone') == 'False':
+ if profile.getPreference('machine_type') == 'unknown':
configWizard.configWizard()
- profile.putPreference("wizardDone", "True")
if profile.getPreference('startMode') == 'Simple':
simpleMode.simpleModeWindow()
else:
i = expertMenu.Append(-1, 'Open expert settings...')
self.Bind(wx.EVT_MENU, self.OnExpertOpen, i)
expertMenu.AppendSeparator()
- i = expertMenu.Append(-1, 'Install default Marlin firmware')
- self.Bind(wx.EVT_MENU, self.OnDefaultMarlinFirmware, i)
+ if firmwareInstall.getDefaultFirmware() != None:
+ i = expertMenu.Append(-1, 'Install default Marlin firmware')
+ self.Bind(wx.EVT_MENU, self.OnDefaultMarlinFirmware, i)
i = expertMenu.Append(-1, 'Install custom firmware')
self.Bind(wx.EVT_MENU, self.OnCustomFirmware, i)
expertMenu.AppendSeparator()
prefDialog = preferencesDialog.preferencesDialog(self)
prefDialog.Centre()
prefDialog.Show(True)
-
- def OnDefaultMarlinFirmware(self, e):
- firmwareInstall.InstallFirmware()
-
- def OnCustomFirmware(self, e):
- dlg=wx.FileDialog(self, "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 OnFirstRunWizard(self, e):
- configWizard.configWizard()
- self.updateProfileToControls()
def OnLoadModel(self, e):
dlg=wx.FileDialog(self, "Open file to print", os.path.split(profile.getPreference('lastFile'))[0], style=wx.FD_OPEN|wx.FD_FILE_MUST_EXIST)
""",\r
}\r
preferencesDefaultSettings = {\r
- 'wizardDone': 'False',\r
'startMode': 'Simple',\r
'lastFile': os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'example', 'UltimakerRobot_support.stl')),\r
'machine_width': '205',\r