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

13 {
14 if (mCurrColor.v_ < color.v_) { // if the new color is "brighter" than the current color.
15 mVelocity = vel;
16 mCurrColor = color;
17 mEventTime = now_ms;
18 }
20 mEventTime = now_ms;
21 mOn = true;
22}
float v_
Definition color.h:108
uint8_t mVelocity
Definition Keyboard.h:39
bool mOn
Definition Keyboard.h:36
ColorHSV mOrigColor
Definition Keyboard.h:47
unsigned long mEventTime
Definition Keyboard.h:41
ColorHSV mCurrColor
Definition Keyboard.h:48

References mCurrColor, mEventTime, mOn, mOrigColor, mVelocity, and ColorHSV::v_.

Referenced by KeyboardState::HandleNoteOn().

+ Here is the caller graph for this function: