FastLED 3.9.15
Loading...
Searching...
No Matches

◆ SetOn()

void Key::SetOn ( uint8_t vel,
const ColorHSV & color,
uint32_t now_ms )

Definition at line 12 of file Keyboard.cpp.

12 {
13 if (curr_color_.v_ < color.v_) { // if the new color is "brighter" than the current color.
14 velocity_ = vel;
15 curr_color_ = color;
16 event_time_ = now_ms;
17 }
19 event_time_ = now_ms;
20 on_ = true;
21}
float v_
Definition color.h:108
ColorHSV orig_color_
Definition Keyboard.h:47
ColorHSV curr_color_
Definition Keyboard.h:48
unsigned long event_time_
Definition Keyboard.h:41
bool on_
Definition Keyboard.h:36
uint8_t velocity_
Definition Keyboard.h:39

References curr_color_, event_time_, on_, orig_color_, ColorHSV::v_, and velocity_.

Referenced by KeyboardState::HandleNoteOn().

+ Here is the caller graph for this function: