This commit is contained in:
dgjames 2025-01-18 12:50:27 +08:00
parent 6a594d6cdc
commit a55ef6efcc

View File

@ -26,15 +26,15 @@ const RGBColor_TypeDef LED_ON = {255, 255, 255};
void LED_BreathTurn(uint8_t LedBreath_state) void LED_BreathTurn(uint8_t LedBreath_state)
{ {
LED_Breath_State = LedBreath_state; LED_Breath_State = LedBreath_state;
if (LedBreath_state == LED_BREATH_OFF) // if (LedBreath_state == LED_BREATH_OFF)
{ // {
// rt_thread_suspend(led_breath_thread); // // rt_thread_suspend(led_breath_thread);
LED_SetMore(LED_BREATH_ID(1), LED_BREATH_ID(12), LED_OFF); // LED_SetMore(LED_BREATH_ID(1), LED_BREATH_ID(12), LED_OFF);
} // }
else if (LedBreath_state == LED_BREATH_ON) // else if (LedBreath_state == LED_BREATH_ON)
{ // {
// rt_thread_resume(led_breath_thread); // // rt_thread_resume(led_breath_thread);
} // }
} }
/** /**
* @brief LED的颜色或开关 * @brief LED的颜色或开关
@ -154,7 +154,7 @@ void led_breath_entry(void *parameter)
break; break;
} }
RGB_Reflash(); RGB_Reflash();
rt_thread_mdelay(500); rt_thread_delay(40);
} }
count = (count + 1) % 3; count = (count + 1) % 3;
} }
@ -187,7 +187,7 @@ static int borad_check(void)
/* 转换为对应电压值 */ /* 转换为对应电压值 */
vol = value * REFER_VOLTAGE / CONVERT_BITS; vol = value * REFER_VOLTAGE / CONVERT_BITS;
if(vol>=0.25) if(vol>=0.25*100)
{ {
rt_kprintf("NOT correct borad!\n"); rt_kprintf("NOT correct borad!\n");
rt_kprintf("the value is :%d \n", value); rt_kprintf("the value is :%d \n", value);