I am a fool. Did not have DYNAMIC_BLADE_DIMMING enabled in the config, DimBlade works fine now. Thanks everyone for the help ![]()
This won’t really work as intended, because these voltages are different from the input voltages the ProffieOS measures. You could possibly implement your own voltage measuring code, but if you’re just going to LSAnalogWrite() yourself, then why bother.
You do need to choos one or the other though. (Sort of, keep reading..)
I’m confused why you think dimblade will help with this.
So, DYNAMIC_BLADE_DIMMING works without DimBlade. If you have DimBlade in the config, it should work without DYNAMIC_BLADE_DIMMING, but of course you can’t change the value on demand. (It’s static, not dynamic.)
There is one other way to do all of this that you might want to consider:
If you write a class like this:
SimpleColor color_proxy_color;
struct ColorProxy {
void Run(BladeBase* blade) {}
SimpleColor getColor(int led) { return color_proxy_color; }
};
Then you can set your style like this:
StyleNormalPtr<ColorProxy, BLACK, 800, 800>()
And finally, instead of LSAnalogWrite(X) you do: color_proxy_color.b = (X) * 2;
Then you can still have control of the base color, while ProffieOS handles dimming, clashes and a few other things.
(Note, I set the clash color to BLACK as that will make clashes show up on a single-color blade.)
Sorry for the late response, was traveling for Star Wars Nite!
I should have clarified, I just want to set the brightness lower while still having all the blade effects Proffie normally has. Initially I thought PWM would be how to do it but I believe DimBlade works as well.
Oh that’s really weird. DimBlade only started working for me after I enabled DYNAMIC_BLADE_DIMMING.
Will try out the SimpleColor class when I get back to the workshop! Thanks for all the help.
DimBlade and/or DYNAMIC_BLADE_DIMMING just take the values from the style and multiply them by some value, like 0.1 or something.
One neat trick though, is that “clash” generates “overdrive” values, which means that if you blade is normally lit at 10%, it will got to 100% briefly when a clash occurs. (Assuming you use the right kind of clash, the new responsive clash templates don’t generate overdrive values.)