def on_pre_enter(self):
        try:
            self.is_active = True
            self.configuration_api = self.api.get_configuration_api()
            dripper_type = self.configuration_api.get_dripper_type()
            self.ids.dripper_type_selector.selected = dripper_type
            self.dripper_type_changed(None, dripper_type)

            self.emulated_settings.drips_per_mm = self.configuration_api.get_dripper_drips_per_mm(
            )
            self.emulated_settings.drips_per_second = self.configuration_api.get_dripper_emulated_drips_per_second(
            )
            self.circut_settings.drips_per_mm = self.configuration_api.get_dripper_drips_per_mm(
            )
            self.circut_visuals.target_height = str(
                self.circut_setup.test_height)
            self.photo_settings.photo_zaxis_delay = self.configuration_api.get_dripper_photo_zaxis_delay(
            )

        except:
            raise
            ep = ErrorPopup(title=_("Error"),
                            text=_("No Peachy Printer Detected"))
            ep.open()
            App.get_running_app().root.current = 'main_ui'
Beispiel #2
0
 def on_pre_enter(self):
     try:
         self.configuration_api = self.api.get_configuration_api()
     except Exception as ex:
         import traceback
         traceback.print_exc()
         ep = ErrorPopup(title_source=_("Error"), text=_("No Peachy Printer Detected"), details="%s\n%s" % (type(ex), ex))
         ep.open()
         App.get_running_app().root.current = 'main_ui'
Beispiel #3
0
 def _print_generator(self, generator, return_name='mainui', force_source_speed=False):
     self.return_to = return_name
     try:
         self.print_api = self.api.get_print_api()
         self.print_api.print_layers(generator, force_source_speed=force_source_speed)
         self.setup_dripper()
     except Exception as ex:
         popup = ErrorPopup(title='Error', text=str(ex), size_hint=(0.6, 0.6))
         popup.open()
         self.parent.current = self.return_to
Beispiel #4
0
 def _print_generator(self, generator, return_name='main_ui', force_source_speed=False):
     self.return_to = return_name
     try:
         self.print_api = self.api.get_print_api()
         self.print_api.print_layers(generator, force_source_speed=force_source_speed)
         self._setup_print()
     except Exception as ex:
         popup = ErrorPopup(title='Error', text=str(ex), size_hint=(0.6, 0.6))
         popup.open()
         self.parent.current = self.return_to
Beispiel #5
0
 def on_pre_enter(self):
     try:
         self.configuration_api = self.api.get_configuration_api()
     except Exception as ex:
         import traceback
         traceback.print_exc()
         ep = ErrorPopup(title_source=_("Error"),
                         text=_("No Peachy Printer Detected"),
                         details="%s\n%s" % (type(ex), ex))
         ep.open()
         App.get_running_app().root.current = 'main_ui'
Beispiel #6
0
 def _print_file(self, filename, start_height=0.0, return_name='mainui', force_source_speed=False):
     self.return_to = return_name
     try:
         filepath = filename[0].encode('utf-8')
         self.print_api = self.api.get_print_api(start_height=start_height)
         self.path = os.path.basename(filepath)
         self.print_api.print_gcode(filepath, force_source_speed=force_source_speed)
         self.setup_dripper()
     except Exception as ex:
         popup = ErrorPopup(title='Error', text=str(ex), size_hint=(0.6, 0.6))
         popup.open()
         self.parent.current = self.return_to
Beispiel #7
0
 def turn_on(self):
     self.is_active = True
     try:
         self.calibration_api = self.api.get_calibration_api()
         self.calibration_api.show_point([0.5, 0.5, 0.0])
     except Exception as ex:
         import traceback
         traceback.print_exc()
         ep = ErrorPopup(title_source=_("Error"), text=_("No Peachy Printer Detected"), details="%s\n%s" % (type(ex), ex))
         ep.open()
         App.get_running_app().root.current = 'mainui'
     self._switch_to_default_panel()
Beispiel #8
0
 def _print_file(self, filename, start_height=0.0, return_name='main_ui', force_source_speed=False):
     Logger.info("About to print {}".format(filename))
     self.return_to = return_name
     try:
         filepath = filename.encode('utf-8')
         self.print_api = self.api.get_print_api(start_height=start_height)
         self.path = os.path.basename(filepath)
         self.print_api.print_gcode(filepath, force_source_speed=force_source_speed)
         self._setup_print()
     except Exception as ex:
         raise
         popup = ErrorPopup(title='Error', text=str(ex), size_hint=(0.6, 0.6))
         popup.open()
         self.parent.current = self.return_to
Beispiel #9
0
 def turn_on(self):
     self.is_active = True
     try:
         self.calibration_api = self.api.get_calibration_api()
         self.calibration_api.subscribe_to_status(
             self.status_bar.update_message)
         self.calibration_api.show_point([0.5, 0.5, 0.0])
     except Exception as ex:
         import traceback
         traceback.print_exc()
         ep = ErrorPopup(title_source=_("Error"),
                         text=_("No Peachy Printer Detected"),
                         details="%s\n%s" % (type(ex), ex))
         ep.open()
         App.get_running_app().root.current = 'main_ui'
     self._switch_to_default_panel()
    def on_pre_enter(self):
        try:
            self.is_active = True
            self.configuration_api = self.api.get_configuration_api()
            dripper_type = self.configuration_api.get_dripper_type()
            self.ids.dripper_type_selector.selected = dripper_type
            self.dripper_type_changed(None, dripper_type)

            self.emulated_settings.drips_per_mm = self.configuration_api.get_dripper_drips_per_mm()
            self.circut_settings.drips_per_mm = self.configuration_api.get_dripper_drips_per_mm()
            self.circut_visuals.target_height = str(self.circut_setup.test_height)
            self.photo_settings.photo_zaxis_delay = self.configuration_api.get_dripper_photo_zaxis_delay()

        except:
            raise
            ep = ErrorPopup(title=_("Error"), text=_("No Peachy Printer Detected"))
            ep.open()
            App.get_running_app().root.current = 'mainui'