From 0f37b63456cbe19e49cc536572fb63181f2adfdd Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Thu, 28 Sep 2023 15:17:04 +0700 Subject: [PATCH] test --- .../face_processing.cpython-311.pyc | Bin 1960 -> 1965 bytes access_control_python/face_processing.py | 4 ++-- access_control_python/main.py | 2 +- access_control_stm32/Core/Src/main.c | 6 +++--- access_control_stm32/Debug/Core/Src/main.o | Bin 817664 -> 817664 bytes .../Debug/access_control_stm32.elf | Bin 1015224 -> 1015224 bytes .../Debug/access_control_stm32.list | 18 +++++++++--------- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/access_control_python/__pycache__/face_processing.cpython-311.pyc b/access_control_python/__pycache__/face_processing.cpython-311.pyc index c89a0525f4a47fbb6d29b48a672820ed255e3d22..9945fe6d193132f4e5debd040d2132049771f4d8 100644 GIT binary patch delta 67 zcmZ3%zm}hCIWI340}yO&naGtZFPBkLQc!HAuV0jyoLO9=SDaa%SW;YBT#}lrmzlvf6|4XN delta 62 zcmZ3>zk;7@IWI340}wPdP2|dzlFTS6DX`MlH?%a;Gc>c%Gte_KwzM)eFfiCS?FJhM Q8v~za1J?(($z|;30N;uaqW}N^ 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 382cb3696daea2c240e7859a6bc1d37caabc8ab1..cff9ca334ef5868aac543b2ff1cf9c3e34970e3b 100644 GIT binary patch delta 91 zcmZqpV%YG-aKj;XHvcaSg>D{`Pq1fznOYu`%{Y|6Oa+hTIF9x>4n`nm0%B$$W&vVW ZAZ7z%b|41Ha{@6J5OZ&jriFAN2fPq1gem}VSGP-b%+M|&IxBM>tIF*6Xe05K~NvjH(X U5QF47ftU-3xwpr0@GL3>06twBr2qf` diff --git a/access_control_stm32/Debug/access_control_stm32.elf b/access_control_stm32/Debug/access_control_stm32.elf index 1c2debede06643b2afc66e0d7937f61f434c4438..ef6d6096a95e6b81e65e029fdcc9c2993ba394c9 100644 GIT binary patch delta 104 zcmdn-+jhrq+lDQSlQ`J?zc3WKc}$_E%`#GF9P1;pGy%mc){K+LyYkCVTv1OO{b8gBpq 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 )