jled icon indicating copy to clipboard operation
jled copied to clipboard

Request: Make Update(uint32_t now) public

Open paoSoft opened this issue 1 year ago • 1 comments

Normally, using the public Update() method is fine, but with many leds/sequences to update, the consecutive calls to millis() comes with a cost, which can be mitigated with using a local variable and one call to millis(), Pseudo code: loop() { unsigned long now = millis(); led1.Update(now); : ledN.Update(now) sequence.Update(now); : lots of other code... }

BR, Pål

paoSoft avatar Sep 16 '24 10:09 paoSoft

Good idea, besides some optimizations in the JLedSequence class this can also simplify some tests

jandelgado avatar Sep 21 '24 18:09 jandelgado