better p cmd config
This commit is contained in:
parent
5d71dbc6a8
commit
4640c625a5
|
@ -344,7 +344,7 @@ static void print_current_configuration(acc_detector_presence_configuration_t pr
|
|||
float sts_run_f_intra_frame_weight = sts_run_filter.intra_frame_weight;
|
||||
float sts_run_f_output_time_const = sts_run_filter.output_time_const;
|
||||
|
||||
APP_LOG(TS_OFF, VLEVEL_H, "\r\nWork_mode:%2d Start: %4d (mm) Length: %4d (mm) Threshold: %4d (*) Gain= %2d (%) UpdateRate=%4d Profile= %d \r\n",
|
||||
APP_LOG(TS_OFF, VLEVEL_M, "\r\nWork_mode:%2d Start: %4d (mm) Length: %4d (mm) Threshold: %4d (*) Gain= %2d (%) UpdateRate=%4d Profile= %d \r\n",
|
||||
sts_work_mode, (int)(1000.0*sts_run_start), (int)(1000.0*sts_run_length), (int)(1000.0*sts_run_threshold),
|
||||
(int)(100.0*sts_run_gain),(int)sts_run_update_rate, (int)sts_run_profile);
|
||||
|
||||
|
@ -399,7 +399,7 @@ int sts_presence_rss_fall_rise_detection(void)
|
|||
|
||||
if ((sts_rss_config_updated_flag != STS_RSS_CONFIG_NON) || (sts_rss_init_ok != 1))
|
||||
{
|
||||
APP_LOG(TS_OFF, VLEVEL_H, "\r\n ------ ---------- rss cfg update flag=%02x \r\n", sts_rss_config_updated_flag);
|
||||
APP_LOG(TS_OFF, VLEVEL_M, "\r\n ------ ---------- rss cfg update flag=%02x \r\n", sts_rss_config_updated_flag);
|
||||
|
||||
|
||||
if (sts_rss_init_ok==0)
|
||||
|
@ -407,12 +407,12 @@ int sts_presence_rss_fall_rise_detection(void)
|
|||
if (sts_work_mode ==STS_UNI_MODE) sts_rss_config_updated_flag |= STS_RSS_CONFIG_FALL_DETECTION;
|
||||
else if ((sts_work_mode == STS_RSS_MODE) || (sts_work_mode == STS_DUAL_MODE)) sts_rss_config_updated_flag |= STS_RSS_CONFIG_DEFAULT;
|
||||
set_default_configuration(presence_configuration);
|
||||
APP_LOG(TS_OFF, VLEVEL_H, "\r\n First Time RSS init, update flag=%02x\r\n", sts_rss_config_updated_flag);
|
||||
APP_LOG(TS_OFF, VLEVEL_M, "\r\n First Time RSS init, update flag=%02x\r\n", sts_rss_config_updated_flag);
|
||||
print_current_configuration(presence_configuration);
|
||||
sts_rss_init_ok = 1;
|
||||
}
|
||||
|
||||
APP_LOG(TS_OFF, VLEVEL_H, "\r\n Update flag=%02x, workmode=%2d \r\n", sts_rss_config_updated_flag, sts_work_mode);
|
||||
APP_LOG(TS_OFF, VLEVEL_M, "\r\n Update flag=%02x, workmode=%2d \r\n", sts_rss_config_updated_flag, sts_work_mode);
|
||||
switch (sts_rss_config_updated_flag)
|
||||
{
|
||||
#if 0
|
||||
|
|
|
@ -715,7 +715,8 @@ void STS_PRESENCE_SENSOR_NVM_CFG(void)
|
|||
sts_presence_rss_config.default_downsampling_factor = (float)(sts_cfg_nvm.p[RSS_CFG_DOWNSAMPLING_FACTOR]);
|
||||
sts_presence_rss_config.default_power_save_mode = (float)(sts_cfg_nvm.p[RSS_CFG_POWER_MODE]);
|
||||
|
||||
sts_rss_config_updated_flag = (sts_rss_config_updated_flag|STS_RSS_CONFIG_FULL); //set to 2 for FULL config effect in next detection
|
||||
// sts_rss_config_updated_flag = (sts_rss_config_updated_flag|STS_RSS_CONFIG_FULL); //set to 2 for FULL config effect in next detection
|
||||
sts_rss_config_updated_flag = (STS_RSS_CONFIG_FULL); //set to 2 for FULL config effect in next detection
|
||||
}
|
||||
|
||||
void STS_PRESENCE_SENSOR_NVM_CFG_SIMPLE(void)
|
||||
|
@ -733,7 +734,8 @@ void STS_PRESENCE_SENSOR_NVM_CFG_SIMPLE(void)
|
|||
|
||||
sts_presence_rss_config.default_nbr_removed_pc = (float)(sts_cfg_nvm.p[RSS_CFG_NBR_REMOVED_PC]);
|
||||
|
||||
sts_rss_config_updated_flag = (sts_rss_config_updated_flag|STS_RSS_CONFIG_SIMPLE); //set to 1 for simple config effect in next detection
|
||||
// sts_rss_config_updated_flag = (sts_rss_config_updated_flag|STS_RSS_CONFIG_SIMPLE); //set to 1 for simple config effect in next detection
|
||||
sts_rss_config_updated_flag = (STS_RSS_CONFIG_SIMPLE); //set to 1 for simple config effect in next detection
|
||||
}
|
||||
|
||||
void STS_PRESENCE_SENSOR_Init_Send_Data(void)
|
||||
|
@ -974,7 +976,7 @@ void STS_PRESENCE_SENSOR_RSS_Init(void)
|
|||
}
|
||||
|
||||
STS_PRESENCE_SENSOR_NVM_CFG();
|
||||
|
||||
#if 0
|
||||
switch (sts_work_mode)
|
||||
{
|
||||
case STS_RSS_MODE:
|
||||
|
@ -990,7 +992,8 @@ void STS_PRESENCE_SENSOR_RSS_Init(void)
|
|||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
#endif
|
||||
APP_LOG(TS_ON, VLEVEL_M, "##### Reboot --- with NVM CFG'ED RSS flag =%02x \r\n", sts_rss_config_updated_flag);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -2563,7 +2563,7 @@ void USER_APP_AUTO_RESPONDER_Parse(char *tlv_buf, uint8_t tlv_buf_size)
|
|||
sts_cfg_nvm.p[RSS_CFG_THRESHOLD] = (uint8_t)((tlv_buf[CFG_CMD8] - 0x30)*10+(tlv_buf[CFG_CMD9] - 0x30));
|
||||
sts_cfg_nvm.p[RSS_CFG_RECEIVER_GAIN] = (uint8_t)((tlv_buf[CFG_CMD10]- 0x30)*10+(tlv_buf[CFG_CMD11]- 0x30));
|
||||
|
||||
APP_LOG(TS_OFF, VLEVEL_H,"\r\nStart,Lenght,threshold,gain=%02x %02x %02x %02x \r\n",
|
||||
APP_LOG(TS_OFF, VLEVEL_M,"\r\nStart,Lenght,threshold,gain=%02x %02x %02x %02x \r\n",
|
||||
sts_cfg_nvm.p[RSS_CFG_START_M],sts_cfg_nvm.p[RSS_CFG_LENGTH_M],sts_cfg_nvm.p[RSS_CFG_THRESHOLD],sts_cfg_nvm.p[RSS_CFG_RECEIVER_GAIN]);
|
||||
STS_PRESENCE_SENSOR_NVM_CFG_SIMPLE();
|
||||
|
||||
|
@ -2941,7 +2941,7 @@ void OnRestoreSTSCFGContextProcess(void)
|
|||
// if ((sts_version == sts_cfg_nvm.version)&& (NVM_CFG_PARAMETER_SIZE == sts_cfg_nvm.length))
|
||||
{
|
||||
STS_PRESENCE_SENSOR_Init();
|
||||
//STS_PRESENCE_SENSOR_RSS_Init();
|
||||
STS_PRESENCE_SENSOR_RSS_Init();
|
||||
}
|
||||
#endif
|
||||
//STS_SENSOR_Distance_Test_Process();
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue