color code mapping
This commit is contained in:
parent
c5e4e47ee5
commit
ba5c46449c
|
@ -80,7 +80,6 @@ extern SysTime_t mems_event_time;
|
||||||
extern volatile uint32_t event_start_time, event_stop_time;
|
extern volatile uint32_t event_start_time, event_stop_time;
|
||||||
uint8_t luminance_level = DEFAULT_LUMINANCE_LEVEL;
|
uint8_t luminance_level = DEFAULT_LUMINANCE_LEVEL;
|
||||||
|
|
||||||
|
|
||||||
void STS_YunhornSTSEventP1_Process(void)
|
void STS_YunhornSTSEventP1_Process(void)
|
||||||
{
|
{
|
||||||
STS_Lamp_Bar_Refresh();
|
STS_Lamp_Bar_Refresh();
|
||||||
|
|
|
@ -120,6 +120,17 @@ extern volatile uint8_t sensor_data_ready;
|
||||||
extern volatile STS_OO_SensorStatusDataTypeDef sts_o7_sensorData;
|
extern volatile STS_OO_SensorStatusDataTypeDef sts_o7_sensorData;
|
||||||
extern volatile float sts_distance_rss_distance;
|
extern volatile float sts_distance_rss_distance;
|
||||||
volatile uint8_t sts_presence_fall_detection;
|
volatile uint8_t sts_presence_fall_detection;
|
||||||
|
char sts_lamp_color_code[10][10]={
|
||||||
|
"Dark",
|
||||||
|
"Green",
|
||||||
|
"Red",
|
||||||
|
"Blue",
|
||||||
|
"Yellow",
|
||||||
|
"Pink",
|
||||||
|
"Cyan",
|
||||||
|
"White",
|
||||||
|
"Red_Blue",
|
||||||
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
/* USER CODE END EV */
|
/* USER CODE END EV */
|
||||||
|
@ -825,8 +836,8 @@ static uint8_t PrepareSendTxData(void)
|
||||||
AppData.Buffer[i++] = (uint8_t)(0xFF & sts_occupancy_overtime_state); //08 occupancy over time or not
|
AppData.Buffer[i++] = (uint8_t)(0xFF & sts_occupancy_overtime_state); //08 occupancy over time or not
|
||||||
APP_LOG(TS_OFF, VLEVEL_L,
|
APP_LOG(TS_OFF, VLEVEL_L,
|
||||||
"\r\n######| Color Mode S2 |Distance(mm) MotionScore|"
|
"\r\n######| Color Mode S2 |Distance(mm) MotionScore|"
|
||||||
"\r\n######| %1d %1d %1d |%04d %04d |\r\n",
|
"\r\n######| %s %1d %1d |%04d %04d |\r\n",
|
||||||
AppData.Buffer[0], AppData.Buffer[1], AppData.Buffer[2], (uint16_t)o7_data.rss_presence_distance,(uint16_t)o7_data.rss_presence_score);
|
(char*)sts_lamp_color_code[(uint8_t)(AppData.Buffer[0])], AppData.Buffer[1], AppData.Buffer[2], (uint16_t)o7_data.rss_presence_distance,(uint16_t)o7_data.rss_presence_score);
|
||||||
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -849,8 +860,8 @@ static uint8_t PrepareSendTxData(void)
|
||||||
AppData.Buffer[i++] = (uint8_t)(0xFF & sts_occupancy_overtime_state); //11 occupancy over time or not
|
AppData.Buffer[i++] = (uint8_t)(0xFF & sts_occupancy_overtime_state); //11 occupancy over time or not
|
||||||
APP_LOG(TS_OFF, VLEVEL_L,
|
APP_LOG(TS_OFF, VLEVEL_L,
|
||||||
"\r\n######| Color Mode S1 S2 S3 S4 |Distance(mm) MotionScore|"
|
"\r\n######| Color Mode S1 S2 S3 S4 |Distance(mm) MotionScore|"
|
||||||
"\r\n######| %1d %1d %1d %1d %1d %1d |%04d %04d |\r\n",
|
"\r\n######| %s %1d %1d %1d %1d %1d |%04d %04d |\r\n",
|
||||||
AppData.Buffer[0], AppData.Buffer[1],AppData.Buffer[2], AppData.Buffer[3],AppData.Buffer[4], AppData.Buffer[5], (uint16_t)o7_data.rss_presence_distance,(uint16_t)o7_data.rss_presence_score);
|
(char *)sts_lamp_color_code[(uint8_t)(AppData.Buffer[0])], AppData.Buffer[1],AppData.Buffer[2], AppData.Buffer[3],AppData.Buffer[4], AppData.Buffer[5], (uint16_t)o7_data.rss_presence_distance,(uint16_t)o7_data.rss_presence_score);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue