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 14 of file Keyboard.cpp.

14 {
15 if (curr_color_.v_ < color.v_) { // if the new color is "brighter" than the current color.
16 velocity_ = vel;
17 curr_color_ = color;
18 event_time_ = now_ms;
19 }
21 event_time_ = now_ms;
22 on_ = true;
23}
float v_
Definition color.h:98
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: