breath_compute: Use default arguments instead of three methods

Thanks to Michael Richters (@gedankenexperimenter) for the suggestion!

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
pull/365/head
Gergely Nagy 7 years ago
parent f321388ed9
commit 198e332e05

@ -1,15 +1,5 @@
#include "LEDUtils.h"
cRGB
breath_compute() {
return breath_compute(170);
}
cRGB
breath_compute(uint8_t hue) {
return breath_compute(hue, 255);
}
cRGB
breath_compute(uint8_t hue, uint8_t saturation) {
// This code is adapted from FastLED lib8tion.h as of dd5d96c6b289cb6b4b891748a4aeef3ddceaf0e6

@ -2,7 +2,5 @@
#include <Kaleidoscope.h>
cRGB breath_compute(void);
cRGB breath_compute(uint8_t hue);
cRGB breath_compute(uint8_t hue, uint8_t saturation);
cRGB breath_compute(uint8_t hue = 170, uint8_t saturation = 255);
cRGB hsvToRgb(uint16_t h, uint16_t s, uint16_t v);

Loading…
Cancel
Save