monome / crow

Crow speaks and listens and remembers bits of text. A scriptable USB-CV-II machine
GNU General Public License v3.0
166 stars 34 forks source link

Status_LED: xor flips are throttled, and only sent if USB connected #479

Closed trentgill closed 1 year ago

trentgill commented 1 year ago

per discussion in #475

@tehn this should solve the 2 issues you saw. XOR will only occur once per millisecond tick, and only if the USB connection is active.

no performance penalty for the xor calls (they set a boolean flag, rather than writing directly to the hardware pin), and the background loop has an additional conditional which should be near-zero cpu impact as it's just non-zero check.