Showing
2 changed files
with
4 additions
and
3 deletions
| ... | @@ -90,7 +90,7 @@ class Devices(APIView) : | ... | @@ -90,7 +90,7 @@ class Devices(APIView) : |
| 90 | }, status = status.HTTP_400_BAD_REQUEST) | 90 | }, status = status.HTTP_400_BAD_REQUEST) |
| 91 | 91 | ||
| 92 | # 기기 추가 요청 | 92 | # 기기 추가 요청 |
| 93 | - def put(self, request, format = None) : | 93 | + def put(self, request, device_id, format = None) : |
| 94 | try : | 94 | try : |
| 95 | if request.auth == None : | 95 | if request.auth == None : |
| 96 | raise PermissionDenied | 96 | raise PermissionDenied | ... | ... |
| ... | @@ -47,9 +47,9 @@ class Motor: | ... | @@ -47,9 +47,9 @@ class Motor: |
| 47 | 47 | ||
| 48 | def rotate(self, command): | 48 | def rotate(self, command): |
| 49 | if command == "open": | 49 | if command == "open": |
| 50 | - self.p.ChangeDutyCycle(12.5) | 50 | + self.p.ChangeDutyCycle(7.5) |
| 51 | else: | 51 | else: |
| 52 | - self.p.ChangeDutyCycle(2.5) | 52 | + self.p.ChangeDutyCycle(12.5) |
| 53 | 53 | ||
| 54 | def stop(self): | 54 | def stop(self): |
| 55 | self.p.ChangeDutyCycle(0) | 55 | self.p.ChangeDutyCycle(0) |
| ... | @@ -110,6 +110,7 @@ def RFIDProcess(signalQueue): | ... | @@ -110,6 +110,7 @@ def RFIDProcess(signalQueue): |
| 110 | print("1-2 Open Door") | 110 | print("1-2 Open Door") |
| 111 | try: | 111 | try: |
| 112 | if not findDevice: # if not devices.find(deviceId) | 112 | if not findDevice: # if not devices.find(deviceId) |
| 113 | + sound.print_wrong_sound() | ||
| 113 | print("등록되지 않은 RFID 장치") # raise | 114 | print("등록되지 않은 RFID 장치") # raise |
| 114 | pass | 115 | pass |
| 115 | else: | 116 | else: | ... | ... |
-
Please register or login to post a comment