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

Method clear

tests/fl/fx/mock_fastled.h:86–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84 }
85
86 void clear(bool writeToStrip = false) override {
87 mClearCallCount++;
88
89 if (mHasSegment) {
90 // Clear only the segment
91 for (size_t i = mSegmentStart; i < mSegmentEnd; i++) {
92 mLeds[i] = CRGB::Black;
93 }
94 } else {
95 // Clear all LEDs
96 for (size_t i = 0; i < mNumLeds; i++) {
97 mLeds[i] = CRGB::Black;
98 }
99 }
100
101 if (writeToStrip) {
102 mShowCallCount++;
103 }
104 }
105
106 void setBrightness(uint8_t brightness) override {
107 mBrightness = brightness;

Callers 15

FL_TEST_FILEFunction · 0.45
showMethod · 0.45
resetMethod · 0.45
resetMethod · 0.45
test_map_move_semanticsFunction · 0.45
FL_TEST_FILEFunction · 0.45
resetMethod · 0.45
FL_TEST_FILEFunction · 0.45
resetMethod · 0.45
FL_TEST_FILEFunction · 0.45
FL_TEST_FILEFunction · 0.45

Calls

no outgoing calls

Tested by 7

test_map_move_semanticsFunction · 0.36
FL_TEST_FILEFunction · 0.36
runSweepFunction · 0.36
test_clearFunction · 0.36
test_map_size_clearFunction · 0.36
test_pmr_clear_emptiesFunction · 0.36