diff --git a/Core/Src/sts_lamp_bar.c b/Core/Src/sts_lamp_bar.c index b211b2d..d666eca 100644 --- a/Core/Src/sts_lamp_bar.c +++ b/Core/Src/sts_lamp_bar.c @@ -29,7 +29,7 @@ #include "yunhorn_sts_sensors.h" #define ONE_PULSE (36) //(36) //36 -#define ZERO_PULSE (12) //(12) +#define ZERO_PULSE (14) //(12) #define LED_DATA_LEN 24 //#define WS2812B_DATA_LEN (LED_DATA_LEN * (STS_LAMP_BAR_LED_NUM)) @@ -108,6 +108,7 @@ void ws2812b_data_transfer(uint8_t *src, uint32_t len) uint32_t bits = 0; uint32_t bytes = 0; HAL_TIM_PWM_Stop_DMA(&STS_LAMP_BAR_HTIM, STS_LAMP_BAR_TIM_CHANNEL); + memset(ws2812b_crr_value,0,sizeof(ws2812b_crr_value)); while(len--) { for (i=0; i < 8; i++) diff --git a/STM32CubeIDE/Release/STS_O7.bin b/STM32CubeIDE/Release/STS_O7.bin index 4a6efaf..568a959 100644 Binary files a/STM32CubeIDE/Release/STS_O7.bin and b/STM32CubeIDE/Release/STS_O7.bin differ