예제 #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)
예제 #2
0
 def getTimeRemaining(self):
     return upcom.getParam(PARA.PARA_REPORT_TIME_REMAIN)
예제 #3
0
 def getHeight(self):
     height = upcom.getParam(PARA.PARA_REPORT_HEIGHT)
     return fh.float_from_hex(height)
예제 #4
0
 def getLayer(self):
     return upcom.getParam(PARA.PARA_REPORT_LAYER)
예제 #5
0
 def getPercentage(self):
     return upcom.getParam(PARA.PARA_REPORT_PERCENT)
예제 #6
0
 def get_system_state(self) -> SystemState:
     state = upcom.getParam(0x10)
     if state > SystemState.unknown_error:
         return SystemState.unknown_error
     return SystemState(state)
예제 #7
0
 def get_program_state(self) -> ProgramState:
     state = upcom.getParam(0x01)
     if state > ProgramState.have_errors:
         return ProgramState.have_errors
     return ProgramState(state)
예제 #8
0
 def get_machine_state(self) -> MachineState:
     state = upcom.getParam(0x00)
     if state > MachineState.unknown_status:
         return MachineState.unknown_status
     return MachineState(state)
예제 #9
0
 def get_job_percent(self):
     return upcom.getParam(PARA.PARA_REPORT_PERCENT)