diff --git a/Core/Src/sts_lamp_bar.c b/Core/Src/sts_lamp_bar.c index fd85728..f424797 100644 --- a/Core/Src/sts_lamp_bar.c +++ b/Core/Src/sts_lamp_bar.c @@ -80,7 +80,6 @@ extern SysTime_t mems_event_time; extern volatile uint32_t event_start_time, event_stop_time; uint8_t luminance_level = DEFAULT_LUMINANCE_LEVEL; - void STS_YunhornSTSEventP1_Process(void) { STS_Lamp_Bar_Refresh(); diff --git a/LoRaWAN/App/lora_app.c b/LoRaWAN/App/lora_app.c index 1051a91..f7c849f 100644 --- a/LoRaWAN/App/lora_app.c +++ b/LoRaWAN/App/lora_app.c @@ -120,6 +120,17 @@ extern volatile uint8_t sensor_data_ready; extern volatile STS_OO_SensorStatusDataTypeDef sts_o7_sensorData; extern volatile float sts_distance_rss_distance; 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 /* 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 APP_LOG(TS_OFF, VLEVEL_L, "\r\n######| Color Mode S2 |Distance(mm) MotionScore|" - "\r\n######| %1d %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); + "\r\n######| %s %1d %1d |%04d %04d |\r\n", + (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; @@ -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 APP_LOG(TS_OFF, VLEVEL_L, "\r\n######| Color Mode S1 S2 S3 S4 |Distance(mm) MotionScore|" - "\r\n######| %1d %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); + "\r\n######| %s %1d %1d %1d %1d %1d |%04d %04d |\r\n", + (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; }