Esempio n. 1
0
	def fromString(cls, inputString):
		data = json.loads(inputString)
		args = {
			'nodes': []
		}
		for node in data:
			args['nodes'].append(Point.fromJson(json.dumps(node)))
		return cls(args)
Esempio n. 2
0
	def getPos(self):
		"""Gets the position from server, and updates internal 
		coordinates in Nav module.
		"""
		r = requests.get(Nav.HOST_ADDR + '/heartbeat/location')
		self.__model['currLoc'] = Point.fromJson(r.text)