修正宏与浮点

This commit is contained in:
dgjames 2025-01-18 12:58:20 +08:00
parent a55ef6efcc
commit c6a7554b51

View File

@ -161,6 +161,7 @@ void led_breath_entry(void *parameter)
}
#define BORAD_NOT_CORRECT 25
#define BORAD_CORRECT_VOL 250
/**
* @brief
@ -187,7 +188,7 @@ static int borad_check(void)
/* 转换为对应电压值 */
vol = value * REFER_VOLTAGE / CONVERT_BITS;
if(vol>=0.25*100)
if(vol>=BORAD_CORRECT_VOL)
{
rt_kprintf("NOT correct borad!\n");
rt_kprintf("the value is :%d \n", value);