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

Method reset

tests/fl/fx/mock_fastled.h:241–263  ·  view source on GitHub ↗

* @brief Reset all counters and state * * Resets: * - Call counters to 0 * - Brightness to 255 * - History vectors to empty * - Corrections and temperature to default * - LEDs to black * - Segments to cleared */

Source from the content-addressed store, hash-verified

239 * - Segments to cleared
240 */
241 void reset() {
242 // Reset counters
243 mShowCallCount = 0;
244 mClearCallCount = 0;
245
246 // Reset state
247 mBrightness = 255;
248 mBrightnessHistory.clear();
249 mCorrection = CRGB(255, 255, 255);
250 mTemperature = CRGB(255, 255, 255);
251 mMaxRefreshRate = 0;
252 mTotalDelayMs = 0;
253
254 // Reset segment
255 mSegmentStart = 0;
256 mSegmentEnd = mNumLeds;
257 mHasSegment = false;
258
259 // Clear LEDs
260 for (size_t i = 0; i < mNumLeds; i++) {
261 mLeds[i] = CRGB::Black;
262 }
263 }
264
265private:
266 // LED state

Callers 5

FL_TEST_FILEFunction · 0.45
FL_TEST_FILEFunction · 0.45
flowfield.hppFile · 0.45
TestFx2DMethod · 0.45
animartrix_fp.hppFile · 0.45

Calls 2

CRGBClass · 0.50
clearMethod · 0.45

Tested by 1

TestFx2DMethod · 0.36