No response from board. Need error to catch this?

So this is interesting.
Someone had a config file with the same data pin and power pins assigned to multiple blades:

 { 0, WS281XBladePtr<128, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
	WS281XBladePtr<16, bladePin, Color8::GRB, PowerPINS<bladePowerPin2,   bladePowerPin3> >(),
	WS281XBladePtr<16, bladePin, Color8::GRB, PowerPINS<bladePowerPin2,   bladePowerPin3> >(),
    WS281XBladePtr<1, blade2Pin, Color8::GRB, PowerPINS<bladePowerPin1> >(),
    SimpleBladePtr<CH2LED,NoLED,NoLED,NoLED,bladePowerPin4,-1,-1,-1>(),
    SimpleBladePtr<CH1LED,NoLED,NoLED,NoLED,bladePowerPin5,-1,-1,-1>(), 
	WS281XBladePtr<4, blade3Pin, Color8::GRB, PowerPINS<bladePowerPin6> >(),
CONFIGARRAY(presets) },

While of course this is not correct, it compiles and uploads successfully with any combination, but causes a non-responding board and Serial Monitor only under certain conditions.
.
In testing this further, it seems that the issue arises when 2 of the blades are the same number of pixels. I tested commenting out one blade at a time, ie:

leaving the 128 and one of the 16 blades

     WS281XBladePtr<128, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
	 WS281XBladePtr<16, bladePin, Color8::GRB, PowerPINS<bladePowerPin2,   bladePowerPin3> >(),
	 // WS281XBladePtr<16, bladePin, Color8::GRB, PowerPINS<bladePowerPin2,   bladePowerPin3> >(),

This compiles, uploads, and Serial Monitor appears fine (no idea what it’s doing on the blades as this test is just USB-> raw board only, no SD card.)

However, leaving the 2 identical blades:

    // WS281XBladePtr<128, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
	WS281XBladePtr<16, bladePin, Color8::GRB, PowerPINS<bladePowerPin2,   bladePowerPin3> >(),
	WS281XBladePtr<16, bladePin, Color8::GRB, PowerPINS<bladePowerPin2,   bladePowerPin3> >(),

compiles, uploads, but Serial Monitor is blank and apparently the board is unresponsive.

To confirm the identical blades is the issue, I changed one of them by 1 pixel:

    // WS281XBladePtr<128, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
	WS281XBladePtr<17, bladePin, Color8::GRB, PowerPINS<bladePowerPin2,   bladePowerPin3> >(),
	WS281XBladePtr<16, bladePin, Color8::GRB, PowerPINS<bladePowerPin2,   bladePowerPin3> >(),

which indeed compiles, uploads, and Serial Monitor appears fine again.

TL;DR
Maybe we should have an error generated if this condition exists in the BladeConfig? (if possible to detect)

Interesting.
It’s at least possible to detect at runtime, because these two blades will have the same pointer, and that is why it fails.
Detecting it at compile time would be even better, but I suspect that’s not possible, since it is perfectly valid to have multiple of the same blade if they are in separate blade array entries and not activated at the same time.

I think I’m going to leave this the way it is.
It’s a rare problem, and the code needed to detect it takes space that isn’t needed 99.9% of the time. I was hoping to find a way that takes little or no space, but so far it hasn’t worked out that way.

Sure. People just need to not do it wrong :slight_smile: Maybe a note on the POD page will suffice.