mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2026-02-11 07:03:07 +01:00
Fix for LED brightness and add Page Autopilot
This commit is contained in:
@@ -22,9 +22,11 @@ static uint8_t mulcolor(uint8_t f1, uint8_t f2){
|
||||
}
|
||||
|
||||
Color setBrightness(const Color &color,uint8_t brightness){
|
||||
if (brightness > 100) brightness = 100;
|
||||
|
||||
uint16_t br255=brightness*255;
|
||||
br255=br255/100;
|
||||
//very simple for now
|
||||
//Very simple for now
|
||||
Color rt=color;
|
||||
rt.g=mulcolor(rt.g,br255);
|
||||
rt.b=mulcolor(rt.b,br255);
|
||||
|
||||
Reference in New Issue
Block a user