Added filament diameter configuration

Made firmware upload use the serial port preference
master
daid 2012-03-08 17:28:55 +01:00
parent 14a3b305f1
commit ae11f32486
2 changed files with 14 additions and 6 deletions

View File

@ -138,7 +138,7 @@ class FirmwareUpgradePage(InfoPage):
class UltimakerCheckupPage(InfoPage):
def __init__(self, parent):
super(UltimakerCheckupPage, self).__init__(parent, "Ultimaker Checkup")
self.AddText('It is a good idea to do a few sanity checks\nnow on your Ultimaker.\nBut you can skip these if you know your\nmachine is functional.')
self.AddText('It is a good idea to do a few sanity checks now on your Ultimaker.\nYou can skip these if you know your machine is functional.')
b1, b2 = self.AddDualButton('Run checks', 'Skip checks')
b1.Bind(wx.EVT_BUTTON, self.OnCheckClick)
b2.Bind(wx.EVT_BUTTON, self.OnSkipClick)
@ -239,7 +239,6 @@ class UltimakerCheckupPage(InfoPage):
if line == False:
return -1
return int(re.search('T:([0-9]*)', line).group(1))
def DoCommCommandAndWaitForReply(self, cmd, replyStart, reply):
while True:
@ -275,10 +274,19 @@ class UltimakerCalibrationPage(InfoPage):
self.AddText("This calibration is needed for a proper extrusion amount.");
self.AddSeperator()
self.AddText("The following values are needed:");
self.AddText("* Number of steps per mm of filament extrusion");
self.AddText("* Diameter of filament");
self.AddText("* Number of steps per mm of filament extrusion");
self.AddSeperator()
self.AddText("The better you have calibrated these values, the better your prints will become.");
self.AddText("The better you have calibrated these values, the better your prints\nwill become.");
self.AddSeperator()
self.AddText("First we need the diameter of your filament:");
self.filamentDiameter = wx.TextCtrl(self, -1, settings.getProfileSetting('filament_diameter', '2.89'))
self.GetSizer().Add(self.filamentDiameter, 0, wx.LEFT, 5)
self.AddText("If you do not own digital Calipers that can measure\nat least 2 digits then use 2.89mm.\nWhich is the average diameter of most filament.");
self.AddText("Note: This value can be changed later at any time.");
def StoreData(self):
settings.putProfileSetting('filament_diameter', self.filamentDiameter.GetValue())
class configWizard(wx.wizard.Wizard):
def __init__(self):

View File

@ -222,7 +222,7 @@ class mainWindow(configBase.configWindowBase):
prefDialog.Show(True)
def OnDefaultMarlinFirmware(self, e):
machineCom.InstallFirmware(os.path.join(os.path.dirname(os.path.abspath(__file__)), "../firmware/default.hex"))
machineCom.InstallFirmware(os.path.join(os.path.dirname(os.path.abspath(__file__)), "../firmware/default.hex"), settings.getPreference('serial_port', 'AUTO'))
def OnCustomFirmware(self, e):
dlg=wx.FileDialog(self, "Open firmware to upload", self.lastPath, style=wx.FD_OPEN|wx.FD_FILE_MUST_EXIST)
@ -232,7 +232,7 @@ class mainWindow(configBase.configWindowBase):
if not(os.path.exists(filename)):
return
#For some reason my Ubuntu 10.10 crashes here.
machineCom.InstallFirmware(filename)
machineCom.InstallFirmware(filename, settings.getPreference('serial_port', 'AUTO'))
def OnLoadSTL(self, e):
dlg=wx.FileDialog(self, "Open file to print", self.lastPath, style=wx.FD_OPEN|wx.FD_FILE_MUST_EXIST)