Exemplo n.º 1
0
    def warn_and_restart(self):
        pos = pconsole.get_position()
        while not pos:
            pos = pconsole.get_position()

        drop = self.drop_amount - float(pos[2]) 
        Logger.info("Dropping to: " + str(drop))
        roboprinter.printer_instance._printer.commands('M400')#Wait for all previous commands to finish (Clear the buffer)

        #################################################################################################################
                                    #Get off of the endstop so the Z axis works...
        #get bed dimensions
        bed_x = roboprinter.printer_instance._settings.global_get(['printerProfiles','defaultProfile', 'volume','width'])
        bed_y = roboprinter.printer_instance._settings.global_get(['printerProfiles','defaultProfile', 'volume','depth'])

        #calculate final positions
        bed_x = float(bed_x) / 2.0
        bed_y = float(bed_y) / 2.0

        roboprinter.printer_instance._printer.commands('G1 X' + str(bed_x) + ' Y' + str(bed_y) +' F10000')
        #################################################################################################################
        
        roboprinter.printer_instance._printer.commands('G1 Z'+ str(drop) + ' F5000')
        roboprinter.printer_instance._printer.commands('G1 X'+ str(self.start_pos_x) + ' Y'+ str(self.start_pos_y) + ' F5000') # go to first corner
        layout = Button_Screen(roboprinter.lang.pack['FT_ZOffset_Wizard']['Warn_Restart']['Body'] , self.restart)
        title = roboprinter.lang.pack['FT_ZOffset_Wizard']['Warn_Restart']['Title']
        name = 'line_restart'
        back_destination = roboprinter.robo_screen()

        roboprinter.back_screen(
            name=name,
            title=title,
            back_destination=back_destination,
            content=layout
        )
Exemplo n.º 2
0
    def first_screen(self, **kwargs):

        model = roboprinter.printer_instance._settings.get(['Model'])
        #body_text,image_source, button_function, button_text = roboprinter.lang.pack['Button_Screen']['Default_Button']
        c = Button_Screen(lang.pack['ZOffset_Wizard']['Wizard_Description'],
                          self.second_screen,
                          button_text=lang.pack['ZOffset_Wizard']['Start'])

        self.sm._generate_backbutton_screen(
            name=self.name,
            title=roboprinter.lang.pack['ZOffset_Wizard']['Welcome'],
            back_destination=kwargs['back_destination'],
            content=c)
Exemplo n.º 3
0
    def welcome_screen(self):
        layout = Button_Screen(roboprinter.lang.pack['FT_ZOffset_Wizard']['Welcome']['Body'], 
                               self.choose_preheat_settings)
        title = roboprinter.lang.pack['FT_ZOffset_Wizard']['Welcome']['Title']
        name = 'welcome_fine_tune'
        back_destination = roboprinter.robo_screen()

        roboprinter.back_screen(
            name=name,
            title=title,
            back_destination=back_destination,
            content=layout
        )
Exemplo n.º 4
0
    def tighten_all_screw_instructions(self):
        layout = Button_Screen(roboprinter.lang.pack['Bed_Cal_Wizard']['Tilt_Instructions']['Body'], 
                               self.check_for_valid_start,
                               button_text = roboprinter.lang.pack['Bed_Cal_Wizard']['Tilt_Instructions']['Button'])
        title = roboprinter.lang.pack['Bed_Cal_Wizard']['Tilt_Instructions']['Title']
        name = 'tilt1'
        back_destination = roboprinter.robo_screen()

        roboprinter.back_screen(
            name=name,
            title=title,
            back_destination=back_destination,
            content=layout
        )
Exemplo n.º 5
0
    def finish_screws_instructions(self):
        layout = Button_Screen(roboprinter.lang.pack['Bed_Cal_Wizard']['Tilt_Instructions']['Body'], 
                               self.finish_wizard,
                               button_text = roboprinter.lang.pack['Bed_Cal_Wizard']['Tilt_Instructions']['Button'])
        title = roboprinter.lang.pack['Bed_Cal_Wizard']['Tilt_Instructions']['Title']
        name = 'tilt2'
        back_destination = roboprinter.robo_screen()

        roboprinter.back_screen(
            name=name,
            title=title,
            back_destination=back_destination,
            content=layout
        )
Exemplo n.º 6
0
    def welcome_screen(self):
        layout = Button_Screen(roboprinter.lang.pack['Bed_Cal_Wizard']['Welcome']['Body'], 
                               self.tighten_all_screw_instructions,
                               button_text = roboprinter.lang.pack['Bed_Cal_Wizard']['Welcome']['Button'])
        title = roboprinter.lang.pack['Bed_Cal_Wizard']['Welcome']['Title']
        name = 'welcome_bed_calibration'
        back_destination = roboprinter.robo_screen()

        roboprinter.back_screen(
            name=name,
            title=title,
            back_destination=back_destination,
            content=layout
        )
Exemplo n.º 7
0
        def reset():
            roboprinter.printer_instance._printer.commands("M502")
            roboprinter.printer_instance._printer.commands("M500")
            roboprinter.printer_instance._printer.commands("M501")

            #make screen to say that the variables have been reset

            #body_text, button_function, button_text = roboprinter.lang.pack['Button_Screen']['Default_Button']
            content = Button_Screen(roboprinter.lang.pack['EEPROM']['Acknowledge_Reset']['Body_Text'],
                                    self.sm.go_back_to_main,
                                    button_text = roboprinter.lang.pack['EEPROM']['Acknowledge_Reset']['Button'])

            #make screen
            roboprinter.robosm._generate_backbutton_screen(name='ack_reset_eeprom', 
                                                           title = roboprinter.lang.pack['EEPROM']['Acknowledge_Reset']['Title'] , 
                                                           back_destination=back_screen, 
                                                           content=content)
Exemplo n.º 8
0
    def instruction1(self):
        #go to the correct position to start from
        roboprinter.printer_instance._printer.commands('M400')#Wait for all previous commands to finish (Clear the buffer)
        roboprinter.printer_instance._printer.commands('G1 X'+ str(self.start_pos_x) + ' Y'+ str(self.start_pos_y) + ' F5000') # go to first corner
        roboprinter.printer_instance._printer.commands('G1 Z5')

        self.preparing_in_progress = False
        self.prepared_printer = True
        layout = Button_Screen(roboprinter.lang.pack['FT_ZOffset_Wizard']['Instruction']['Body'],
                               self.instruction2)
        title = roboprinter.lang.pack['FT_ZOffset_Wizard']['Instruction']['Title']
        name = 'text_instructions'
        back_destination = roboprinter.robo_screen()

        roboprinter.back_screen(
            name=name,
            title=title,
            back_destination=back_destination,
            content=layout
        )