rpi-ws2812-server icon indicating copy to clipboard operation
rpi-ws2812-server copied to clipboard

Issue with -p flag. The animation is not smooth

Open leoheck opened this issue 5 years ago • 3 comments

Hi, I've noticed that running the same animation through "-p" and -f yields different behaviors.

I made a smooth animation using a sile and the -f flag.

setup 1,8,3
init

fill 1,ff3300,0,8

fade 1,0,80,16
render

delay 100

do
    fade 1,79,10,16
    fade 1,11,80,26
    delay 100
    render
loop 3

fade 1,80,0,16

Now, converting it to a script using the -p is not smooth anymore,

Can you confirm?


led_channel=1
led_count=8
led_type=3
led_invert=0
led_gpio=18
led_brightness=20

rgb_yellow=ffb100

read -r -d '' animation <<- EOM
setup ${led_channel},${led_count},${led_type},${led_invert},${led_brightness},${led_gpio}
init

fill 1,${rgb_yellow},0,8

fade 1,0,80,16
render

delay 100

fade 1,79,10,16
fade 1,11,80,26
delay 100
render

fade 1,79,10,16
fade 1,11,80,26
delay 100
render

fade 1,79,10,16
fade 1,11,80,26
delay 100
render

fade 1,80,0,16
EOM

echo "$animation" > /dev/ws281x

It looks like the fade command is different between these two versions

leoheck avatar Dec 14 '19 21:12 leoheck

I just removed the last part of my command and it looks like it working better

Replacing this

setup ${led_channel},${led_count},${led_type},${led_invert},${led_brightness},${led_gpio}

with this

setup ${led_channel},${led_count},${led_type}

leoheck avatar Dec 14 '19 22:12 leoheck

I was not at home this weekend will take a look at it later

tom-2015 avatar Dec 16 '19 17:12 tom-2015

Sure, when you have time.

leoheck avatar Dec 16 '19 19:12 leoheck