Esempio n. 1
0
    def parseBracketSquare(self, line):
        pat = POSPAT.match(line)
        if pat:
            if pat.group(1) == "PRB":
                OCV.CD["prbx"] = float(pat.group(2))
                OCV.CD["prby"] = float(pat.group(3))
                OCV.CD["prbz"] = float(pat.group(4))

                self.master.gcode.probe.add(
                    OCV.CD["prbx"] + OCV.CD["wx"] - OCV.CD["mx"],
                    OCV.CD["prby"] + OCV.CD["wy"] - OCV.CD["my"],
                    OCV.CD["prbz"] + OCV.CD["wz"] - OCV.CD["mz"])
                self.master._probeUpdate = True
            OCV.CD[pat.group(1)] = \
                [float(pat.group(2)),
                 float(pat.group(3)),
                 float(pat.group(4))]
        else:
            pat = TLOPAT.match(line)
            if pat:
                OCV.CD[pat.group(1)] = pat.group(2)
                self.master._probeUpdate = True
            elif DOLLARPAT.match(line):
                OCV.CD["G"] = line[1:-1].split()
                CNC.updateG()
                self.master._gUpdate = True
Esempio n. 2
0
 def parseBracketSquare(self, line):
     pat = POSPAT.match(line)
     if pat:
         if pat.group(1) == "PRB":
             CNC.vars["prbx"] = float(pat.group(2))
             CNC.vars["prby"] = float(pat.group(3))
             CNC.vars["prbz"] = float(pat.group(4))
             #if self.running:
             self.master.gcode.probe.add(
                 CNC.vars["prbx"] + CNC.vars["wx"] - CNC.vars["mx"],
                 CNC.vars["prby"] + CNC.vars["wy"] - CNC.vars["my"],
                 CNC.vars["prbz"] + CNC.vars["wz"] - CNC.vars["mz"])
             self.master._probeUpdate = True
         CNC.vars[pat.group(1)] = \
          [float(pat.group(2)),
           float(pat.group(3)),
           float(pat.group(4))]
     else:
         pat = TLOPAT.match(line)
         if pat:
             CNC.vars[pat.group(1)] = pat.group(2)
             self.master._probeUpdate = True
         elif DOLLARPAT.match(line):
             CNC.vars["G"] = line[1:-1].split()
             CNC.updateG()
             self.master._gUpdate = True
Esempio n. 3
0
	def parseBracketSquare(self, line):
		pat = POSPAT.match(line)
		if pat:
			if pat.group(1) == "PRB":
				CNC.vars["prbx"] = float(pat.group(2))
				CNC.vars["prby"] = float(pat.group(3))
				CNC.vars["prbz"] = float(pat.group(4))
				#if self.running:
				self.master.gcode.probe.add(
					 CNC.vars["prbx"]
					+CNC.vars["wx"]
					-CNC.vars["mx"],
					 CNC.vars["prby"]
					+CNC.vars["wy"]
					-CNC.vars["my"],
					 CNC.vars["prbz"]
					+CNC.vars["wz"]
					-CNC.vars["mz"])
				self.master._probeUpdate = True
			CNC.vars[pat.group(1)] = \
				[float(pat.group(2)),
				 float(pat.group(3)),
				 float(pat.group(4))]
		else:
			pat = TLOPAT.match(line)
			if pat:
				CNC.vars[pat.group(1)] = pat.group(2)
				self.master._probeUpdate = True
			elif DOLLARPAT.match(line):
				CNC.vars["G"] = line[1:-1].split()
				CNC.updateG()
				self.master._gUpdate = True