From 4b8e09c28e9166f6b358bd0cfac074b7bbc28dc0 Mon Sep 17 00:00:00 2001 From: "Server (Shared Users)" <shmd01.iptime.org> Date: Sun, 8 Dec 2019 07:33:14 +0000 Subject: [PATCH] revise --- RPi_Client/CoAPthon3/coapclient.py | 2 +- Server_CoAP/CoAPthon3/exampleresources.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/RPi_Client/CoAPthon3/coapclient.py b/RPi_Client/CoAPthon3/coapclient.py index 2bb67af..622317e 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 07b0e91..cba1937 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'] -- GitLab