def generate_network_utilities_screen(self, **kwargs): #generates network option screen. Utilities > Network > Network Utilities > wifi list || start ap cw = Robo_Icons( 'Icons/Icon_Buttons/Configure Wifi.png', roboprinter.lang.pack['RoboIcons']['Configure_WiFi'], 'CONFIGURE_WIFI') ap = Robo_Icons('Icons/Icon_Buttons/Start Wifi.png', roboprinter.lang.pack['RoboIcons']['Start_WiFi'], 'START_HOTSPOT') ip = Robo_Icons( 'Icons/Icon_Buttons/Network status.png', roboprinter.lang.pack['RoboIcons']['Network_Status'], 'NETWORK_STATUS') qr = Robo_Icons('Icons/Icon_Buttons/QR Code.png', roboprinter.lang.pack['RoboIcons']['QR'], 'QR_CODE') buttons = [cw, ap, ip, qr] sb = Scroll_Box_Icons(buttons) self._generate_backbutton_screen( name=kwargs['name'], title=kwargs['title'], back_destination=kwargs['back_destination'], content=sb)
def generate_options(self, **kwargs): _name = kwargs['name'] opt = Robo_Icons('Icons/System_Icons/EEPROM Reader.png', roboprinter.lang.pack['RoboIcons']['EEPROM'], 'EEPROM') usb = Robo_Icons('Icons/System_Icons/USB.png', roboprinter.lang.pack['RoboIcons']['USB'], 'UNMOUNT_USB') language = Robo_Icons( 'Icons/System_Icons/Language.png', roboprinter.lang.pack['RoboIcons']['Language'], 'LANGUAGE') main_status = Robo_Icons( 'Icons/Printer Status/Connection.png', roboprinter.lang.pack['RoboIcons']['Mainboard'], 'MAINBOARD') cam = Robo_Icons('Icons/System_Icons/Webcam.png', roboprinter.lang.pack['RoboIcons']['Webcam'], 'WEBCAM') model = roboprinter.printer_instance._settings.get(['Model']) if model == "Robo R2": #buttons = [opt,usb, firm, language, main_status, cam] buttons = [opt, usb, main_status, cam] else: #buttons = [opt,usb, firm, language, main_status] buttons = [opt, usb, main_status] layout = Scroll_Box_Icons(buttons) self._generate_backbutton_screen( name=_name, title=kwargs['title'], back_destination=kwargs['back_destination'], content=layout)
def generate_system(self, **kwargs): _name = kwargs['name'] power = Robo_Icons('Icons/System_Icons/Shutdown.png', roboprinter.lang.pack['RoboIcons']['Shutdown'], 'SHUTDOWN') reboot = Robo_Icons('Icons/System_Icons/Reboot.png', roboprinter.lang.pack['RoboIcons']['Reboot'], 'REBOOT') printer_off = Robo_Icons( 'Icons/System_Icons/printer_off.png', roboprinter.lang.pack['RoboIcons']['PrinterOff'], 'PRINTER_OFF') printer_on = Robo_Icons( 'Icons/System_Icons/printer_on.png', roboprinter.lang.pack['RoboIcons']['PrinterOn'], 'PRINTER_ON') buttons = [power, reboot, printer_off, printer_on] layout = Scroll_Box_Icons(buttons) self._generate_backbutton_screen( name=_name, title=kwargs['title'], back_destination=kwargs['back_destination'], content=layout)
def generate_toolhead_select_screen(self, **kwargs): _name = kwargs['name'] self.tool_0 = False self.tool_1 = False self.bed_0 = False temps = roboprinter.printer_instance._printer.get_current_temperatures( ) Logger.info(temps) if 'tool0' in temps.keys(): self.tool_0 = True t0 = Robo_Icons('Icons/System_Icons/Extruder1.png', roboprinter.lang.pack['RoboIcons']['Tool1'], 'TOOL1') if 'bed' in temps.keys(): self.bed_0 = True bed = Robo_Icons('Icons/System_Icons/Bed temp.png', roboprinter.lang.pack['RoboIcons']['Bed'], 'BED') if 'tool1' in temps.keys(): self.tool_1 = True t1 = Robo_Icons('Icons/System_Icons/Extruder2.png', roboprinter.lang.pack['RoboIcons']['Tool2'], 'TOOL2') preheat = Robo_Icons('Icons/Icon_Buttons/Preheat.png', roboprinter.lang.pack['RoboIcons']['Preheat'], 'PREHEAT') cooldown = Robo_Icons( 'Icons/Icon_Buttons/CoolDown.png', roboprinter.lang.pack['RoboIcons']['Cooldown'], 'COOLDOWN') buttons = [] if self.tool_0: buttons.append(t0) if self.tool_1: buttons.append(t1) if self.bed_0: buttons.append(bed) buttons.append(preheat) buttons.append(cooldown) layout = Scroll_Box_Icons(buttons) self._generate_backbutton_screen( name=_name, title=kwargs['title'], back_destination=kwargs['back_destination'], content=layout) return
def __init__(self, **kwargs): super(UtilitiesContent, self).__init__() #add Icons self.wiz = Robo_Icons('Icons/White_Utilities/Wizards.png', roboprinter.lang.pack['RoboIcons']['Wizards'], 'WIZARDS') self.rc = Robo_Icons( 'Icons/White_Utilities/Print tuning_White.png', roboprinter.lang.pack['RoboIcons']['Print_Tuning'], 'PRINT_TUNING') self.net = Robo_Icons('Icons/White_Utilities/Networking.png', roboprinter.lang.pack['RoboIcons']['Network'], 'NETWORK') self.upd = Robo_Icons('Icons/White_Utilities/Updates.png', roboprinter.lang.pack['RoboIcons']['Update'], 'UPDATES') self.sys = Robo_Icons('Icons/System_Icons/Shutdown 2.png', roboprinter.lang.pack['RoboIcons']['System'], 'SYSTEM') self.opt = Robo_Icons('Icons/White_Utilities/Options.png', roboprinter.lang.pack['RoboIcons']['Options'], 'OPTIONS') icons = [self.rc, self.wiz, self.net, self.upd, self.opt, self.sys] layout = Scroll_Box_Icons(icons) self.clear_widgets() self.add_widget(layout) self.state = 'NOT_PRINTING' self.last_state = None Clock.schedule_interval(self.monitor_layout, 1)
def generate_wizards_screen(self, **kwargs): name = kwargs['name'] title = kwargs['title'] back_destination = kwargs['back_destination'] model = roboprinter.printer_instance._settings.get(['Model']) z = Robo_Icons('Icons/Zoffset illustration/Z-offset.png', roboprinter.lang.pack['RoboIcons']['Z_Offset'], 'ZOFFSET') fl = Robo_Icons('Icons/Icon_Buttons/Load Filament.png', roboprinter.lang.pack['RoboIcons']['Fil_Load'], 'FIL_LOAD') fc = Robo_Icons('Icons/Icon_Buttons/Change Filament.png', roboprinter.lang.pack['RoboIcons']['Fil_Change'], 'FIL_CHANGE') fine_tune = Robo_Icons( 'Icons/Zoffset illustration/Fine tune.png', roboprinter.lang.pack['RoboIcons']['FTZ_Offset'], 'FINE_TUNE') #If it's not an R2 we dont need the bed calibration wizard if model == "Robo R2": bed_calib = Robo_Icons( 'Icons/Bed_Calibration/Bed placement.png', roboprinter.lang.pack['RoboIcons']['Bed_Cal'], 'BED_CALIBRATION') buttons = [fc, fl, z, bed_calib, fine_tune] else: buttons = [fc, fl, z, fine_tune] c = Scroll_Box_Icons(buttons) self._generate_backbutton_screen(name=name, title=title, back_destination=back_destination, content=c)
def generate_options(self, **kwargs): _name = kwargs['name'] opt = Robo_Icons('Icons/System_Icons/EEPROM Reader.png', roboprinter.lang.pack['RoboIcons']['EEPROM'], 'EEPROM') usb = Robo_Icons('Icons/System_Icons/USB.png', roboprinter.lang.pack['RoboIcons']['USB'], 'UNMOUNT_USB') language = Robo_Icons( 'Icons/System_Icons/Language.png', roboprinter.lang.pack['RoboIcons']['Language'], 'LANGUAGE') main_status = Robo_Icons( 'Icons/Printer Status/Connection.png', roboprinter.lang.pack['RoboIcons']['Mainboard'], 'MAINBOARD') cam = Robo_Icons('Icons/System_Icons/Webcam.png', roboprinter.lang.pack['RoboIcons']['Webcam'], 'WEBCAM') model = roboprinter.printer_instance._settings.get(['Model']) if model == "Robo R2": #buttons = [opt,usb, firm, language, main_status, cam] buttons = [opt, usb, main_status, cam] else: #buttons = [opt,usb, firm, language, main_status] buttons = [opt, usb, main_status] #if we are printing, do not give them access to the EEPROM current_data = roboprinter.printer_instance._printer.get_current_data( ) is_printing = current_data['state']['flags']['printing'] is_paused = current_data['state']['flags']['paused'] if is_printing or is_paused: opt.button_state = True else: opt.button_state = False layout = Scroll_Box_Icons(buttons) self._generate_backbutton_screen( name=_name, title=kwargs['title'], back_destination=kwargs['back_destination'], content=layout)