Start the first run wizard when we do not know the machine type. Only show the default firmware install if we know that we have a default firmware for this machine.
parent
0db6d1aebb
commit
5a35b4ffc6
|
@ -246,6 +246,7 @@ class MachineSelectPage(InfoPage):
|
|||
profile.putPreference('machine_depth', '80')
|
||||
profile.putPreference('machine_height', '60')
|
||||
profile.putPreference('machine_type', 'reprap')
|
||||
profile.putPreference('startMode', 'Normal')
|
||||
profile.putProfileSetting('nozzle_size', '0.5')
|
||||
profile.putProfileSetting('machine_center_x', '40')
|
||||
profile.putProfileSetting('machine_center_y', '40')
|
||||
|
|
|
@ -26,9 +26,8 @@ from util import meshLoader
|
|||
|
||||
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:
|
||||
|
@ -85,8 +84,9 @@ class mainWindow(configBase.configWindowBase):
|
|||
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()
|
||||
|
|
|
@ -131,23 +131,6 @@ class simpleModeWindow(configBase.configWindowBase):
|
|||
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)
|
||||
|
|
|
@ -147,7 +147,6 @@ G92 E0
|
|||
""",
|
||||
}
|
||||
preferencesDefaultSettings = {
|
||||
'wizardDone': 'False',
|
||||
'startMode': 'Simple',
|
||||
'lastFile': os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'example', 'UltimakerRobot_support.stl')),
|
||||
'machine_width': '205',
|
||||
|
|
Loading…
Reference in New Issue