wip
This commit is contained in:
parent
884487f01e
commit
969a892d33
|
@ -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 sts_pir_state;
|
||||||
extern volatile uint8_t last_sts_hall1_read, last_sts_hall2_read, last_sts_hall3_read, last_sts_hall4_read;
|
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 uint8_t sts_PIR_read = 0;
|
||||||
volatile bool locklow = true;
|
volatile bool locklow = false;
|
||||||
volatile uint32_t lowin=0;
|
volatile uint32_t lowin=0;
|
||||||
volatile bool takelowTime;
|
volatile bool takelowTime;
|
||||||
/* USER CODE END EV */
|
/* 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);
|
UTIL_SEQ_SetTask((1 << CFG_SEQ_Task_LoRaStoreContextEvent), CFG_SEQ_Prio_0);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
#if 0
|
#if 1
|
||||||
case PIR_Pin:
|
case PIR_Pin:
|
||||||
sts_pir_state = PIR_STATE;
|
sts_pir_state = PIR_STATE;
|
||||||
printf("\r\n pir state =%u \r\n", sts_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);
|
printf("\r\n lowin start at: %u \r\n", lowin);
|
||||||
takelowTime = false;
|
takelowTime = false;
|
||||||
}
|
}
|
||||||
printf("\r\n low duration=%d \r\n", check_time-lowin);
|
//printf("\r\n low duration=%d \r\n", check_time-lowin);
|
||||||
if ((!locklow && (check_time - lowin >= 5000))) {
|
if ((!locklow && (check_time - lowin >= 50))) {
|
||||||
printf("\r\n low duration=%d \r\n", check_time-lowin);
|
printf("\r\n low duration=%d \r\n", check_time-lowin);
|
||||||
sts_PIR_read = 0;
|
sts_PIR_read = 0;
|
||||||
locklow = true;
|
locklow = true;
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue