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