Exemple #1
0
    def setUp(self):

        new_settings, defaults_loaded = OctolapseSettings.load(
            "C:\\Users\\Brad\\AppData\\Roaming\\OctoPrint\\data\\octolapse\\settings.json",
            "0.4.0rc1.dev0",
            "C:\\Users\\Brad\\AppData\\Roaming\\OctoPrint\\data\\octolapse\\",
            "settings.json")

        self.Commands = Commands()
        self.Settings = new_settings
        self.Printer = self.Settings.profiles.current_printer()
        self.Stabilization = self.Settings.profiles.current_stabilization()
        self.Printer.auto_detect_position = False
        # since we've set auto_detect_position to false, we need to set
        # an origin, else X,Y and Z will still be None after a home command
        self.Printer.home_x = 0
        self.Printer.home_y = 0
        self.Printer.home_z = 0
        assert (isinstance(self.Printer, PrinterProfile))
        self.Printer.slicer_type = SlicerSettings.SlicerTypeSlic3rPe
        slicer_settings = self.Printer.get_current_slicer_settings()
        assert (isinstance(slicer_settings, Slic3rPeSettings))
        slicer_settings.retract_length = 0.8
        slicer_settings.retract_speed = 2400 / 60
        self.OctoprintPrinterProfile = self.create_octolapse_printer_profile()
 def setUp(self):
     self.Commands = Commands()
     self.Comments = ""