added changes suggested in the PR discussion.

pull/365/head
Aaron Christianson 7 years ago
parent 834d75fc7d
commit a1fadd9f75

@ -39,8 +39,16 @@ void setup() {
## Plugin methods
The plugin provides two objects: `LEDRainbowEffect`, and `LEDRainbowWaveEffect`,
both of which provide methods to set the delay time (animation speed)
and effect brightness, called `delay` and `brightness` respectively.
both of which provide the following methods:
### `.brightness(brightness)`
Sets the LED brightness for the effect.
### `.update_delay(delay)`
Sets the number of miliseconds between effect updates.
Smaller number = faster rainbows.
## Dependencies

@ -23,7 +23,7 @@ void LEDRainbowEffect::brightness(byte brightness) {
rainbow_value = brightness;
}
void LEDRainbowEffect::delay(byte delay) {
void LEDRainbowEffect::update_delay(byte delay) {
rainbow_update_delay = delay;
}
@ -56,7 +56,7 @@ void LEDRainbowWaveEffect::brightness(byte brightness) {
rainbow_value = brightness;
}
void LEDRainbowWaveEffect::delay(byte delay) {
void LEDRainbowWaveEffect::updat_delay(byte delay) {
rainbow_update_delay = delay;
}
}

@ -9,7 +9,7 @@ class LEDRainbowEffect : public LEDMode {
LEDRainbowEffect(void) {}
void brightness(byte);
void delay(byte);
void update_delay(byte);
void update(void) final;
private:
@ -29,7 +29,7 @@ class LEDRainbowWaveEffect : public LEDMode {
LEDRainbowWaveEffect(void) {}
void brightness(byte);
void delay(byte);
void update_delay(byte);
void update(void) final;
private:

Loading…
Cancel
Save