def end_wizard(self, *args):
        #turn off fan
        self._save_zoffset()
        roboprinter.printer_instance._printer.commands('M106 S0')

        #capture the offset
        from RoboLCD.lcd.wizards.FTZO.console_watcher import Console_Watcher
        Console_Watcher(self.wait_for_update)

        pconsole.query_eeprom()
        roboprinter.printer_instance._printer.commands("M118 ACTION COMPLETE!")
        Clock.schedule_interval(self.wait_for_update, 0.5)
Пример #2
0
 def prepare_for_lines(self, *args, **kwargs):
     #Prepare the printer for the wizard
     pconsole.query_eeprom()  #getting the EEPROM for a seperate process
     roboprinter.printer_instance._printer.commands(
         'G36')  #Robo's Autolevel
     roboprinter.printer_instance._printer.commands(
         'G1 X' + str(self.start_pos_x) + ' Y' + str(self.start_pos_y) +
         ' F3000')  # go to first corner
     roboprinter.printer_instance._printer.commands(
         'G1 Z5')  #bring bed close to the nozzle
     roboprinter.printer_instance._printer.commands(
         'M114')  #process position
     roboprinter.printer_instance._printer.commands('M118 ACTION COMPLETE!')
    def preparing_printer_screen(self, *args):
        """Loading Screen
            Displays to user that Z Axis is moving """

        #Prepare screen
        title = lang.pack['ZOffset_Wizard']['Z_14']
        self.wait_screen = Wait_Screen(self.check_temp_and_change_screen, '',lang.pack['ZOffset_Wizard']['Auto_Next'], watch_action=True)
        self.wait_screen.change_screen_actions = self.restore_z_offset
        self.wait_screen.update = self.wait_screen_skip_action
        self.bb.make_screen(self.wait_screen,
                         title,
                         option_function='no_option')

        Logger.info("Preparing Printer")
        #query the EEPROM
        pconsole.query_eeprom()
        #Wait a little bit for the EEPROM to be captured, then prepare printer
        Clock.schedule_once(self._prepare_printer, 0.5)
Пример #4
0
    def __init__(self, callback, title_text = ['', ''], **kwargs):
        #title_text, body_text,image_source, button_function, button_text
        self.title_texts = title_text

        #Throw an error if there is not two entries in the title texts
        if len(self.title_texts) != 2:
            raise ValueError("did not supply the correct array length of correct type values for variable self.title_texts")

        title_text = self.title_texts[0]
        body_text = roboprinter.lang.pack['FT_ZOffset_Wizard']['Save_Offset']['Waiting']
        image_source = self.icons[0]
        button_function = self.okay_button
        self.callback = callback

        #save the Z-Offset
        roboprinter.printer_instance._printer.commands('M500')
        pconsole.register_observer('M206', self.update_offset)
        Logger.info("querying eeprom")
        pconsole.query_eeprom()

        super(Z_offset_saver, self).__init__(title_text, body_text, image_source, button_function)
Пример #5
0
    def __init__(self, name, title, back_destination):
        super(PID_Overseer, self).__init__()
        self.autotune_complete = False
        pconsole.query_eeprom()
        self.bb = Wizard_BB()
        self.group = 'pid_wizard_group'
        self.welcome = None
        self.pid_screen = None
        self.debug_mode = False

        self.name = name  #name of initial screen
        self.title = title
        self.back_destination = back_destination
        self.bb.back_destination = self.back_destination
        self.selected_tool = 'tool0'

        #add bb
        roboprinter.robosm.add_widget(self.bb)
        roboprinter.robosm.current = self.bb.name
        #start wizard
        self.welcome_page()
Пример #6
0
 def refresh_eeprom(self):
     pconsole.query_eeprom()
     '''
     This dictionary contains a few defining elements for each EEPROM entry that we want to display
     name: This is the name that will be displayed on the screen for this value
     command: This is the specific gcode command that this entry is attached to
     filter: This defines what values will be shown to the user
     order: This defines the order that the values will be shown to the user
     range: This will define the numbers by which the user will be able to edit the entry
     values: This will hold the actual values scraped from the EEPROM
     '''
     self.eeprom_dictionary = {
         roboprinter.lang.pack['EEPROM']['Home_Offset']: {
             'name': roboprinter.lang.pack['EEPROM']['Home_Offset'],
             'command': 'M206',
             'order': ['Z'],
             'range': [10, 0.01, 0.1, 1],
             'values': pconsole.home_offset
         },
         roboprinter.lang.pack['EEPROM']['Probe_Offset']: {
             'name': roboprinter.lang.pack['EEPROM']['Probe_Offset'],
             'command': 'M851',
             'order': ['Z'],
             'range': [10, 0.01, 0.1, 1],
             'values': pconsole.probe_offset
         },
         roboprinter.lang.pack['EEPROM']['Feed_Rates']: {
             'name': roboprinter.lang.pack['EEPROM']['Feed_Rates'],
             'command': 'M203',
             'order': ['X', 'Y', 'Z', 'E', 'T0 E', 'T1 E'],
             'range': [0.01, 0.1, 1, 10],
             'values': pconsole.feed_rate
         },
         roboprinter.lang.pack['EEPROM']['PID_Settings']: {
             'name': roboprinter.lang.pack['EEPROM']['PID_Settings'],
             'command': 'M301',
             'order': ['P', 'I', 'D'],
             'range': [0.01, 0.1, 1, 10],
             'values': pconsole.PID
         },
         roboprinter.lang.pack['EEPROM']['Bed_PID']: {
             'name': roboprinter.lang.pack['EEPROM']['Bed_PID'],
             'command': 'M304',
             'order': ['P', 'I', 'D'],
             'range': [0.01, 0.1, 1, 10],
             'values': pconsole.BPID
         },
         roboprinter.lang.pack['EEPROM']['Steps_Unit']: {
             'name': roboprinter.lang.pack['EEPROM']['Steps_Unit'],
             'command': 'M92',
             'order': ['X', 'Y', 'Z', 'E', 'T0 E', 'T1 E'],
             'range': [0.01, 0.1, 1, 10],
             'values': pconsole.steps_per_unit
         },
         roboprinter.lang.pack['EEPROM']['Accelerations']: {
             'name': roboprinter.lang.pack['EEPROM']['Accelerations'],
             'command': 'M204',
             'order': ['P', 'R', 'T'],
             'range': [0.01, 0.1, 1, 10, 100, 1000],
             'values': pconsole.accelerations
         },
         roboprinter.lang.pack['EEPROM']['Max_Accelerations']: {
             'name': roboprinter.lang.pack['EEPROM']['Max_Accelerations'],
             'command': 'M201',
             'order': ['X', 'Y', 'Z', 'E', 'T0 E', 'T1 E'],
             'range': [0.01, 0.1, 1, 10, 100, 1000],
             'values': pconsole.max_accelerations
         },
         roboprinter.lang.pack['EEPROM']['Advanced']: {
             'name': roboprinter.lang.pack['EEPROM']['Advanced'],
             'command': 'M205',
             'order': ['S', 'T', 'X', 'Y', 'Z', 'E'],
             'range': [0.01, 0.1, 1, 10, 100],
             'values': pconsole.advanced_variables
         },
         roboprinter.lang.pack['EEPROM']['Linear_Advanced']: {
             'name': roboprinter.lang.pack['EEPROM']['Linear_Advanced'],
             'command': 'M900',
             'order': ['K', 'R'],
             'range': [0.01, 0.1, 1, 10, 100],
             'values': pconsole.linear_advanced
         },
         roboprinter.lang.pack['EEPROM']['Reset']: {
             'name': roboprinter.lang.pack['EEPROM']['Reset'],
             'action': self.reset_defaults,
             'values': ''
         },
     }
Пример #7
0
 def refresh_list(self, *args, **kwargs):
     pconsole.query_eeprom()
     self.EEPROM_screen.repopulate_for_new_screen()
     Clock.schedule_once(self.update_title, 0.0)
Пример #8
0
 def save_offset(self):
     roboprinter.printer_instance._printer.commands('M500')
     pconsole.query_eeprom()
     offset = pconsole.home_offset['Z']
     return offset