diff --git a/RPi_Client/CoAPthon3/coapclient.py b/RPi_Client/CoAPthon3/coapclient.py index 2bb67af110730f74b0df7f8c0ae2f50f0abdc8e1..622317e36602f98c590ec661a4012a6de5d3b642 100644 --- a/RPi_Client/CoAPthon3/coapclient.py +++ b/RPi_Client/CoAPthon3/coapclient.py @@ -154,7 +154,7 @@ class CoapClient(): if distance < h: ad = 0 else: - ad = sqrt(distance * distance - h * h) + ad = math.sqrt(distance * distance - h * h) payload = { 'rpuuid' : self.myuuid, diff --git a/Server_CoAP/CoAPthon3/exampleresources.py b/Server_CoAP/CoAPthon3/exampleresources.py index 07b0e9179ff2fb526098669faf74af6204f9e415..cba1937abc044b842bb68ad6f90415b9088f9a3a 100644 --- a/Server_CoAP/CoAPthon3/exampleresources.py +++ b/Server_CoAP/CoAPthon3/exampleresources.py @@ -50,7 +50,6 @@ class RpNodeInfoResource(Resource): return self, response def postRpNodeInfoInDB(self, info): # complete - info = info['rpMAC'] cursor = self.collection.find({'rpMAC' : info['rpMAC']}) if len(list(cursor)) == 1: rpuuid = cursor[0]['rpuuid']