Using Functions Arguments

Hi,
I’ve tried to figure this out, but I’m just not quite getting it. I have created a bladestyle (using early access library) that I want to re-use for several presets but with a different default color, for example, a Luke 1(green), a Luke2(blue) and a Mace Windu(purple), etc.

I’m building this for a quad-blade-which needs to repeat the style multiple times.
Here is my draft config work-in-progress:
#ifdef CONFIG_TOP #include “proffieboard_config.h” #define BLADE_DETECT_PIN - Pastebin.com

To cut to the quick, here is a section I’d like to edit:

{ "Luke;common", "tracks/Luke.wav",
    StylePtr<ControlMainRotoscopeSubtleBaseColor>()
    StylePtr<ControlMainRotoscopeSubtleBaseColor>()
    StylePtr<ControlMainRotoscopeSubtleBaseColor>()
    StylePtr<ControlMainRotoscopeSubtleBaseColor>()
    StylePtr<ControlMainRotoscopeSubtleBaseColor>()},

{ "Luke4;common", "tracks/Luke5.wav",
    StylePtr<ControlMainRotoscopeSubtleBaseColor>()
    StylePtr<ControlMainRotoscopeSubtleBaseColor>()
    StylePtr<ControlMainRotoscopeSubtleBaseColor>()
    StylePtr<ControlMainRotoscopeSubtleBaseColor>()
    StylePtr<ControlMainRotoscopeSubtleBaseColor>()},

How could I change the second style to have a different base color?
I don’t suppose it could be as simple as:
StylePtr(BASE_COLOR_ARG = GREEN)},

thanks…
Js

Almost.

this might help too:

I’ve read the posts you’ve linked several times and I’m still just not quite getting it…

Would this work to set the base color to GREEN:
StylePtr<ControlMainRotoscopeSubtleBaseColor>(GREEN)

or maybe…
StylePtr<ControlMainRotoscopeSubtleBaseColor<GREEN>>()

If that one works, then I think i’ve got it…

and that would mean:
StylePtr<ControlMainRotoscopeSubtleBaseColor<CYAN,,2>>()
would set the base color to CYAN and use the second style selected within the bladestyle, which is selected from:
image
C standard indexing… and starts counting with 0 as the default, with 2 being the third style option?

thanks again,
js

Is this still valid if they’re using the using syntax?

If they are valid, then @jedi_j_stream I think they’d look like this?:

StylePtr<ControlMainRotoScopeSubtleBaseColor>("0,65535,0")

The very first entry in the string would be BASE_COLOR_ARG referencing the pod page NoSloppy linked, and then the RGB16 color value for Green would be that 0,65535,0.

1 Like

Yes, the “using” syntax is really just moving things around, there is no difference in the end result.

1 Like

Use my config helper tool, it will read the style and handle the style arguments for you, just watch the videos at the top. You can then use the interface to set the arguments and it handles the syntax.