Legohead259 / OlympianESC-Firmware

Firmware for a novel Micro-ROS based electronic speed controller (ESC)
MIT License
0 stars 0 forks source link

[Feature Request]: Convert RGB LED blink tasks to `TimerEvents` #20

Open Legohead259 opened 7 months ago

Legohead259 commented 7 months ago

Is your feature request related to a problem? Please describe. The blink tasks in the RGB LED feedback state machine use a lot of mathematical operations per execution. It would be easier to instead set them to a TimerEvent that should streamline the calls.

Describe the solution you'd like Use a TimerEvent class (link) to create the asynchronous blink tasks in a more computationally favorable method. The state machine would update the color of the blink and if the asyncBlink or asyncAlternatingBlink tasks are enabled. This would reduce all of the comparison and math calls in the program, increasing performance.