Consolidate legacy pattern ids into meteor, particles, sparkle, chase, and colour_cycle with n6/mode style selection; add pattern_modes helper, self-contained tests/all.py, and preset mode alias on wire. Co-authored-by: Cursor <cursoragent@cursor.com>
18 lines
395 B
Python
18 lines
395 B
Python
"""Install a builtins.print wrapper that prefixes each line with uptime (ms).
|
|
|
|
Import this module before other led-driver imports that print (e.g. first in main).
|
|
"""
|
|
|
|
import builtins
|
|
import utime
|
|
|
|
_original_print = builtins.print
|
|
|
|
|
|
def _timestamped_print(*args, **kwargs):
|
|
ts = utime.ticks_ms()
|
|
return _original_print("[%d]" % ts, *args, **kwargs)
|
|
|
|
|
|
builtins.print = _timestamped_print
|