chiark / gitweb /
Change TAZ machine width to 290
authorYouness Alaoui <kakaroto@kakaroto.homelinux.net>
Fri, 26 Jun 2015 19:24:57 +0000 (15:24 -0400)
committerYouness Alaoui <kakaroto@kakaroto.homelinux.net>
Fri, 26 Jun 2015 19:24:59 +0000 (15:24 -0400)
This will allow prints to be centered. Fixes issue #98

Cura/gui/configWizard.py
Cura/util/profile.py

index 026a95835dd71908af9ec483bc37c15ebe4ff73c..839322c8dc524367e6c082bf69ba27fdb032361a 100644 (file)
@@ -500,7 +500,7 @@ class MachineSelectPage(InfoPage):
                        profile.putProfileSetting('retraction_enable', 'True')
                elif self.LulzbotTaz4Radio.GetValue() or self.LulzbotTaz5Radio.GetValue() or self.LulzbotMiniRadio.GetValue():
                        if self.LulzbotTaz4Radio.GetValue():
-                               profile.putMachineSetting('machine_width', '298')
+                               profile.putMachineSetting('machine_width', '290')
                                profile.putMachineSetting('machine_depth', '275')
                                profile.putMachineSetting('machine_height', '250')
                                profile.putProfileSetting('nozzle_size', '0.35')
@@ -508,7 +508,7 @@ class MachineSelectPage(InfoPage):
                                profile.putMachineSetting('machine_type', 'lulzbot_TAZ_4')
                                profile.putMachineSetting('serial_baud', '115200')
                        elif self.LulzbotTaz5Radio.GetValue():
-                               profile.putMachineSetting('machine_width', '298')
+                               profile.putMachineSetting('machine_width', '290')
                                profile.putMachineSetting('machine_depth', '275')
                                profile.putMachineSetting('machine_height', '250')
                                profile.putMachineSetting('serial_baud', '115200')
index 8cb87ba508cb06b7e2d2cf3303ced4984b742d33..4a3f0ea4d3dc29c6d403aed8620186051fe313d6 100644 (file)
@@ -1359,4 +1359,14 @@ def getAlterationFileContents(filename, extruderCount = 1):
        return unicode(prefix + re.sub("(.)\{([^\}]*)\}", replaceTagMatch, alterationContents).rstrip() + '\n' + postfix).strip().encode('utf-8') + '\n'
 
 def performVersionUpgrade():
-       pass
+       for n in xrange(0, getMachineCount()):
+               # This is a hack around an issue where the machine type in the wizard
+               # changed and causes some people to have it set to lulzbot_TAZ and some
+               # people have it set to lulzbot_TAZ_4.
+               if getMachineSetting('machine_type', n) == 'lulzbot_TAZ':
+                       putMachineSetting('machine_type', 'lulzbot_TAZ_4', n)
+
+               # Change TAZ print bed so prints are centered when scaled to the max
+               if getMachineSetting('machine_type', n).startswith('lulzbot_TAZ_') and
+                  getMachineSetting('machine_width', n) == '298':
+                       profile.putMachineSetting('machine_width', '290')