Jump to content

Recommended Posts

Posted

Hi,

I had some unexpected behaviour with the label parameter, and here' some tests I did. I'm using two 2x40 LCDs (the tests use only one), and I would have thought that you can fill the screen(s) with text equally well with one entry, on the one hand, or several entries, on the other, by using the @(x:x:x) to place text wherever on the LCD(s), as long as it fits.

However, this appear not to be so, and I'm not sure what the reasons are. The way around it is to write the text from several events with identical id's, and if this is among the recommended ways, I have no problem with it. But the NGC documentation does say that "Each EVENT_* element requires a unique ID in the configuration file!", so that's why I'm wondering.

RESET_HW

ENC n=1   sr=1 pins=0:1   type=detented3
ENC n=2   sr=1 pins=2:3   type=detented3
ENC n=3   sr=1 pins=4:5   type=detented3
ENC n=4   sr=1 pins=6:7   type=detented3

# works
EVENT_ENC id=1   hw_id=1   label="@(1:1:1)This text is 32 characters long!"

# doesn't work. hard fault!
#EVENT_ENC id=2   hw_id=1   label="@(1:1:2)This @(1:6:2)text @(1:11:2)is @(1:14:2)32 @(1:17:2)characters @(1:28:2)long!"

# doesn't work
#EVENT_ENC id=2   hw_id=2   label="@(1:1:2)This @(1:6:2)text is 32 characters long!"

# works
#EVENT_ENC id=2   hw_id=2   lcd_pos=1:1:2  label="This @(1:6:2)text is 32 characters long!"

# doesn't work
#EVENT_ENC id=2   hw_id=2   lcd_pos=1:1:2  label="This @(1:6:2)text @(1:11:2)is 32 characters long!"

# doesnt' work
#EVENT_ENC id=2   hw_id=2   label="@(1:1:2)This text is@(1:13:2)32 characters long!"

# doesn't work
#EVENT_ENC id=2   hw_id=2   label="@(1:1:2)This text @(1:11:2)is 24 chrs!!!!"

# works. identical to the one above, only one exclamation mark less
#EVENT_ENC id=2   hw_id=2   label="@(1:1:2)This text @(1:11:2)is 23 chrs!!!"

# doesn't work. text in three places
#EVENT_ENC id=2   hw_id=2   label="@(1:1:2)This @(1:6:2)text @(1:11:2)is 23 chrs!!!"

# works. text in three places, only shorter than above
#EVENT_ENC id=2   hw_id=2   label="@(1:1:2)This @(1:6:2)text @(1:11:2)is 15"

# works
#EVENT_ENC id=2   hw_id=2   label="@(1:1:2)This @(1:6:2)text"
#EVENT_ENC id=2   hw_id=2   label="@(1:11:2)is @(1:14:2)23 chrs!!!"

# works
#EVENT_ENC id=2   hw_id=2   label="@(1:1:2)This @(1:6:2)text"
#EVENT_ENC id=2   hw_id=2   label="@(1:11:2)is @(1:14:2)23 @(1:17:2)chrs!!!"

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...