Skip to content

Commit

Permalink
added setWhite and off methods
Browse files Browse the repository at this point in the history
  • Loading branch information
felixthecat8a committed Oct 12, 2024
1 parent d57cca3 commit f90599b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/LCD_BacklightRGB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ void LCD_BacklightRGB::setBrightness(int brightness) {
showRGB(_currentColor[0], _currentColor[1], _currentColor[2]);
}

void LCD_BacklightRGB::setWhite() {
setRGB(Colors::WHITE);
}

void LCD_BacklightRGB::setWhite(int brightness) {
setRGB(Colors::WHITE, brightness);
}

void LCD_BacklightRGB::setRed() {
setRGB(Colors::RED);
}
Expand Down Expand Up @@ -108,3 +116,7 @@ void LCD_BacklightRGB::setMagenta() {
void LCD_BacklightRGB::setMagenta(int brightness) {
setRGB(Colors::MAGENTA, brightness);
}

void LCD_BacklightRGB::off() {
setRGB(Colors::BLACK);
}
3 changes: 3 additions & 0 deletions src/LCD_BacklightRGB.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ class LCD_BacklightRGB {
void setRGB(int red, int green, int blue);
void setRGB(int red, int green, int blue, int brightness);
void setBrightness(int brightness);
void setWhite();
void setWhite(int brightness);
void setRed();
void setRed(int brightness);
void setYellow();
Expand All @@ -30,6 +32,7 @@ class LCD_BacklightRGB {
void setBlue(int brightness);
void setMagenta();
void setMagenta(int brightness);
void off();
};

#endif

0 comments on commit f90599b

Please sign in to comment.