467 lines
15 KiB
C
467 lines
15 KiB
C
/* USER CODE BEGIN Header */
|
|
/**
|
|
******************************************************************************
|
|
* @file yunhorn_sts_lamp_bar.c *
|
|
* @author Yunhorn (r) Technology Limited Application Team *
|
|
* @brief Yunhorn (r) SmarToilets (r) Product configuration file. *
|
|
******************************************************************************
|
|
* @attention
|
|
*
|
|
* Copyright (c) 2022 Yunhorn Technology Limited.
|
|
* Copyright (c) 2022 Shenzhen Yunhorn Technology Co., Ltd.
|
|
* All rights reserved.
|
|
*
|
|
* This software is licensed under terms that can be found in the LICENSE file
|
|
* in the root directory of this software component.
|
|
* If no LICENSE file comes with this software, it is provided AS-IS.
|
|
*
|
|
******************************************************************************
|
|
*/
|
|
/* USER CODE END Header */
|
|
#include "main.h"
|
|
#include "dma.h"
|
|
#include "tim.h"
|
|
#include "string.h"
|
|
#include "sys_app.h"
|
|
#include "stm32_systime.h"
|
|
#include "sts_lamp_bar.h"
|
|
|
|
#include "yunhorn_sts_sensors.h"
|
|
|
|
#define ONE_PULSE (36) //(36) //36
|
|
#define ZERO_PULSE (14) //(12)
|
|
|
|
#define LED_DATA_LEN 24
|
|
//#define WS2812B_DATA_LEN (LED_DATA_LEN * (STS_LAMP_BAR_LED_NUM))
|
|
#define WS2812B_DATA_LEN (LED_DATA_LEN * (LED_COUNT))
|
|
#define RESET_PULSE (24) //(80) TO FIX DARK_COLOR AND SM2
|
|
|
|
uint8_t ws2812b_crr_value[STS_LAMP_BAR_LED_NUM_MAX*24+RESET_PULSE]={00};
|
|
uint8_t ws2812b_data[STS_LAMP_BAR_LED_NUM_MAX*3]={0};
|
|
|
|
uint8_t color_rgb[8][3] = { //STS_COLOR R G B MAPPING TABLE
|
|
{0,0,0},{0,1,0},{1,0,0},{0,0,1},{1,1,0},{1,0,1},{0,1,1},{1,1,1}
|
|
};
|
|
extern volatile uint8_t sts_service_mask;
|
|
extern volatile uint8_t sts_work_mode;
|
|
volatile uint8_t sts_reed_hall_ext_int = 0;
|
|
volatile uint8_t sts_status_color = STS_GREEN;
|
|
#ifdef ATAL
|
|
volatile uint8_t sts_color_occupy_vacant = (STS_RED<<4)|(STS_DARK&0x0f);
|
|
volatile uint8_t sts_color_severity_l2_l3 = ((STS_YELLOW<<4)|(STS_RED&0x0F));
|
|
#else
|
|
volatile uint8_t sts_color_occupy_vacant = (STS_RED<<4)|(STS_GREEN&0x0f);
|
|
volatile uint8_t sts_color_severity_l2_l3 = ((STS_YELLOW<<4)|(STS_RED&0x0F));
|
|
#endif
|
|
|
|
volatile uint8_t sts_lamp_bar_color = STS_GREEN; //puColor
|
|
volatile uint8_t sts_lamp_bar_flashing_color = STS_RED_DARK; //0x23; RED_BLUE;
|
|
volatile uint8_t sts_cloud_netcolor = STS_GREEN; //netColor
|
|
extern volatile uint8_t sts_occupancy_status;
|
|
|
|
extern volatile uint8_t sts_reed_hall_result, sts_emergency_button_pushed; // inital 0 = close
|
|
volatile uint8_t sts_hall1_read=STS_Status_Door_Open,sts_hall2_read=STS_Status_SOS_Release; // Above hall1_read == reed_hall_result, hall2_read == emergency_button
|
|
volatile uint8_t sts_hall3_read=STS_Status_Alarm_Mute_Release,sts_hall4_read=STS_Status_Alarm_Reset_Release;
|
|
extern volatile uint8_t sts_reed_hall_1_result, sts_reed_hall_2_result;
|
|
extern volatile uint8_t sts_tof_result_changed_flag;
|
|
|
|
|
|
|
|
extern volatile uint8_t sts_rss_result_changed_flag, sts_hall1_changed_flag, sts_hall2_changed_flag, sts_reed_hall_changed_flag;
|
|
extern volatile uint8_t sts_rss_result;
|
|
extern volatile uint8_t sts_rss_2nd_result; //2nd RSS sensor status
|
|
extern volatile uint8_t sts_tof_result;
|
|
|
|
|
|
volatile uint8_t last_lamp_bar_color=STS_GREEN;
|
|
extern volatile uint8_t sts_presence_fall_detection;
|
|
extern volatile uint8_t sts_fall_rising_detected_result;
|
|
extern volatile float sts_presence_rss_distance;
|
|
extern volatile uint8_t sensor_data_ready;
|
|
extern SysTime_t mems_event_time;
|
|
extern volatile uint32_t event_start_time, event_stop_time;
|
|
extern volatile uint32_t event_door_lock_start_time, event_door_lock_stop_time;
|
|
volatile uint8_t luminance_level = DEFAULT_LUMINANCE_LEVEL;
|
|
static void ws2812b_data_transfer(uint8_t *src, uint32_t len);
|
|
static void ws2812b_light_custom(uint8_t red, uint8_t green, uint8_t blue);
|
|
static void sts_test_color_with_lum_level(void);
|
|
static void ws2812b_light_all_with_lum_level(uint8_t color, uint8_t lum_level);
|
|
static void ws2812b_light_all(uint8_t color);
|
|
|
|
static void ws2812b_data_transfer(uint8_t *src, uint32_t len)
|
|
{
|
|
uint8_t i =0;
|
|
uint32_t bits = 0;
|
|
uint32_t bytes = 0;
|
|
HAL_TIM_PWM_Stop_DMA(&STS_LAMP_BAR_HTIM, STS_LAMP_BAR_TIM_CHANNEL);
|
|
UTIL_MEM_set_8(ws2812b_crr_value,0,sizeof(ws2812b_crr_value));
|
|
while(len--)
|
|
{
|
|
for (i=0; i < 8; i++)
|
|
{
|
|
ws2812b_crr_value[bits] = (((*(src+bytes))<<i)&0x80)? ONE_PULSE : ZERO_PULSE;
|
|
bits++;
|
|
}
|
|
bytes++;
|
|
}
|
|
for (i=0;i<RESET_PULSE;i++)
|
|
{
|
|
ws2812b_crr_value[bits++] = 0;
|
|
}
|
|
|
|
HAL_TIM_PWM_Start_DMA(&STS_LAMP_BAR_HTIM, STS_LAMP_BAR_TIM_CHANNEL, (uint32_t *)ws2812b_crr_value, bits); //(WS2812B_DATA_LEN+RESET_PULSE));
|
|
//HAL_TIM_PWM_Start_IT(&STS_LAMP_BAR_HTIM, STS_LAMP_BAR_TIM_CHANNEL);
|
|
|
|
}
|
|
|
|
static void ws2812b_light_custom(uint8_t red, uint8_t green, uint8_t blue)
|
|
{
|
|
uint8_t i = 0;
|
|
UTIL_MEM_set_8(ws2812b_data, 0, sizeof(ws2812b_data));
|
|
for (i=0; i<(LED_COUNT); i++)
|
|
{
|
|
ws2812b_data[3*i] = green;
|
|
ws2812b_data[3*i+1] = red;
|
|
ws2812b_data[3*i+2] = blue;
|
|
}
|
|
ws2812b_data_transfer(ws2812b_data, sizeof(ws2812b_data));
|
|
}
|
|
void ws2812b_light_one_rgb(uint8_t red, uint8_t green, uint8_t blue, uint8_t idx)
|
|
{
|
|
//uint8_t i = 0;
|
|
UTIL_MEM_set_8(ws2812b_data, 0, sizeof(ws2812b_data));
|
|
//for (i=0; i<(LED_COUNT); i++)
|
|
{
|
|
ws2812b_data[3*idx] = green;
|
|
ws2812b_data[3*idx+1] = red;
|
|
ws2812b_data[3*idx+2] = blue;
|
|
}
|
|
ws2812b_data_transfer(ws2812b_data, sizeof(ws2812b_data));
|
|
}
|
|
static void ws2812b_light_all_with_lum_level(uint8_t color, uint8_t lum_level)
|
|
{
|
|
luminance_level = lum_level;
|
|
ws2812b_light_all(color);
|
|
}
|
|
|
|
static void ws2812b_light_all(uint8_t color)
|
|
{
|
|
switch(color)
|
|
{
|
|
case STS_DARK : ws2812b_light_custom(0, 0, 0); break;
|
|
case STS_GREEN : ws2812b_light_custom(0, luminance_level, 0 ); break;
|
|
case STS_RED : ws2812b_light_custom(luminance_level, 0, 0 ); break;
|
|
case STS_BLUE : ws2812b_light_custom(0, 0, luminance_level); break;
|
|
case STS_YELLOW : ws2812b_light_custom(luminance_level, luminance_level, 0 ); break;
|
|
case STS_PINK : ws2812b_light_custom(luminance_level, 0, luminance_level ); break;
|
|
case STS_CYAN : ws2812b_light_custom(0, luminance_level, luminance_level ); break;
|
|
case STS_WHITE : ws2812b_light_custom(luminance_level, luminance_level, luminance_level ); break;
|
|
}
|
|
}
|
|
void STS_Lamp_Bar_Set_Dark(void)
|
|
{
|
|
ws2812b_light_all(STS_DARK);
|
|
}
|
|
|
|
void STS_Lamp_Bar_Init(void)
|
|
{
|
|
if (sts_service_mask == STS_SERVICE_MASK_L0)
|
|
{
|
|
STS_Lamp_Bar_Set_STS_RGB_Color(STS_GREEN, luminance_level);
|
|
|
|
HAL_Delay(200);
|
|
STS_Lamp_Bar_Set_STS_RGB_Color(STS_RED, luminance_level);
|
|
|
|
HAL_Delay(200);
|
|
STS_Lamp_Bar_Set_STS_RGB_Color(STS_BLUE, luminance_level);
|
|
|
|
HAL_Delay(200);
|
|
}
|
|
}
|
|
|
|
//marquee scoller
|
|
void STS_Lamp_Bar_Scoller(uint8_t color, uint8_t lum_level)
|
|
{
|
|
uint8_t i =0;
|
|
UTIL_MEM_set_8(ws2812b_data, 0, sizeof(ws2812b_data));
|
|
for(i=0; i < (LED_COUNT); i++)
|
|
{
|
|
ws2812b_data[3*i] = color_rgb[color][1]*lum_level;
|
|
ws2812b_data[3*i+1] = color_rgb[color][0]*lum_level;
|
|
ws2812b_data[3*i+2] = color_rgb[color][2]*lum_level;
|
|
|
|
ws2812b_data_transfer(ws2812b_data, sizeof(ws2812b_data));
|
|
HAL_Delay(10);
|
|
}
|
|
}
|
|
|
|
|
|
static void STS_Lamp_Bar_Set_RGB_Color_FadeIn(uint8_t red, uint8_t green, uint8_t blue, uint8_t start_position, uint8_t fade_length)
|
|
{
|
|
uint8_t fade_len = fade_length;
|
|
memset(ws2812b_data, 0, sizeof(ws2812b_data));
|
|
for (uint8_t idx = 0; idx < LED_COUNT ; idx++)
|
|
{
|
|
if (idx >= start_position) {
|
|
// the most far tail end, the darker, the most head/first, the brighter
|
|
uint8_t rev = idx - start_position + 1;
|
|
uint8_t lin = (rev * 0xFF / fade_len);
|
|
uint8_t bri = (lin * lin) >> 8;
|
|
{
|
|
ws2812b_data[3*idx] = (green*bri)>>8;
|
|
ws2812b_data[3*idx+1] = (red*bri)>>8;
|
|
ws2812b_data[3*idx+2] = (blue*bri)>>8;
|
|
}
|
|
} else if ((idx < start_position)||(idx > (start_position+fade_len))){
|
|
// shorter than tail, set to dark
|
|
ws2812b_data[3*idx] = 0;
|
|
ws2812b_data[3*idx+1] = 0;
|
|
ws2812b_data[3*idx+2] = 0;
|
|
}
|
|
}
|
|
ws2812b_data_transfer(ws2812b_data, sizeof(ws2812b_data));
|
|
HAL_Delay(1);
|
|
}
|
|
|
|
static void STS_Lamp_Bar_Set_RGB_Color_FadeOut(uint8_t red, uint8_t green, uint8_t blue, uint8_t start_position, uint8_t fade_length)
|
|
{
|
|
uint8_t fade_len = fade_length;
|
|
memset(ws2812b_data, 0, sizeof(ws2812b_data));
|
|
for (uint8_t idx = 0; idx < LED_COUNT; idx++)
|
|
{
|
|
if ((idx >= start_position) && (idx <= (start_position+fade_len))) {
|
|
// the most far tail end, the darker, the most head/first, the brighter
|
|
uint8_t rev = fade_len -idx - start_position;
|
|
uint8_t lin = (rev * 0xFF / fade_length);
|
|
uint8_t bri = (lin * lin) >> 8;
|
|
{
|
|
ws2812b_data[3*idx] = (green*bri)>>8;
|
|
ws2812b_data[3*idx+1] = (red*bri)>>8;
|
|
ws2812b_data[3*idx+2] = (blue*bri)>>8;
|
|
}
|
|
|
|
} else if ((idx < start_position)||(idx > fade_len)) {
|
|
// shorter than start position or longer than fade length, set to dark
|
|
ws2812b_data[3*idx] = 0;
|
|
ws2812b_data[3*idx+1] = 0;
|
|
ws2812b_data[3*idx+2] = 0;
|
|
}
|
|
}
|
|
ws2812b_data_transfer(ws2812b_data, sizeof(ws2812b_data));
|
|
HAL_Delay(1);
|
|
}
|
|
|
|
void STS_Lamp_Bar_Set_STS_RGB_Color_FadeIn(uint8_t sts_lamp_color, uint8_t max_lum_level, uint8_t fade_length)
|
|
{
|
|
if (sts_lamp_color <=8)
|
|
{
|
|
switch (sts_lamp_color)
|
|
{
|
|
case STS_DARK:
|
|
// STS_Lamp_Bar_Set_RGB_Color(0x0, 0x0, 0x0);
|
|
break;
|
|
case STS_GREEN:
|
|
STS_Lamp_Bar_Set_RGB_Color_FadeIn(0x0, max_lum_level, 0x0, (LED_COUNT-fade_length), fade_length);
|
|
break;
|
|
case STS_RED:
|
|
STS_Lamp_Bar_Set_RGB_Color_FadeIn(max_lum_level, 0x0, 0x0, (LED_COUNT-fade_length), fade_length);
|
|
break;
|
|
case STS_BLUE:
|
|
STS_Lamp_Bar_Set_RGB_Color_FadeIn(0x0, 0x0, max_lum_level, (LED_COUNT-fade_length), fade_length);
|
|
break;
|
|
case STS_YELLOW:
|
|
STS_Lamp_Bar_Set_RGB_Color_FadeIn(max_lum_level, max_lum_level, 0x0, (LED_COUNT-fade_length), fade_length);
|
|
break;
|
|
case STS_PINK:
|
|
STS_Lamp_Bar_Set_RGB_Color_FadeIn(max_lum_level, 0x0, max_lum_level, (LED_COUNT-fade_length), fade_length);
|
|
break;
|
|
case STS_CYAN:
|
|
STS_Lamp_Bar_Set_RGB_Color_FadeIn(0x0, max_lum_level, max_lum_level, (LED_COUNT-fade_length), fade_length);
|
|
break;
|
|
case STS_WHITE:
|
|
STS_Lamp_Bar_Set_RGB_Color_FadeIn(max_lum_level, max_lum_level, max_lum_level, (LED_COUNT-fade_length), fade_length);
|
|
break;
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
void STS_Lamp_Bar_Set_STS_RGB_Color_FadeOut(uint8_t sts_lamp_color, uint8_t max_lum_level, uint8_t fade_length)
|
|
{
|
|
if (sts_lamp_color <=8)
|
|
{
|
|
switch (sts_lamp_color)
|
|
{
|
|
case STS_DARK:
|
|
// STS_Lamp_Bar_Set_RGB_Color(0x0, 0x0, 0x0);
|
|
break;
|
|
case STS_GREEN:
|
|
STS_Lamp_Bar_Set_RGB_Color_FadeOut(0x0, max_lum_level, 0x0, 0, fade_length);
|
|
break;
|
|
case STS_RED:
|
|
STS_Lamp_Bar_Set_RGB_Color_FadeOut(max_lum_level, 0x0, 0x0, 0, fade_length);
|
|
break;
|
|
case STS_BLUE:
|
|
STS_Lamp_Bar_Set_RGB_Color_FadeOut( 0x0, 0x0, max_lum_level, 0, fade_length);
|
|
break;
|
|
case STS_YELLOW:
|
|
STS_Lamp_Bar_Set_RGB_Color_FadeOut(max_lum_level, max_lum_level, 0x0, 0, fade_length);
|
|
break;
|
|
case STS_PINK:
|
|
STS_Lamp_Bar_Set_RGB_Color_FadeOut(max_lum_level, 0x0, max_lum_level, 0, fade_length);
|
|
break;
|
|
case STS_CYAN:
|
|
STS_Lamp_Bar_Set_RGB_Color_FadeOut(0x0, max_lum_level, max_lum_level, 0, fade_length);
|
|
break;
|
|
case STS_WHITE:
|
|
STS_Lamp_Bar_Set_RGB_Color_FadeOut(max_lum_level, max_lum_level, max_lum_level, 0, fade_length);
|
|
break;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
void STS_Lamp_Bar_Set_STS_RGB_Color(uint8_t sts_lamp_color, uint8_t lum)
|
|
{
|
|
luminance_level = lum;
|
|
switch(sts_lamp_color)
|
|
{
|
|
case STS_DARK : ws2812b_light_custom(0, 0, 0); break;
|
|
case STS_GREEN : ws2812b_light_custom(0, luminance_level, 0 ); break;
|
|
case STS_RED : ws2812b_light_custom(luminance_level, 0, 0 ); break;
|
|
case STS_BLUE : ws2812b_light_custom(0, 0, luminance_level); break;
|
|
case STS_YELLOW : ws2812b_light_custom(luminance_level, luminance_level, 0 ); break;
|
|
case STS_PINK : ws2812b_light_custom(luminance_level, 0, luminance_level ); break;
|
|
case STS_CYAN : ws2812b_light_custom(0, luminance_level, luminance_level ); break;
|
|
case STS_WHITE : ws2812b_light_custom(luminance_level, luminance_level, luminance_level ); break;
|
|
}
|
|
HAL_Delay(1);
|
|
}
|
|
|
|
void HAL_TIM_PWM_PulseFinishedCallback(TIM_HandleTypeDef *htim)
|
|
{
|
|
//__HAL_TIM_SetCompare(&STS_LAMP_BAR_HTIM, STS_LAMP_BAR_TIM_CHANNEL,0);
|
|
HAL_TIM_PWM_Stop_DMA(&STS_LAMP_BAR_HTIM, STS_LAMP_BAR_TIM_CHANNEL);
|
|
|
|
}
|
|
|
|
void STS_Lamp_Bar_Self_Test_Simple(void)
|
|
{
|
|
|
|
APP_LOG(TS_OFF, VLEVEL_M, "\r\n [#1] RGB Space Lumianance Level Testing Start\r\n");
|
|
sts_test_color_with_lum_level();
|
|
APP_LOG(TS_OFF, VLEVEL_M, "\r\n [#1] RGB Space Lumianance Level Testing Finished\r\n");
|
|
}
|
|
|
|
void STS_Lamp_Bar_Self_Test_Fade(void)
|
|
{
|
|
uint16_t color=0, lum_level=DEFAULT_LUMINANCE_LEVEL;
|
|
|
|
APP_LOG(TS_OFF, VLEVEL_M, "\r\n [#1] RGB Space Fade Out HALF Testing Start\r\n");
|
|
for (color=STS_GREEN; color < STS_COLOR_MAX; color++)
|
|
{
|
|
STS_Lamp_Bar_Set_STS_RGB_Color_FadeOut(color&0xff, lum_level&0xff, LED_COUNT/2);
|
|
HAL_Delay(200);
|
|
}
|
|
|
|
APP_LOG(TS_OFF, VLEVEL_M, "\r\n [#1] RGB Space Fade In HALF Testing Start\r\n");
|
|
for (color=STS_GREEN; color < STS_COLOR_MAX; color++)
|
|
{
|
|
STS_Lamp_Bar_Set_STS_RGB_Color_FadeIn(color&0xff, lum_level&0xff, LED_COUNT/2);
|
|
HAL_Delay(200);
|
|
}
|
|
APP_LOG(TS_OFF, VLEVEL_M, "\r\n [#1] RGB Space Fade Out FULL Testing Start\r\n");
|
|
for (color=STS_GREEN; color < STS_COLOR_MAX; color++)
|
|
{
|
|
STS_Lamp_Bar_Set_STS_RGB_Color_FadeOut(color&0xff, lum_level&0xff, LED_COUNT-2);
|
|
HAL_Delay(200);
|
|
}
|
|
|
|
APP_LOG(TS_OFF, VLEVEL_M, "\r\n [#1] RGB Space Fade In FULL Testing Start\r\n");
|
|
for (color=STS_GREEN; color < STS_COLOR_MAX; color++)
|
|
{
|
|
STS_Lamp_Bar_Set_STS_RGB_Color_FadeIn(color&0xff, lum_level&0xff, LED_COUNT-2);
|
|
HAL_Delay(200);
|
|
}
|
|
|
|
APP_LOG(TS_OFF, VLEVEL_M, "\r\n [#1] RGB Space Fade Out / Fade In Testing Finished\r\n");
|
|
}
|
|
|
|
static void sts_test_scoller_bar(void)
|
|
{
|
|
for (uint8_t color = STS_GREEN; color < STS_COLOR_MAX; color++)
|
|
{
|
|
APP_LOG(TS_OFF, VLEVEL_M, "\r\n [#1] Scoller Testing Color #%02x \r\n", color);
|
|
{
|
|
STS_Lamp_Bar_Scoller(color, DEFAULT_LUMINANCE_LEVEL);
|
|
}
|
|
HAL_Delay(200);
|
|
}
|
|
}
|
|
|
|
static void sts_test_color_with_lum_level(void)
|
|
{
|
|
|
|
for (uint8_t color = STS_GREEN; color < STS_COLOR_MAX; color++)
|
|
{
|
|
for (uint16_t lum_level=1; lum_level<250; lum_level+=10)
|
|
{
|
|
ws2812b_light_all_with_lum_level(color, lum_level&0xff);
|
|
HAL_Delay(20);
|
|
}
|
|
}
|
|
}
|
|
|
|
void STS_Lamp_Bar_Self_Test(void)
|
|
{
|
|
uint16_t lum_level=DEFAULT_LUMINANCE_LEVEL;
|
|
|
|
APP_LOG(TS_OFF, VLEVEL_M, "\r\n [#1] YunHorn STS Indicative Lamp Self Test\r\n");
|
|
|
|
STS_Lamp_Bar_Self_Test_Simple();HAL_Delay(500);
|
|
|
|
APP_LOG(TS_OFF, VLEVEL_M, "\r\n [#2] Scoller Testing\r\n");
|
|
sts_test_scoller_bar();HAL_Delay(500);
|
|
|
|
APP_LOG(TS_OFF, VLEVEL_M, "\r\n [#3] Color Set Dark \r\n");
|
|
STS_Lamp_Bar_Set_Dark();
|
|
HAL_Delay(500);
|
|
APP_LOG(TS_OFF, VLEVEL_M, "\r\n [#4] RGB Space Fade Out Testing Start\r\n");
|
|
STS_Lamp_Bar_Self_Test_Fade();
|
|
|
|
APP_LOG(TS_OFF, VLEVEL_M, "\r\n [#5] YunHorn STS Indicative Lamp Self Test Finished\r\n");
|
|
if ((sts_work_mode == STS_WIRED_MODE) )
|
|
{
|
|
STS_Lamp_Bar_Set_Dark();
|
|
} else
|
|
{
|
|
STS_Lamp_Bar_Set_STS_RGB_Color(STS_COLOR_DEFAULT_VACANT, lum_level);
|
|
}
|
|
|
|
|
|
}
|
|
|
|
void sts_rgb_unit_test(void)
|
|
{
|
|
|
|
APP_LOG(TS_OFF, VLEVEL_L, "\r\n STS Lamp Bar Init...\r\n");
|
|
|
|
STS_Lamp_Bar_Set_Dark();
|
|
STS_Lamp_Bar_Self_Test();
|
|
|
|
do {
|
|
for (uint8_t i=0; i<9; i++)
|
|
{
|
|
APP_LOG(TS_OFF, VLEVEL_L, "\r\n STS Lamp Bar color = %d...\r\n", i);
|
|
|
|
STS_Lamp_Bar_Set_STS_RGB_Color(i, luminance_level);
|
|
STS_Combined_Status_Processing();
|
|
HAL_Delay(6000);
|
|
STS_Lamp_Bar_Set_Dark();
|
|
}
|
|
} while(1);
|
|
|
|
}
|
|
|
|
|