Auto dim blade issue

A simple alpha layer set to add 50% opacity black over a style is messing with my Sparkle, and I have no idea why.
Without that layer, looks great. With it, I get strobe like flashing.
Any idea?
Styles posted here. First works cleanly.


This is flashy


Could it be oscillating?
Low battery → dim → less power draw → voltage goes up → dimming turns off → higher power draw → lower battery voltage → go back to beginning

IF that’s the case, then the solution is to replace IsLessThan with something that has hysteresis; it would only reset back to no dimming once the voltage increases significantly.

Sounds plausible indeed.
Not sure at the moment what to replace with, but someday.
Dealing with other issues See SAVE STATE thread

I had a similar issue with the power save mode and blade flicker a while back. Ended up giving up on it and just getting extra batteries. When it went into power save, the audio flicker would be way more pronounced, to the point it was jarring.

We can probably use HoldPeak<> function in OS6 to handle. I’ll put it on the list for the OS6 library additions.


Another solution might be to use smoothstep or something to make a gradual dimming function. If the function is gradual enough, it won’t oscillate.

So would setting it to something pretty large suffice to keep it under the threshold long enough (indefinitely really since the battery is not going to come back up without charging) ?
Something like AlphaL<Black,Scale<HoldPeak<BatteryLevel,Int<999999>,Int<1>>,Int<0>,Int<16384>>>,
Wait - that’s not right.

No, that’s not how HoldPeak works. I’ll have to mess with it when adding to the library. Don’t have time right now.

I gave up on this months ago and just don’t run the blade dim function anymore. I dunno about others but with what I run (V2 PixelSticks) dimming would only give another 10 minutes at best. Even with my play blades running RGB pixels I never saw that much more battery life. Just carry spares.

Did you have oscillations too?
Did you tell anybody about it?

Didn’t think it a big deal since I solved the concern when I re-wrote the bladestyle. At the time I just figured it was a 5.7-5.9 glitch.