MCPcopy Create free account
hub / github.com/FastLED/FastLED / SetOn

Method SetOn

examples/LuminescentGrand/shared/Keyboard.cpp:13–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11 mVelocity(0), mIdx(0), mEventTime(0) {}
12
13void Key::SetOn(uint8_t vel, const ColorHSV& color, uint32_t now_ms) {
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 }
19 mOrigColor = mCurrColor;
20 mEventTime = now_ms;
21 mOn = true;
22}
23
24void Key::SetOff(uint32_t now_ms) {
25 mOrigColor = mCurrColor;

Callers 1

HandleNoteOnMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected