김유현

Modify doorlock process

......@@ -90,7 +90,7 @@ class Devices(APIView) :
}, status = status.HTTP_400_BAD_REQUEST)
# 기기 추가 요청
def put(self, request, format = None) :
def put(self, request, device_id, format = None) :
try :
if request.auth == None :
raise PermissionDenied
......
......@@ -47,9 +47,9 @@ class Motor:
def rotate(self, command):
if command == "open":
self.p.ChangeDutyCycle(12.5)
self.p.ChangeDutyCycle(7.5)
else:
self.p.ChangeDutyCycle(2.5)
self.p.ChangeDutyCycle(12.5)
def stop(self):
self.p.ChangeDutyCycle(0)
......@@ -110,6 +110,7 @@ def RFIDProcess(signalQueue):
print("1-2 Open Door")
try:
if not findDevice: # if not devices.find(deviceId)
sound.print_wrong_sound()
print("등록되지 않은 RFID 장치") # raise
pass
else:
......