Skip to content
Snippets Groups Projects
Commit b74d7d87 authored by 남성찬's avatar 남성찬
Browse files

last coapcliet.py

parent 4bd76e51
Branches
No related tags found
No related merge requests found
...@@ -143,7 +143,7 @@ class CoapClient(): ...@@ -143,7 +143,7 @@ class CoapClient():
n = 2.2 n = 2.2
distance = math.pow(10, (float(info[4]) - float(info[5])) / (10 * n)) distance = math.pow(10, (float(info[4]) - float(info[5])) / (10 * n))
payload = { payload = {
'rasbpID' : self.myuuid, 'rasbpuuid' : self.myuuid,
'uuid' : info[1], 'uuid' : info[1],
'distance' : distance, 'distance' : distance,
'updateTime' : time.time() 'updateTime' : time.time()
...@@ -188,9 +188,9 @@ def main(): ...@@ -188,9 +188,9 @@ def main():
measuringDevice = CoapClient() measuringDevice = CoapClient()
measuringDevice.advertiseMe() measuringDevice.advertiseMe()
measuringDevice.calculateNodePositionAtServer() measuringDevice.calculateNodePositionAtServer()
#putBLEInfoThread = threading.Thread(target = measuringDevice.putBLEInfo) putBLEInfoThread = threading.Thread(target = measuringDevice.putBLEInfo)
#putBLEInfoThread.start() putBLEInfoThread.start()
#putBLEInfoThread.join() putBLEInfoThread.join()
if __name__ == "__main__": if __name__ == "__main__":
main() main()
\ No newline at end of file
...@@ -59,7 +59,7 @@ class BeaconEmit(): ...@@ -59,7 +59,7 @@ class BeaconEmit():
def beacon_Start(self, _str): def beacon_Start(self, _str):
try: try:
startTime = time.time() startTime = time.time()
repeatTime = 1 # code test를 위해 짧게 함 원래는 10 repeatTime = 10
print ("BLE EMIT START") print ("BLE EMIT START")
while True: while True:
if time.time() - startTime > repeatTime: if time.time() - startTime > repeatTime:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment