def temperature(self, extruder):
        temps = roboprinter.printer_instance._printer.get_current_temperatures(
        )
        current_temperature = [0, 0]

        if extruder in temps and 'actual' in temps[
                extruder] and 'target' in temps[extruder]:
            #check if temperature can be turned to int
            try:
                current_temperature = [
                    int(temps[extruder]['actual']),
                    int(temps[extruder]['target'])
                ]
            except Exception as e:
                if not self.heater_not_found:
                    Info_Popup(
                        lang.pack['Warning']['Heater_Not_Found'],
                        lang.pack['Warning']['Heater_Not_Found_Body']).show()
                    self.heater_not_found = True

        else:
            if not self.heater_not_found:
                Info_Popup(
                    lang.pack['Warning']['Heater_Not_Found'],
                    lang.pack['Warning']['Heater_Not_Found_Body']).show()
                self.heater_not_found = True

        return current_temperature
Example #2
0
    def collect_ext1_key(self, value):
        Logger.info("Ext1 Result is: " + str(value))
        if int(value) > 290:
            ep = Info_Popup(lang.pack['Preheat']['Errors']['Ext1_Error'],
                            lang.pack['Preheat']['Errors']['Ext1_Body'])
            value = 290
            ep.show()
        name = next(iter(self.selected_option))

        self.selected_option[name]['Extruder1'] = int(value)
        self.ext1_button.title = lang.pack['Preheat']['Edit_Preset'][
            'Ext'] + str(self.selected_option[name]
                         ['Extruder1']) + lang.pack['Preheat']['Celsius_Alone']
Example #3
0
    def collect_bed_key(self, value):
        Logger.info("Bed Result is: " + str(value))
        if int(value) > 100:
            ep = Info_Popup(lang.pack['Preheat']['Errors']['Bed_Error'],
                            lang.pack['Preheat']['Errors']['Bed_Body'])
            value = 100
            ep.show()
        name = next(iter(self.selected_option))

        self.selected_option[name]['Bed'] = int(
            value) if int(value) <= 100 else 100
        self.bed_button.title = lang.pack['Preheat']['Edit_Preset'][
            'Bed'] + str(self.selected_option[name]
                         ['Bed']) + lang.pack['Preheat']['Celsius_Alone']
Example #4
0
 def move_neg(self, axis):
     if axis == 'e' and self.temperature() < 175:
         Info_Popup(
             lang.pack['Warning']['Mintemp'],
             str(self.temperature()) +
             lang.pack['Warning']['Mintemp_Body']).show()
     else:
         self._move(axis, -self.parent.movement_mm)
    def temperature(self):
        temps = roboprinter.printer_instance._printer.get_current_temperatures(
        )
        current_temperature = 0.00
        if self.selected_tool in temps:
            current_temperature = int(temps[self.selected_tool]['actual'])
        else:
            if not self.warning_shown:
                Info_Popup(
                    lang.pack['Warning']['Heater_Not_Found'],
                    lang.pack['Warning']['Heater_Not_Found_Body']).show()
                self.warning_shown = True

        return current_temperature