mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 06:01:23 +00:00
Fix pattern handling optimalization
Check for zero duration before skipping step. This fixes pattern echo "0 1000 10 2550 0 1000" > pattern which should do [ .-xXx-.] but does [ Xx-.] Signed-off-by: Pavel Machek <pavel@ucw.cz> Suggested-by: Jacek Anaszewski <jacek.anaszewski@gmail.com> Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
This commit is contained in:
parent
8dbac65f5c
commit
1b50bb4d36
1 changed files with 4 additions and 3 deletions
|
@ -87,9 +87,10 @@ static void pattern_trig_timer_function(struct timer_list *t)
|
||||||
data->curr->brightness);
|
data->curr->brightness);
|
||||||
mod_timer(&data->timer,
|
mod_timer(&data->timer,
|
||||||
jiffies + msecs_to_jiffies(data->curr->delta_t));
|
jiffies + msecs_to_jiffies(data->curr->delta_t));
|
||||||
|
if (!data->next->delta_t) {
|
||||||
/* Skip the tuple with zero duration */
|
/* Skip the tuple with zero duration */
|
||||||
pattern_trig_update_patterns(data);
|
pattern_trig_update_patterns(data);
|
||||||
|
}
|
||||||
/* Select next tuple */
|
/* Select next tuple */
|
||||||
pattern_trig_update_patterns(data);
|
pattern_trig_update_patterns(data);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue