First Time with SubBlades, does my Blade Define look right?

I have 18 pixels on the strip, want each 9 to have independent behavior. I have never used subblades, I guess there is a first time for everything. Its the 4th and 5th blade below, just sanity check:

 { 0, WS281XBladePtr<130, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),

WS281XBladePtr<16, blade2Pin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),

WS281XBladePtr<1, blade3Pin, Color8::GRB, PowerPINS<bladePowerPin1>>(),

SubBlade(0,8,WX281XBladePtr<18, blade4Pin, Color8::GRB, PowerPINS<bladePowerPin4>>()), 

CONFIGARRAY(presets) },

Looks ok to me.

1 Like

I had to fix one minor spelling error. “WS” not “WX” in my main subblade line. It compiles now, lets do this!!!

 { 0, WS281XBladePtr<130, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),

WS281XBladePtr<16, blade2Pin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),

WS281XBladePtr<1, blade3Pin, Color8::GRB, PowerPINS<bladePowerPin1>>(),

SubBlade(0,8,WS281XBladePtr<18, blade4Pin, Color8::GRB, PowerPINS<bladePowerPin4>>()), 

CONFIGARRAY(presets) },

@MegtoothSith That’s good! You’ve taken your first step into a larger world.


Why does the phrase “is it possible to learn this power” come to mind?

1 Like

It worked briefly. Think I kinked the strip putting it into the chassis, the second strip in the subblade, so I have to replace that tonight. Initially it worked, but as they warmed up, the second strip started glitching. It’ll be an easy enough fix.

I still used a simple bladestyle for those accents. This saber has 5 blades, and 5 bladestyles in each preset. So Fernando’s new bladestyles would have really limited the number of presets. I needed the 6 that are on there. I can clone all of them to add new presets, but the end user won’t be able to edit blades 4 and 5. I think it’ll work out fine. I have learned the power.

If you’re using the library for the Accent code you should fit more than before, not less. Unless you’re building multiple super large combos. You can create single styles and have one per preset like before or you can build an option set up and reuse the code for multiple presets to get more unique combinations

On a saber with 5 blades, I get that I could clone one preset, and have unlimited with those bladestyles. But your still stuck with just that base style. I can’t mix a fireblade with a rotoscope. So, I at least have to build a main rotoscope style and a fireblade style I can clone. Each preset has 5 bladestyles in it. I have 5 presets on this Proffie 2.2 with your bladestyles and it is 97% full on the config. Now, I can clone the presets and add more, I get that. But this isn’t a single bladed saber. If I added your bladestyles for the cycle, then I’d only have room for 1 or 2 presets before cache is full.

Are you using complex styles for the accents? That seems really high.

I just threw together a 5 blade, 10 preset config using the library’s capabilities with 36+ unique combinations for each accent and it’s only 83%. Maybe next week if we can coordinate schedules I’ll have you on a live show so I can walk you through how to use the library to maximize styles and configs, particularly with multiple accents. In all my testing the possible style combinations in OS6 should fit more not less if built correctly.

just a quick example.

I’ll keep reading, here is my config:

You need this define otherwise you’re losing a bunch of memory right off the bat.


And I’d use this one unless you absolutely need to do diagnostics on the saber, these two combined will free up a bunch of space. Then build “option” styles for the accents using the “Custom” build with the effects you want and repeat in the various presets and you’ll fit a ton more.


what are parser styles? I’ll add in the disable diagnostics on this saber, and save some space that way. My Kylo chamber, I have to fix that one, I guess I picked it to be blue when on. I’ll work more on the config tomorrow.

From here until its #endif:

They are style that shows up when editing styles in the proffieos workbench.

As noted, they are the original WebUSB styles, the Edit Mode styles replace them so they are no longer needed and very rarely used but they take up a lot of memory.
You can easily double the number of presets if you disable. This define is pretty important if you’re running my prop with Edit Mode. It’s one of the required defines in the Edit Mode set up documentation.
And if you really wanted any of them, just create from the library and add and they’ll use much less memory. Mixing the parser styles with new styles takes up much more memory than if you use updated versions from library and the library versions will have all current effects and editing capabilities, the parser styles will not.

Is it worth having them disabled by default going forward and using a define to explicitely enable them?

I don’t think so as they’ve been part of OS for so long, usually Fredrik prefers if it something that’s been there all along you disable with a define to keep the OS consistent for users.
That define has been listed as Required/recommended in the documentation since pre-Alpha so I assumed everyone was already using.
I’ll make it more prominent, but if you’re using Edit Mode or my prop without that define you’ll be severely limited, all the optimization I am doing in the library is dependent on disabling those styles. The amount of styles you can fit is easily double, in some cases triple depending on number of blades.

is &stylecharging a parser bladestyle? Do you have anything similar in your library?

Sketch uses 233968 bytes (89%) of program storage space. Maximum is 262144 bytes.

Same number of presets. I guess a request eventually for the style library is for a battery bladestyle, so we can have a traditional preset that displays battery level on blade. That is a frequent request by customers. I realize we have on demand battery spoken level, and that you have on demand battery level options in your blades. I guess this will all just take some time getting used to. I might be old and set in my ways. Now off to test.