dc42/PanelDue

How to display splash screen

soosalameh opened this issue · 9 comments

I am trying to enable the splash screen feature embedded in the code.

In PanelDue.cpp, I found these lines:

#ifdef OEM

if DISPLAY_X == 800

include "OemSplashScreen_800_480.hpp"

else

include "OemSplashScreen_480_272.hpp"

endif

#endif

I commented everything out except for #include "OemSplashScreen_480_272.hpp," but thee is still no splash screen that appears.

Does anyone know how to do this?

Oh. One other thing. You need to add...

#define OEM

to a file that is included in all the other files. While you may have included the source file for the spash screen, the other parts of the code that are in OEM blocks would not have been added.

But I'm not sure what affect doing the define will have.

It's been awhile since I built the PanelDue code. And I think he changed development systems too. Not sure what help I can be. What problems are you having getting it to compile?

dc42 commented

Steps for getting the splash screen to work:

  1. Add definition OEM to the project settings. This enables the code to display the splash screen.

  2. Generate file OemSplashScreen_xxx_yyy.hpp where xxx_yyy is the screen resolution. This uses a very simple (and somewhat inefficient) compression algorithm. The first 16-bit word gives the (repeat count - 1) for the second 16-bit colour word. Then this repeats until all pixels have been accounted for. The scan direction is column 0 top to bottom, then column 1 top to bottom, etc.

  3. For the 5" and 7" screens you need to use the OEM version of PanelDue which has 256kb flash memory instead of 128kb. For the 4.3" screen you may be OK with the standard version, depending on how complex the splash screen is.

I have switched to using Eclipse for the firmware development. The new code is hosted in my github repo PanelDueFirmware. But I haven't done a release from that code yet.

@dc42 Do you have any recommendations for an image parser to convert a jpg or png file into the code for the .hpp file in the scanning order you specified?

dc42 commented

I use a hacked version of bmp2c.

@dc42 We were able to get the proper file from the bmp2c converter, and addressed everything else you mentioned, but for whatever reason, only have small portions of the image showing up on the screen, even after we re-scaling it to very small sizes (like as small as 7x6 pixels).

Do you have any idea as to why this might be happening?

dc42 commented

Firmware development has been moved to the PanelDueFirmware repository. Please create a new issue in that repository if this is still a requirement.