FastLED 3.10.6
Loading...
Searching...
No Matches
AutoResearchTimingDrift.h File Reference

Detailed Description

Issue #2994 repro: compounded per-sequence timing drift vs 3.10.3.

Replays the reporter's minimal sketch as faithfully as possible:

  • 35-LED WS2812B ring on the legacy template addLeds path (WS2812B<PIN> -> ClocklessControllerImpl -> ClocklessIdf5 -> SlimBridgeController -> RMT5 driver) via LegacyClocklessProxy.
  • FastLED.setMaxRefreshRate(800).
  • millisDelay-gated 255-step fade: first step after 225ms, then 5ms cadence; FastLED.show() throttled to a 5ms cadence; delay(1000) between sequences.
  • Records millis() elapsed per completed sequence — the value the reporter printed over serial. Theoretical period: 225 + 254*5 + 1000 = 2495ms. On 3.10.3 the reporter sees a rock-steady 2495; on master 2563-2752.

Deliberate deviations from the sketch (documented for reviewers):

  • No setCpuFrequencyMhz(160): changing CPU clock mid-session risks the RPC serial link; the current CPU MHz is reported instead.
  • No .setCorrection(TypicalLEDStrip): color correction only scales pixel values and does not affect pacing.
  • The first recorded sequence is partial (no leading 225ms arm or 1000ms delay); the host skips index 0 when building the histogram.

Invoked via the timingDriftTest JSON-RPC handler registered in AutoResearchRemote.cpp. NOTE: blocks ~2.5s per iteration.

Definition in file AutoResearchTimingDrift.h.

#include "FastLED.h"
#include "fl/stl/int.h"
#include "fl/stl/singleton.h"
#include "LegacyClocklessProxy.h"
#include <Arduino.h>
+ Include dependency graph for AutoResearchTimingDrift.h:

Go to the source code of this file.

Classes

struct  autoresearch::timing_drift::DriftResult
 
struct  autoresearch::timing_drift::MillisDelay
 Faithful emulation of the millisDelay library used by the issue sketch: start(t) arms a deadline; justFinished() fires true exactly once when elapsed >= t; stop() disarms. More...
 
struct  autoresearch::timing_drift::TimingDriftState
 

Namespaces

namespace  autoresearch
 
namespace  autoresearch::timing_drift
 

Functions

DriftResult autoresearch::timing_drift::run (int pin, int num_leds, int iterations)
 
TimingDriftState & autoresearch::timing_drift::timingDriftState ()
 

Variables

constexpr int autoresearch::timing_drift::kMaxIterations = 64
 
constexpr int autoresearch::timing_drift::kMaxLeds = 256
 

Class Documentation

◆ autoresearch::timing_drift::DriftResult

struct autoresearch::timing_drift::DriftResult
Class Members
uint32_t cpu_mhz
uint32_t iter_ms[kMaxIterations]
int iterations
int num_leds
int pin
uint32_t show_count
uint32_t show_max_us
uint32_t show_min_us
uint64_t show_total_us
bool valid_pin

◆ autoresearch::timing_drift::TimingDriftState

struct autoresearch::timing_drift::TimingDriftState
+ Collaboration diagram for autoresearch::timing_drift::TimingDriftState:
Class Members
CRGB leds[kMaxLeds]