Aircoookie / WLED

Control WS2812B and many more types of digital RGB LEDs with an ESP8266 or ESP32 over WiFi!
https://kno.wled.ge
MIT License
14.54k stars 3.11k forks source link

Clock preset on Matrix display rendered out of bounds #4057

Open Plawasan opened 1 month ago

Plawasan commented 1 month ago

What happened?

I'm using a WS2812b 32x8 matrix display with WLED 0.15.0-b4. I'm using the Scrolling Text present with "#HHMM" as the segment title to display a clock. This has always been working perfectly fine however in the latest beta, the text gets sometimes (I have yet to find any pattern to it) misaligned:

image

When I then switch to a different preset and back to my "clock" preset, it's rendered correctly:

image

LED Config:

image

2D config:

image

To Reproduce Bug

Create a Scrolling text preset, update segment name to #HHMM Wait?

Expected Behavior

Display entire text centered

Install Method

Binary from WLED.me

What version of WLED?

0.15.0-b4

Which microcontroller/board are you seeing the problem on?

ESP32

Relevant log/trace output

Preset:

   "14":{
      "on":true,
      "bri":65,
      "transition":7,
      "mainseg":0,
      "seg":[
         {
            "id":0,
            "start":0,
            "stop":32,
            "startY":0,
            "stopY":8,
            "grp":1,
            "spc":0,
            "of":0,
            "on":true,
            "frz":false,
            "bri":255,
            "cct":127,
            "set":0,
            "n":"#HHMM",
            "col":[
               [
                  255,
                  0,
                  0
               ],
               [
                  0,
                  0,
                  0
               ],
               [
                  0,
                  0,
                  255
               ]
            ],
            "fx":122,
            "sx":128,
            "ix":155,
            "pal":0,
            "c1":0,
            "c2":128,
            "c3":16,
            "sel":true,
            "rev":false,
            "mi":false,
            "rY":false,
            "mY":false,
            "tp":false,
            "o1":true,
            "o2":false,
            "o3":false,
            "si":0,
            "m12":0
         },
         {
            "stop":0
         },
         {
            "stop":0
         },
         {
            "stop":0
         },
         {
            "stop":0
         },
         {
            "stop":0
         },
         {
            "stop":0
         },
         {
            "stop":0
         },
         {
            "stop":0
         },
         {
            "stop":0
         },
         {
            "stop":0
         },
         {
            "stop":0
         },
         {
            "stop":0
         },
         {
            "stop":0
         },
         {
            "stop":0
         },
         {
            "stop":0
         },
         {
            "stop":0
         },
         {
            "stop":0
         },
         {
            "stop":0
         },
         {
            "stop":0
         },
         {
            "stop":0
         },
         {
            "stop":0
         },
         {
            "stop":0
         },
         {
            "stop":0
         },
         {
            "stop":0
         },
         {
            "stop":0
         },
         {
            "stop":0
         },
         {
            "stop":0
         },
         {
            "stop":0
         },
         {
            "stop":0
         },
         {
            "stop":0
         },
         {
            "stop":0
         }
      ],
      "n":"Clock"
   },

Anything else?

No response

Code of Conduct

dosipod commented 1 month ago

@Plawasan I recall something on older builds when loading presets with scrolling text . But testing now on latest from here https://github.com/Aircoookie/WLED/actions/runs/9724727410/job/26841257355 My 8x32 setup works as expected and i see the time with scrolling text centered as you see in the example with 5 leds space on one side and 4 on the other side ( that would change if you change the sliders ) image

Please check the Y offset slider ( and other sliders to be centered ) before saving presets .If you did that then clarify more as saying "sometimes" means at random and not sure how to test that as i did save a preset with text and it worked as expected .The same was also true on 32x16 and also on 32x8 segment created on the 32x16 . If all fails then might be reset your unit ( after backup ) and verify further

Plawasan commented 1 month ago

I haven't seen the original issue in 24h but there's still something inconsistent about the alignment of the text. This is how the clock came up this morning after being switched off for the night, notice it's aligned too far left:

image

And then this is what it looked like after I've simply switched to a different preset and back to the default one (the one I posted above) - now it's correctly centered:

image

Btw my Y Offset it as 155 but that affects position along the Y axis (up/down), not left to right.

dosipod commented 1 month ago

It is true the Y offset will change the up/down , i just wanted all the sliders to be default . The only difference i can see is you used a bin from WLED.me . So not really sure how to replicate that ( I actually tried to force is to have an offset but could only do that by adding an offset in the 2D page which clearly not the case with you ).

If you reset the unit and used the bin from the link i listed then we could still try to keep your preset for few days but you have wrongly pasted that as it is truncated at the end , save it to text file and add it here and we could try .

Plawasan commented 1 month ago

Humor me, where do I find the binary you want me to test (I only see yaml)? The .bin I'm using came from the release page for the latest beta on the WLED github page.

I've pasted only the relevant preset however my full config and all presets are attached. wled_cfg_WLED-Clock.json wled_presets_WLED-Clock.json

dosipod commented 1 month ago

The run i used the bins from are here https://github.com/Aircoookie/WLED/actions/runs/9724727410/job/26841257355