Example #1
0
    def get_extruder_temperature(self):
        """ Measure extruder temperature.
        :return: temperature in Celsius.
        """
        temp = upcom.getParam(PARA.GET_NOZZLE1_TEMP)
        try:
            ftemp = fh.float_from_hex(temp)
            if ftemp < 10.0:
                target_temp = upcom.getParam(PARA.PARA_GET_TARGET_TEMP_1)
                ftemp *= target_temp

            return ftemp
        except Exception as e:
            logger.error("get_extruder_temp: {}.. rawTemp {}".format(e, temp))
            raise Hal.HalException(e)
Example #2
0
 def getTimeRemaining(self):
     return upcom.getParam(PARA.PARA_REPORT_TIME_REMAIN)
Example #3
0
 def getHeight(self):
     height = upcom.getParam(PARA.PARA_REPORT_HEIGHT)
     return fh.float_from_hex(height)
Example #4
0
 def getLayer(self):
     return upcom.getParam(PARA.PARA_REPORT_LAYER)
Example #5
0
 def getPercentage(self):
     return upcom.getParam(PARA.PARA_REPORT_PERCENT)
Example #6
0
 def get_system_state(self) -> SystemState:
     state = upcom.getParam(0x10)
     if state > SystemState.unknown_error:
         return SystemState.unknown_error
     return SystemState(state)
Example #7
0
 def get_program_state(self) -> ProgramState:
     state = upcom.getParam(0x01)
     if state > ProgramState.have_errors:
         return ProgramState.have_errors
     return ProgramState(state)
Example #8
0
 def get_machine_state(self) -> MachineState:
     state = upcom.getParam(0x00)
     if state > MachineState.unknown_status:
         return MachineState.unknown_status
     return MachineState(state)
Example #9
0
 def get_job_percent(self):
     return upcom.getParam(PARA.PARA_REPORT_PERCENT)