def get_posang(self): self.ser2.write('B') while self.ser2.inWaiting() < 12: continue raw_data = self.ser2.read(12) self.all_data = utils.dataconvert(raw_data) return self.all_data
def getcord(self): self.ser2.write('B') while self.ser2.inWaiting() < 12: continue data = self.ser2.read(12) cord = dataconvert(data) return cord