mirror of
https://github.com/xoseperez/espurna.git
synced 2026-03-03 15:04:17 +01:00
Implement strongly-typed time units via std::chrono, compile-time checks with static delays and limit possible values in the pattern parser. Clamp 'repeats' as well, instead of relying on overflow Rework internal loop & template runners, so there's no need to proxy status and led struct all over. Instead, simply declare two separate funcs that are supposed to be run during the pattern and at it's end. Instead of cloning the 'delays' array, implement a sequence iterator that is tracking the currently used delay and it's repeats, and which also jumps to the next entry in the list. (but, this uses c++ iterators, and *may* be prone to errors) Implement small terminal command 'led <ID> [<PATTERN STRING>]'. Running without the 'PATTERN STRING' resets the LED to the values in settings. Move re2c-generated parser back into a separate file, use .cpp.inc as include and .re as the source ref. #2476, fix 'finite' pattern handling