wip
This commit is contained in:
parent
e4126783fb
commit
1a4998a659
|
@ -44,9 +44,10 @@
|
||||||
#ifdef VL53L0
|
#ifdef VL53L0
|
||||||
#include "X-WL55_WLE5_53L0X.h"
|
#include "X-WL55_WLE5_53L0X.h"
|
||||||
#endif
|
#endif
|
||||||
#ifdef STS_P2
|
#if defined(STS_P2)||defined(STS_T6)
|
||||||
#include "app_tof.h"
|
#include "app_tof.h"
|
||||||
#include "app_tof_peoplecount.h"
|
#include "app_tof_peoplecount.h"
|
||||||
|
extern volatile uint8_t sts_door_jam_profile;
|
||||||
#endif
|
#endif
|
||||||
volatile sts_cfg_nvm_t sts_cfg_nvm = {
|
volatile sts_cfg_nvm_t sts_cfg_nvm = {
|
||||||
sts_mtmcode1,
|
sts_mtmcode1,
|
||||||
|
@ -119,6 +120,9 @@ static void STS_Show_STS_CFG_NVM(uint8_t * nvm_store_value);
|
||||||
extern volatile int sts_tof_distance_data[MAX_TOF_COUNT];
|
extern volatile int sts_tof_distance_data[MAX_TOF_COUNT];
|
||||||
volatile sts_tof_range_data_t sts_range_sensor_data={0x0,0x0,0x0};
|
volatile sts_tof_range_data_t sts_range_sensor_data={0x0,0x0,0x0};
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(STS_P2)||defined(STS_T6)
|
||||||
|
volatile uint8_t sts_door_jam_profile = 0;
|
||||||
|
#endif
|
||||||
#ifdef STS_R4
|
#ifdef STS_R4
|
||||||
volatile uint8_t sts_soap_level_state=0;
|
volatile uint8_t sts_soap_level_state=0;
|
||||||
void STS_R4_sensor_read(sts_r_sensor_data_t *sts_r_sensor_data);
|
void STS_R4_sensor_read(sts_r_sensor_data_t *sts_r_sensor_data);
|
||||||
|
@ -1702,7 +1706,7 @@ void STS_SENSOR_Function_Test_Process(void)
|
||||||
tstbuf[i++] = (uint8_t) sts_hardware_ver;
|
tstbuf[i++] = (uint8_t) sts_hardware_ver;
|
||||||
tstbuf[i++] = (uint8_t) (99*GetBatteryLevel()/254)&0xff;
|
tstbuf[i++] = (uint8_t) (99*GetBatteryLevel()/254)&0xff;
|
||||||
|
|
||||||
#ifdef STS_P2
|
#if (defined(STS_P2)||defined(STS_T6))
|
||||||
STS_SENSOR_MEMS_Get_ID(&sensor_id);
|
STS_SENSOR_MEMS_Get_ID(&sensor_id);
|
||||||
|
|
||||||
if (((sensor_id & 0xff)!= 0xCC) && (((sensor_id >>8) & 0xFF)!=0xEA)) // no VL53L1X found
|
if (((sensor_id & 0xff)!= 0xCC) && (((sensor_id >>8) & 0xFF)!=0xEA)) // no VL53L1X found
|
||||||
|
@ -1716,6 +1720,23 @@ void STS_SENSOR_Function_Test_Process(void)
|
||||||
tstbuf[i++] = (uint8_t) (sts_sensor_install_height>>8)&0xff; // MSB of sensor height
|
tstbuf[i++] = (uint8_t) (sts_sensor_install_height>>8)&0xff; // MSB of sensor height
|
||||||
tstbuf[i++] = (uint8_t) (sts_sensor_install_height)&0xff; // LSB of sensor height
|
tstbuf[i++] = (uint8_t) (sts_sensor_install_height)&0xff; // LSB of sensor height
|
||||||
}
|
}
|
||||||
|
/* */
|
||||||
|
/* for STS_P2, set ppc_config -> door_jam_profile and distance threshold accordingly */
|
||||||
|
/* */
|
||||||
|
|
||||||
|
if ((sts_sensor_install_height >= 1500)&&(sts_sensor_install_height<=4000))
|
||||||
|
{
|
||||||
|
sts_door_jam_profile = DOOR_JAM_2000; // DOOR_JAM_2000: assume door_jame less 2000mm
|
||||||
|
|
||||||
|
if (sts_sensor_install_height > 2000)
|
||||||
|
sts_door_jam_profile ++; //DOOR_JAM_2400
|
||||||
|
if (sts_sensor_install_height > 2400)
|
||||||
|
sts_door_jam_profile ++; //DOOR_JAM_3000
|
||||||
|
if (sts_sensor_install_height > 3000)
|
||||||
|
sts_door_jam_profile ++; //DOOR_JAM_3500
|
||||||
|
if (sts_sensor_install_height > 3500)
|
||||||
|
sts_door_jam_profile ++; //DOOR_JAM_4000
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef YUNHORN_STS_O6_ENABLED
|
#ifdef YUNHORN_STS_O6_ENABLED
|
||||||
tstbuf[i++] = (uint8_t)20; //length of following data
|
tstbuf[i++] = (uint8_t)20; //length of following data
|
||||||
|
|
|
@ -32,7 +32,7 @@ volatile sts_zone_center_by_rows_of_spads_t zone_center[3]={
|
||||||
{6, 159, 239},
|
{6, 159, 239},
|
||||||
{8, 175, 231},
|
{8, 175, 231},
|
||||||
};
|
};
|
||||||
volatile uint8_t sts_distance_mode = DOOR_JAM_3000;
|
volatile uint8_t sts_distance_mode = sts_door_jam_profile; //DOOR_JAM_3000;
|
||||||
volatile uint8_t sts_people_count_number_changed = 0;
|
volatile uint8_t sts_people_count_number_changed = 0;
|
||||||
static uint32_t cnt_today=0, cnt_week=0;
|
static uint32_t cnt_today=0, cnt_week=0;
|
||||||
static uint8_t last_year=0, this_year=0,last_month=0, this_month=0,last_week=0, this_week=0,last_day=0, this_day=0;
|
static uint8_t last_year=0, this_year=0,last_month=0, this_month=0,last_week=0, this_week=0,last_day=0, this_day=0;
|
||||||
|
|
Loading…
Reference in New Issue