ipaq3115

Registered: 12/11/11
Posts: 139
|
| Posted 21/03/12 at 01:41 AM | 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? |
| Loading... | |
ipaq3115

Registered: 12/11/11
Posts: 139
|
| Posted 21/03/12 at 04:32 AM | 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. |
| Loading... | |
meldavia
Registered: 18/03/07
Posts: 900
|
| Posted 21/03/12 at 08:23 AM | 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 |
| Loading... | |
ipaq3115

Registered: 12/11/11
Posts: 139
|
| Posted 21/03/12 at 11:34 AM | 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. |
| Loading... | |
ipaq3115

Registered: 12/11/11
Posts: 139
|
| Posted 22/03/12 at 12:41 AM | Reply with quote #5 |
|
| Got it working, thanks! |
| Loading... | |