Skip to content

Commit

Permalink
set controller endpoint for setting RGB via hex
Browse files Browse the repository at this point in the history
  • Loading branch information
jyanev committed Oct 9, 2023
1 parent 2d82aae commit aed94c8
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,17 @@ public void setColor(int redVal, int greenVal, int blueVal, int frequency1, int
rgbledHelper.setColor(colors, frequency);
}

@Get("/setColorHex/{hexValue}")
public void setColorHex(String hexValue) {
rgbledHelper.setColorHex(hexValue);
}

@Get("/setColorHex/{hexValue}, {frequency1}, {frequency2}, {frequency3}")
public void setColorHex(String hexValue, int frequency1, int frequency2, int frequency3) {
int[] frequency = new int[] {frequency1, frequency2, frequency3};
rgbledHelper.setColorHex(hexValue, frequency);
}

@Get("/ledOff")
public void ledOff() {
rgbledHelper.ledOff();
Expand Down

0 comments on commit aed94c8

Please sign in to comment.