initial STS_O5

This commit is contained in:
Yunhorn 2023-11-02 17:19:56 +08:00
parent b2c4ee3eb8
commit 511e3cd0eb
2 changed files with 18 additions and 1 deletions

View File

@ -44,7 +44,7 @@
//#define USE_TOF_VL53L1X
#define STS_USE_TOF_VL53L0X 1U
#define YUNHORN_STS_R5_ENABLED
#define YUNHORN_STS_O5_ENABLED
// TOF VL53LX number
//#define USE_MEMS_ADXL345
//#define USE_ACCONEER_A111

View File

@ -168,6 +168,23 @@ void STS_YunhornSTSEventRFAC_Process(void)
void STS_YunhornSTSEventP1_Process(void)
{
#if defined(YUNHORN_STS_O5_ENABLED)
if ((sts_work_mode == STS_WIRED_MODE) || (sts_work_mode == STS_REEDSWITCH_MODE) || (sts_work_mode == STS_DUAL_MODE))
{
STS_Reed_Hall_Presence_Detection();
if (sts_reed_hall_result == last_sts_reed_hall_result) {
sts_reed_hall_changed_flag = 0;
} else {
sts_reed_hall_changed_flag = 1;
STS_Combined_Status_Processing();
}
last_sts_reed_hall_result = sts_reed_hall_result;
}
#endif
#if (defined(YUNHORN_STS_O6_ENABLED) && defined(USE_ACCONEER_A111))
if ((sts_work_mode == STS_WIRED_MODE) || (sts_work_mode == STS_REEDSWITCH_MODE) || (sts_work_mode == STS_DUAL_MODE))
{