提升亮度调节精度至百分比

This commit is contained in:
2026-07-26 23:20:44 +08:00
parent 9321568920
commit e5e899a8f1
43 changed files with 1914 additions and 1961 deletions
@@ -134,8 +134,11 @@ void scan_uart(uint8_t *arr)
case 4:
if(POWEROFF==deviceStatus)break;
if(Mode==mode0){
if(user_rx_buf[1]<=20)user_rx_buf[1]=20;
Brightness=user_rx_buf[1]/10;
if(user_rx_buf[1] < BRIGHTNESS_MIN_PERCENT)
user_rx_buf[1] = BRIGHTNESS_MIN_PERCENT;
else if(user_rx_buf[1] > BRIGHTNESS_MAX_PERCENT)
user_rx_buf[1] = BRIGHTNESS_MAX_PERCENT;
Brightness = user_rx_buf[1];
}
break;
case 5: