Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected behavior of groupings in segments with "Solid Pattern Tri" effect #2540

Closed
1 task done
ezcGman opened this issue Feb 10, 2022 · 2 comments
Closed
1 task done
Labels

Comments

@ezcGman
Copy link
Contributor

ezcGman commented Feb 10, 2022

What happened?

Grouping in segments don't behave as stated in the Wiki anymore, they even behave differently per segment. It used to work in 12.x as also in 13.0-b6.

So here's what I do:
I have an IKEA Kallax since over a year that has my gaming console collection in it. each cube is a segment of 18 LEDs. Two cubes (segment 0 & 6) house PlayStations, so I light up these cubes in three colors, so each of these PlayStation segments are configured like this:

  • 18 physical LEDs
  • Grouping set to 6 (thus creating 3 virtual LEDs)
  • Configured the three colors in the color picker
  • Configured "Solid Pattern Tri" as effect
    Worked as expected: First 6 physical LEDs light up in color one, physical LEDs 7-12 in color two and physical LEDs 13-18 in color three

Now after upgrading to 13.0-b6, both cubes were just blue. I played around with the config and one cube (segment 3) I could get the three times 6 LEDs back by setting grouping to two, thus creating 9 virtual LEDs. But in real life, they light up as three virtual LEDs.
The other cube (segment 6) is impossible to get back: I tried every combo and sometimes i see 2x 5 LEDs + 3 LEDs having different colors, or 2x 9... or 1x16 and 1x2... No matter what I try.

Some pics and configs with various grouoing, all are:

  • 18 physical LEDs
  • Configured the three colors in the color picker
  • Configured "Solid Pattern Tri" as effect

Grouping set to 6 (thus creating 3 virtual LEDs):
On 13.0-b0:
IMG_20220210_234616

On 13.0-b6 for both segments:
IMG_20220210_234639

Grouping set to 2 (thus creating 9 virtual LEDs):
On 13.0-b6 for segment 3:
IMG_20220210_234616

On 13.0-b6 for segment 6:
IMG_20220210_235308

Grouping set to 3 (thus creating 9 virtual LEDs):
On 13.0-b6 for segment 3:
IMG_20220210_235808

On 13.0-b6 for segment 6:
IMG_20220210_235853

So something is clearly off, as I would at least expect the two segments to behave the same.

Other useful info:

  • Tried the latest binary on wled.me (2112080) build, as also compiled a bin myself using current master (2202030): Both the same issue.
  • Configured two outputs with 90 LEDs each
  • Using a QuinLED-Dig-Uno with ESP8266

Let me know if I can help any further!

To Reproduce Bug

Here's my presets.json with grouping set to "6" which is what I understand the correct setting to get three times 6 LEDs light up in different colors using the "Solid Pattern Tri" effect (and which worked on 13.0-b0 and earlier), but both segments are just blue:

{
	"0": {},
	"1": {
		"n": "Default",
		"on": true,
		"bri": 255,
		"transition": 7,
		"mainseg": 0,
		"seg": [{
			"id": 0,
			"start": 0,
			"stop": 18,
			"grp": 1,
			"spc": 0,
			"of": 0,
			"on": true,
			"frz": false,
			"bri": 255,
			"cct": 127,
			"n": "Mega Drive",
			"col": [
				[28, 97, 172],
				[0, 0, 0],
				[0, 0, 0]
			],
			"fx": 0,
			"sx": 128,
			"ix": 128,
			"pal": 0,
			"sel": false,
			"rev": false,
			"mi": false
		}, {
			"id": 1,
			"start": 18,
			"stop": 36,
			"grp": 1,
			"spc": 0,
			"of": 0,
			"on": true,
			"frz": false,
			"bri": 255,
			"cct": 127,
			"n": "SNES",
			"col": [
				[231, 0, 9],
				[0, 0, 0],
				[0, 0, 0]
			],
			"fx": 0,
			"sx": 0,
			"ix": 0,
			"pal": 0,
			"sel": false,
			"rev": false,
			"mi": false
		}, {
			"id": 2,
			"start": 36,
			"stop": 54,
			"grp": 1,
			"spc": 0,
			"of": 0,
			"on": true,
			"frz": false,
			"bri": 255,
			"cct": 127,
			"n": "Xbox",
			"col": [
				[16, 124, 17],
				[0, 0, 0],
				[0, 0, 0]
			],
			"fx": 0,
			"sx": 0,
			"ix": 0,
			"pal": 0,
			"sel": false,
			"rev": false,
			"mi": false
		}, {
			"id": 3,
			"start": 54,
			"stop": 72,
			"grp": 6,
			"spc": 0,
			"of": 0,
			"on": true,
			"frz": false,
			"bri": 255,
			"cct": 127,
			"n": "PlayStation",
			"col": [
				[46, 109, 180],
				[223, 0, 36],
				[243, 195, 0]
			],
			"fx": 84,
			"sx": 87,
			"ix": 86,
			"pal": 0,
			"sel": false,
			"rev": false,
			"mi": false
		}, {
			"id": 4,
			"start": 72,
			"stop": 90,
			"grp": 1,
			"spc": 0,
			"of": 0,
			"on": true,
			"frz": false,
			"bri": 255,
			"cct": 127,
			"n": "Dreamcast",
			"col": [
				[28, 97, 172],
				[0, 0, 0],
				[0, 0, 0]
			],
			"fx": 0,
			"sx": 0,
			"ix": 0,
			"pal": 0,
			"sel": false,
			"rev": false,
			"mi": false
		}, {
			"id": 5,
			"start": 90,
			"stop": 108,
			"grp": 1,
			"spc": 0,
			"of": 0,
			"on": true,
			"frz": false,
			"bri": 255,
			"cct": 127,
			"n": "Game Cube",
			"col": [
				[255, 0, 0],
				[0, 0, 0],
				[0, 0, 0]
			],
			"fx": 0,
			"sx": 128,
			"ix": 128,
			"pal": 0,
			"sel": false,
			"rev": false,
			"mi": false
		}, {
			"id": 6,
			"start": 108,
			"stop": 126,
			"grp": 6,
			"spc": 0,
			"of": 0,
			"on": true,
			"frz": false,
			"bri": 255,
			"cct": 127,
			"n": "PlayStation 3",
			"col": [
				[46, 109, 180],
				[223, 0, 36],
				[243, 195, 0]
			],
			"fx": 84,
			"sx": 128,
			"ix": 128,
			"pal": 0,
			"sel": true,
			"rev": false,
			"mi": false
		}, {
			"id": 7,
			"start": 126,
			"stop": 144,
			"grp": 1,
			"spc": 0,
			"of": 0,
			"on": true,
			"frz": false,
			"bri": 255,
			"cct": 127,
			"n": "Xbox One",
			"col": [
				[0, 207, 48],
				[0, 0, 0],
				[0, 0, 0]
			],
			"fx": 0,
			"sx": 128,
			"ix": 128,
			"pal": 0,
			"sel": false,
			"rev": false,
			"mi": false
		}, {
			"id": 8,
			"start": 144,
			"stop": 162,
			"grp": 1,
			"spc": 0,
			"of": 0,
			"on": true,
			"frz": false,
			"bri": 255,
			"cct": 127,
			"n": "Wii",
			"col": [
				[231, 0, 9],
				[0, 0, 0],
				[0, 0, 0]
			],
			"fx": 0,
			"sx": 128,
			"ix": 128,
			"pal": 0,
			"sel": false,
			"rev": false,
			"mi": false
		}, {
			"id": 9,
			"start": 162,
			"stop": 180,
			"grp": 1,
			"spc": 0,
			"of": 0,
			"on": true,
			"frz": false,
			"bri": 255,
			"cct": 127,
			"n": "Handhelds",
			"col": [
				[99, 0, 156],
				[0, 0, 0],
				[0, 0, 0]
			],
			"fx": 0,
			"sx": 128,
			"ix": 128,
			"pal": 0,
			"sel": false,
			"rev": false,
			"mi": false
		}, {
			"stop": 0
		}, {
			"stop": 0
		}, {
			"stop": 0
		}, {
			"stop": 0
		}, {
			"stop": 0
		}, {
			"stop": 0
		}]
	}
}

Expected Behavior

Three virtual LEDs (grouping 6 physical together). First virtual LED lighting up in color #1, second virtual LED lighting up in color #2, third virtual LED lighting up in color #3.

Install Method

Self-Compiled

What version of WLED?

0.13.0-b6

Which microcontroller/board are you seeing the problem on?

ESP8266

Relevant log/trace output

No response

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@ezcGman ezcGman added the bug label Feb 10, 2022
@Aircoookie
Copy link
Owner

Thank you for the detailed report!

The "Solid Pattern Tri" effect uses the intensity slider to set the width of each color area. As you have already set 6 physical LEDs to group as one virtual one using the Grouping feature, you want the effect to only set a single LED per color, which it does if you move the intensity slider to 0 (left) - in your preset JSON you have segment 3 intensity set to 86 and segment 6 intensity set to 128, which also explains why they behaved differently when you tried a Grouping of 2.

This doesn't yet explain to me though why you are seeing different behavior on earlier versions - neither code related to Grouping nor the effect have changed significantly in between.

Great setup by the way :)

@ezcGman
Copy link
Contributor Author

ezcGman commented Feb 11, 2022

Hey AC,

thanks for the reply and warm words to my project!

The "Solid Pattern Tri" effect uses the intensity slider to set the width of each color area. As you have already set 6 physical LEDs to group as one virtual one using the Grouping feature, you want the effect to only set a single LED per color, which it does if you move the intensity slider to 0 (left) - in your preset JSON you have segment 3 intensity set to 86 and segment 6 intensity set to 128, which also explains why they behaved differently when you tried a Grouping of 2.

Oooohhhhh 🤦 I did not pay attention to intensity on that effect and actually curious how that intensity changed from upgrading from b0 to b6... Segment 6 having a different setting maaaaay be because I created it under b6, so it was a completely new segment and I didn't pay attention to the intensity slider.

Thanks again for the reply and sorry about the wrong bug call 🙇

Greetings,

Andy!

P.S.: Totally forgot: After changing the intensity to zero, it again works as expected :)

@ezcGman ezcGman closed this as completed Feb 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants