@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.
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.