def __init__(self,filePath=None): Task.__init__(self,"print") self.logger=logging.getLogger("dobozweb.core.Automation.PrintTask") self.logger.setLevel(logging.ERROR) self.filePath=filePath self.totalLines=1 self.lastLine=None self.currentLine=0#for post error recup self.reconnectionCommand=None self.currentLayer=0#for layer counting self.totalLayers=0 self.currentLayerValue=0#the actual z component self.pointCloud=PointCloud() self.source=None self.recoveryMode=False self.doLayerAnalysis=False """For all things related to the print positioning tracking """ self.gcodeParser=GCodeParser() """For the history of all previous commands this will need to be replaced with something more robust in the future""" self.gcodeHistoryMaxSize=100 self.gcodeHistoryIndex=0 self.gcodeHistory=[]
def __init__(self,delay=0): Thread.__init__(self) Task.__init__(self,"Timer") self.logger=logging.getLogger("dobozweb.core.Automation.TimerTask") self.logger.setLevel(logging.ERROR) self.delay=delay self.finished=Event()
def __init__(self,scanWidth=1,scanLength=1,resolution=1,passes=1,filePath=None,saveScan=False): Task.__init__(self,"scan") self.logger=logging.getLogger("dobozweb.core.Automation.ScanTask") self.logger.setLevel(logging.ERROR) self.width=scanWidth self.length=scanLength self.resolution=resolution self.filePath=filePath self.saveScan=saveScan self.pointCloud=PointCloud() self.pointCloudBuilder=PointCloudBuilder(resolution=resolution,width=scanWidth,length=scanLength,passes=passes) totalPoints=(int(scanWidth/resolution)+1)*(int(scanLength/resolution)+1)*passes self.logger.info("Total scan points %d",totalPoints) self.progressFraction=float(100.00/float(totalPoints)) self.logger.info("Progress Fraction set by scan to %s",str(self.progressFraction)) self.logger.critical("Task Init Done")