candle-usb / candleLight_fw

gs_usb compatible firmware for candleLight, cantact and canable
Other
642 stars 283 forks source link

LED performance rework #144

Closed fenugrec closed 1 year ago

fenugrec commented 1 year ago

Sidequest from #143 - we're spending way too much time updating LEDs.

The most gain here is obtained from calling led_update() less often (every 10ms with this patch).

The commit changing the implementation of led_indicate_trx() showed surprisingly marginal gains - about 0.5% with a cangen -L0 -g0 -p10 can0 benchmark.

can busload goes from ~ 12900 to 13120 frames/s with this PR.

marckleinebudde commented 1 year ago

looks good to me!