diff --git a/access_control_python/__pycache__/face_processing.cpython-311.pyc b/access_control_python/__pycache__/face_processing.cpython-311.pyc index c89a052..9945fe6 100644 Binary files a/access_control_python/__pycache__/face_processing.cpython-311.pyc and b/access_control_python/__pycache__/face_processing.cpython-311.pyc differ diff --git a/access_control_python/face_processing.py b/access_control_python/face_processing.py index 59640d1..fbaa624 100644 --- a/access_control_python/face_processing.py +++ b/access_control_python/face_processing.py @@ -5,8 +5,8 @@ import requests import json #api_server = "http://localhost:5000" -api_server = "http://192.168.0.239:5000" -#api_server = "https://racist.siwatsystem.com" +#api_server = "http://192.168.0.239:5000" +api_server = "https://racist.siwatsystem.com" def analyze_face(img): endpoint = api_server +"/process_image" diff --git a/access_control_python/main.py b/access_control_python/main.py index 15f9f76..8b4406a 100644 --- a/access_control_python/main.py +++ b/access_control_python/main.py @@ -28,7 +28,7 @@ while True: time.sleep(1) #Try to identify face - faces = fp.identify_face(img, target_condidence=0.4) + faces = fp.identify_face(img, target_condidence=0.6) if(len(faces)>0): print("Door Unlocked!, Locking in 5 seconds") stm32.unlock_door() diff --git a/access_control_stm32/Core/Src/main.c b/access_control_stm32/Core/Src/main.c index dc0a673..498d90b 100644 --- a/access_control_stm32/Core/Src/main.c +++ b/access_control_stm32/Core/Src/main.c @@ -358,7 +358,7 @@ void startDoorHandleTask(void *argument) { if (door_lock_state != door_lock_state_command) { if (door_lock_state_command == DOOR_LOCK_LOCKED) { if (door_state == DOOR_STATE_CLOSED) { - HAL_GPIO_WritePin(DOOR_LOCK_PIN, DOOR_LOCK_BANK, 1); + HAL_GPIO_WritePin(DOOR_LOCK_BANK, DOOR_LOCK_PIN, 1); door_lock_state = DOOR_LOCK_LOCKED; door_lock_waiting = false; } else { @@ -373,14 +373,14 @@ void startDoorHandleTask(void *argument) { HAL_GPIO_WritePin(ALARM_BANK, ALARM_PIN, 1); } } else { - HAL_GPIO_WritePin(DOOR_LOCK_PIN, DOOR_LOCK_BANK, 1); + HAL_GPIO_WritePin(DOOR_LOCK_BANK, DOOR_LOCK_PIN, 1); door_lock_waiting = false; door_lock_state = DOOR_LOCK_LOCKED; } } } } else if (door_lock_state_command == DOOR_LOCK_UNLOCKED) { - HAL_GPIO_WritePin(DOOR_LOCK_PIN, DOOR_LOCK_BANK, 0); + HAL_GPIO_WritePin(DOOR_LOCK_BANK, DOOR_LOCK_PIN, 0); door_lock_state = DOOR_LOCK_UNLOCKED; door_lock_waiting = false; } diff --git a/access_control_stm32/Debug/Core/Src/main.o b/access_control_stm32/Debug/Core/Src/main.o index 382cb36..cff9ca3 100644 Binary files a/access_control_stm32/Debug/Core/Src/main.o and b/access_control_stm32/Debug/Core/Src/main.o differ diff --git a/access_control_stm32/Debug/access_control_stm32.elf b/access_control_stm32/Debug/access_control_stm32.elf index 1c2debe..ef6d609 100644 Binary files a/access_control_stm32/Debug/access_control_stm32.elf and b/access_control_stm32/Debug/access_control_stm32.elf differ diff --git a/access_control_stm32/Debug/access_control_stm32.list b/access_control_stm32/Debug/access_control_stm32.list index 1b3fd71..8afde39 100644 --- a/access_control_stm32/Debug/access_control_stm32.list +++ b/access_control_stm32/Debug/access_control_stm32.list @@ -974,10 +974,10 @@ void startDoorHandleTask(void *argument) { 800088a: 781b ldrb r3, [r3, #0] 800088c: 2b00 cmp r3, #0 800088e: d00c beq.n 80008aa - HAL_GPIO_WritePin(DOOR_LOCK_PIN, DOOR_LOCK_BANK, 1); + HAL_GPIO_WritePin(DOOR_LOCK_BANK, DOOR_LOCK_PIN, 1); 8000890: 2201 movs r2, #1 - 8000892: 2100 movs r1, #0 - 8000894: f44f 7000 mov.w r0, #512 ; 0x200 + 8000892: f44f 7100 mov.w r1, #512 ; 0x200 + 8000896: 4846 ldr r0, [pc, #280] ; (80009b0 ) 8000898: f000 fcb4 bl 8001204 door_lock_state = DOOR_LOCK_LOCKED; 800089c: 4b46 ldr r3, [pc, #280] ; (80009b8 ) @@ -1037,10 +1037,10 @@ void startDoorHandleTask(void *argument) { 80008fc: e01f b.n 800093e } } else { - HAL_GPIO_WritePin(DOOR_LOCK_PIN, DOOR_LOCK_BANK, 1); + HAL_GPIO_WritePin(DOOR_LOCK_BANK, DOOR_LOCK_PIN, 1); 80008fe: 2201 movs r2, #1 - 8000900: 2100 movs r1, #0 - 8000902: f44f 7000 mov.w r0, #512 ; 0x200 + 8000900: f44f 7100 mov.w r1, #512 ; 0x200 + 8000904: 482a ldr r0, [pc, #168] ; (80009b0 ) 8000906: f000 fc7d bl 8001204 door_lock_waiting = false; 800090a: 4b2d ldr r3, [pc, #180] ; (80009c0 ) @@ -1061,10 +1061,10 @@ void startDoorHandleTask(void *argument) { 8000920: b2db uxtb r3, r3 8000922: 2b00 cmp r3, #0 8000924: d00b beq.n 800093e - HAL_GPIO_WritePin(DOOR_LOCK_PIN, DOOR_LOCK_BANK, 0); + HAL_GPIO_WritePin(DOOR_LOCK_BANK, DOOR_LOCK_PIN, 0); 8000926: 2200 movs r2, #0 - 8000928: 2100 movs r1, #0 - 800092a: f44f 7000 mov.w r0, #512 ; 0x200 + 8000928: f44f 7100 mov.w r1, #512 ; 0x200 + 800092c: 4820 ldr r0, [pc, #128] ; (80009b0 ) 800092e: f000 fc69 bl 8001204 door_lock_state = DOOR_LOCK_UNLOCKED; 8000932: 4b21 ldr r3, [pc, #132] ; (80009b8 )