4D SYSTEMS FORUM

Register New Posts
 
 
 


Reply
 
Author Comment
 
ipaq3115

Avatar / Picture

Registered: 12/11/11
Posts: 139
Reply with quote #1 
I want to use the same program for the uLCD28 and the uLCD43 and have all the changes in pre-processor directives so I'm not adding any code size.

I've looked around in the examples but I haven't been able to find a way to do this. Anyone done this or know how?
ipaq3115

Avatar / Picture

Registered: 12/11/11
Posts: 139
Reply with quote #2 
I found the __DISPLAY_X_MAX and the  __DISPLAY_Y_MAX but they seem to output 239 and 319 on both the 2.8 and the 4.3, can't seem to find any way to differentiate between the two.
meldavia

Registered: 18/03/07
Posts: 900
Reply with quote #3 
Yes the values are fixed in the main PicasoGFX2_Function.fnc file which is not a great idea.

My suggestion would be to mask them out,
    //__DISPLAY_X_MAX     239
    //__DISPLAY_Y_MAX     319

and place them in the individual header files:-
ULCD-43PT_GFX2.FNC etc

Alternatively, you could make your program dynamically alter by using

gfx_Get(X_MAX ); and gfx_Get(Y_MAX )


__________________
Regards,
Dave
ipaq3115

Avatar / Picture

Registered: 12/11/11
Posts: 139
Reply with quote #4 
Thanks, I'll try that tomorrow. Ideally I would dynamically change my code but right now I am counting every little byte trying to stay within the space constraints.
ipaq3115

Avatar / Picture

Registered: 12/11/11
Posts: 139
Reply with quote #5 
Got it working, thanks!
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Powered by Website Toolbox - Create a Website Forum Hosting, Guestbook Hosting, or Website Chat Room for your website.