markcellis / X-KeyPad

2 stars 0 forks source link

Delayed indication of Substring #114

Closed GladYouAsked closed 1 month ago

GladYouAsked commented 1 month ago

Hello, I am not sure if this is a bug or just a limitation in the interface to the Stream Deck.

I am displaying a substring on a StreamDeck+ Touch Strip using layouts. In principle this works OK.

But sometimes some characters at the end of the string

How it should look: DelayedString_03

This is the incomplete indication (the "1" is missing): DelayedString_02

The lines definition (yes, the string is always shown completely in the X-KeyPad Plugin-Interface): DelayedString_01

Additional Info: This also happens when displaying the substring on a button. In the example shown below the string is shown completely on the touch strip, but incompletely on the button. Pressing the button solves the issue: DelayedString_04

I am using X-Plane 12.1.1 X-Keypad 1.6.0 Stream Deck Software 6.6.1

sanderdatema commented 1 month ago

Can you show the contents (in a code block) of your layout(s) as well, please?

GladYouAsked commented 1 month ago

Sure, here is the layout I am using (slightly modified in the meantime for the position of "line1")

{ "id": "AW109SP.MFD_Rotary_Left.xkeypad.layout", "items": [ { "key": "icon", "type": "pixmap", "rect": [0, 0, 200, 100], "zOrder": 1 }, { "key": "line0", "type": "text", "rect": [60, 0, 140, 30], "font": {"size": 27, "weight": 350 }, "color": "#0ea116", "alignment": "left", "zOrder": 2 }, { "key": "line1", "type": "text", "rect": [60, 48, 140, 30], "font": {"size": 27, "weight": 350 }, "color": "#0ea116", "alignment": "left", "zOrder": 3 } ] }

sanderdatema commented 1 month ago

Just for readability:

{
    "id": "AW109SP.MFD_Rotary_Left.xkeypad.layout",
    "items": [
        {
            "key": "icon",
            "type": "pixmap",
            "rect": [
                0,
                0,
                200,
                100
            ],
            "zOrder": 1
        },
        {
            "key": "line0",
            "type": "text",
            "rect": [
                60,
                0,
                140,
                30
            ],
            "font": {
                "size": 27,
                "weight": 350
            },
            "color": "#0ea116",
            "alignment": "left",
            "zOrder": 2
        },
        {
            "key": "line1",
            "type": "text",
            "rect": [
                60,
                48,
                140,
                30
            ],
            "font": {
                "size": 27,
                "weight": 350
            },
            "color": "#0ea116",
            "alignment": "left",
            "zOrder": 3
        }
    ]
}

(use three ticks (```) before and after your code to get a code formatting block. For syntax highlighting, add the language after the first three ticks, so ```json in this case.)

sanderdatema commented 1 month ago

Your layout seems pretty straightforward. And I take it it's the only one. So no conflicts there. In that case it might be a bug on the Stream Deck side, as (as far as I know) X-KeyPad just sends the whole layout over to the Stream Deck to render.

markcellis commented 1 month ago

I suspect it is getting clipped where it gets too big for the rectangle. Try making the size and weight smaller. On the key try making the size smaller.

GladYouAsked commented 1 month ago

@sanderdatema : Thanks for the tip with the code formatting block, I was looking for that! @markcellis : Tried it with a "size": 17 instead of "size": 27 but the same result. As it is displayed correctly in the end I assume the text fits in the box?

GladYouAsked commented 1 month ago

I have to correct my statement in the initial posting:

For the lines definition: the string is NOT shown completely in the X-KeyPad Plugin-Interface. I must have tricked myself by updating the page by selecting it. Now I have screenshot of the X-KeyPad Plugin and the DataRefEditor side-by-side:

While the string in the dataref-Editor says "CRS VOR1", the "1" is missing in X-KeyPad.

image

Am I using the "String Size:8" correctly (maximum number of characters to be displayed: 8)? But as it works "in most cases", this should be OK.

image

markcellis commented 1 month ago

What happens if you set the end index to 7?

markcellis commented 1 month ago

Since I don't have that aircraft it might make sense for me to take a look at what is going. Can you contact me on our Discord server so we can setup a time?

https://discord.gg/M4YFdrvzt8

markcellis commented 1 month ago

This will be in 1.6.1 Beta 5