Jump to content

Recommended Posts

Posted

I've just verified that using LABEL definitions for LCD strings saves a lot of memory: around 25% in my case, that will probably mean a whole extra bank of 64 encoder LED rings, in my case.

 

The slight downside is that the string information is split off into the .ngl file making the information dispersed and less immediately readable/editable. 

 

Now, for those LCD strings that contain conditional labels: I assume that they cannot be nested?

 

This means that the correct way to format LCD strings is as follows:

In the default.ngl file

LABEL b1e12 ""@(6:9:1)Sync:"

 

COND_LABEL on_off
COND =0     "Off"

COND_ELSE  "On "

 

In the default.ngc file

label="^b1e12^on_off"

 

Posted (edited)

Actually it would appear that you can have conditional labels referenced within a LABEL definition.

 

However, a more pressing issue needs to be solved: 

 

The problem being that the value is not being updated on the LCD. In the following case it simply displays "PW  0". The debug log shows the value changing.

 

In the default.ngc file:

EVENT_ENC id= 2 hw_id = 2 fwd_id=LED_MATRIX:19 bank=1 fwd_to_lcd=1 type=CC chn= 1 range=0:127 offset=0 ports=1000100000001000 led_matrix_pattern=1 cc= 18 led_matrix_pattern=3 label="^b1e2"

 

In the default.ngl file:

LABEL b1e2 "@(1:9:2)  PW %3d"

 

In the log:

[20366.614] MBNG_ENC_NotifyChange(2, -1)

[20366.614] [EVENT:7002] ENC hw_id=2 bank=1 fwd_id=0x6013 type=CC value=76 label=^b1e2
[20366.614] MBNG_MATRIX_DOUT_NotifyReceivedValue(19, 1, 75)
 
 
I only have the first 2 LCDs connected for this test. The other 3 fields visible on the first 2 LCD don't change either.
Edited by Duggle
Posted

Nested labels are not supported.

It would require a recursive algorithm which increases the "worst case" stack memory consumption dramatically - there isn't enough RAM available for this.

 

But this one:

LABEL b1e2 "@(1:9:2)  PW %3d"

 

should work.

I'm surprised that it doesn't... e.g. the "^std_enc", "^std_btn", ... labels refer to values as well, and they are working.

 

Best Regards, Thorsten.

 

P.S.: as mentioned in another thread, I can't test this before next week.

Posted
I guess the first problem to solve is the values not being updated. 
I'll verify this without using any LABEL constructs.
 
 
On the subject of nested labels it appeared to be doing this, but could be just an artefact, so I'll play with this.
I believe what you say about it not being supported nor viable.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...