diff --git a/LoRaWAN/App/lora_app.c b/LoRaWAN/App/lora_app.c index 0a5f6f3..25efab1 100644 --- a/LoRaWAN/App/lora_app.c +++ b/LoRaWAN/App/lora_app.c @@ -76,7 +76,7 @@ extern volatile uint8_t sts_hall3_read, sts_hall4_read; extern volatile uint8_t sts_pir_state; extern volatile uint8_t last_sts_hall1_read, last_sts_hall2_read, last_sts_hall3_read, last_sts_hall4_read; volatile uint8_t sts_PIR_read = 0; -volatile bool locklow = true; +volatile bool locklow = false; volatile uint32_t lowin=0; volatile bool takelowTime; /* USER CODE END EV */ @@ -699,7 +699,7 @@ void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin) UTIL_SEQ_SetTask((1 << CFG_SEQ_Task_LoRaStoreContextEvent), CFG_SEQ_Prio_0); break; #endif -#if 0 +#if 1 case PIR_Pin: sts_pir_state = PIR_STATE; printf("\r\n pir state =%u \r\n", sts_pir_state); @@ -723,8 +723,8 @@ void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin) printf("\r\n lowin start at: %u \r\n", lowin); takelowTime = false; } - printf("\r\n low duration=%d \r\n", check_time-lowin); - if ((!locklow && (check_time - lowin >= 5000))) { + //printf("\r\n low duration=%d \r\n", check_time-lowin); + if ((!locklow && (check_time - lowin >= 50))) { printf("\r\n low duration=%d \r\n", check_time-lowin); sts_PIR_read = 0; locklow = true; diff --git a/STM32CubeIDE/Release/WLE5CC_NODE_STS.bin b/STM32CubeIDE/Release/WLE5CC_NODE_STS.bin index 1aac123..f152181 100644 Binary files a/STM32CubeIDE/Release/WLE5CC_NODE_STS.bin and b/STM32CubeIDE/Release/WLE5CC_NODE_STS.bin differ diff --git a/STM32CubeIDE/Release/WLE5CC_NODE_STS.elf b/STM32CubeIDE/Release/WLE5CC_NODE_STS.elf index fbe6da3..229e673 100644 Binary files a/STM32CubeIDE/Release/WLE5CC_NODE_STS.elf and b/STM32CubeIDE/Release/WLE5CC_NODE_STS.elf differ