Open GladYouAsked opened 3 months ago
I'll have to try and reproduce this. I notice that you are using left and right justification with just a few pixels between the rectangles. I'm wondering if the SD+ SDK trims the text of white space when using justification. Maybe you could try leaving more space between the rectangles on the same line.
Hello Mark,
Short summary of the issue: There may be an issue with the substring handling for space characters. It seems space characters are ignored (not displayed) if being located at the beginning or the end of a substring. It seems the space character is considered by X-KeyPad (at least in the User Interface of X-KeyPad), but it does not get considered on the SD+.
SD Software: 6.6.1 (20596) X-KeyPad: 1.6.1 beta 5
(sorry for this detailed description below, maybe we do a discord session again)
What I want to do:
This is the cockpit display that I want to recreate on the Stream Deck Plus (SD+): [Figure 1: Display Screenshot]
This display consists of three columns with messages. I am now focusing on the central column and the following text: BATT DISCH XMSN OIL PRES BUS TIE
What I have so far:
I have succeeded create the display on the SD+, but the issue mentioned above remains: [Figure 2: SD+ Indication]
As you know the SD+ has 4x segments. The string in the central display is located at the border of two segments and has to be separated into substrings. In this case TouchSegment#3 and TouchSegment#4 (TS#3 and TS#4) are involved.
Issue / Expected behavior:
Even though there should be trailing space character at the end of "BATT", there is none. This results in an indication of "BATTDISCH" instead of "BATT DISCH" on the SD+.
Same applies for "XMSNOIL PRES", which should be "XMSN OIL PRES".
Note: Please ignore the differences between the SD+-text in Figure 2 and the display screenshot in Figure 1: Colors are not represented and the indication/sorting of the messages in the left and right column are not correct. Also some strings are clipped due to length. This is not relevant for the issue mentioned above.
How did I implement this?
1.) There is a string including the display messages, CAS_text:
ADC1|ADC 1 FAIL|AHRS 1|AHRS 1 FAIL|AP AHRS 1 FAIL|1 AP OFF|2 AP OFF|ATT OFF|BATT DISCH|BUS TIE|#1 DC GEN|#2 DC GEN|EMER UTIL PRES|FLTA INHBT|FUEL PUMP 1|FUEL PUMP 2|GPS 1 FAIL|MAIN UTIL PRES|SERVO 1|SERVO 2|XMSN OIL PRES|
2.) With some additional information you can extract the substrings and allocate them to left/center/right column later The extracted substrings are here, including the space characters between words: SRS/X-KeyPad/custom_string_26 BATT DISCH <--- Let's focus on this string SRS/X-KeyPad/custom_string_27 XMSN OIL PRES SRS/X-KeyPad/custom_string_28 BUS TIE
3.) Line Definitions for TS#3 Please note the Substring Index ranging from 0..4, so it should include the trailing space character for "BATT ".
4.) Line Definitions for TS#4
5.) Layouts for TS#3 "line3" is relevant here.
5.) Layouts for TS#4 "line0" is relevant here.
What else have I tried?
1.) TS#3: Adapting the Substring Index from "0..4" to "0..3" This does have no effect (as expected):
2.) TS#3: Adapting the Substring Index from "0..4" to "0..5" Now the "D" from "BATT D" is considered as well, including the space character between "T" and "D" (as expected):
3.) TS#4: Adapting the Substring Index from "05..15" to "04..15" It is hard to see, but the leading space character is considered in the X-KeyPad ("DISCH" is slightly moved to the right): But this does not have an impact in the indication on the SD+ (still no space character):
4.) TS#4: Adapting the Substring Index from "05..15" to "03..15" Now "T DISCH" is displayed also on TS#4 on the SD+ (as expected)