Example using the support package for LPC4088 DisplayModule

Dependencies:   DMBasicGUI DMSupport

Example using a lot of the features in the software package for the LPC4088 Display Module.

This project can be selected as a template when creating a new project based on the LPC4088 Display Module.

Information

This project works on the 4.3" display modules.

Some of the apps works on the 5" display modules. The ImageViewer and Slideshow app will show the images distorted as it does not take the resolution into consideration.

Information

The USB Status app is disabled. The Image viewer looks for images in the root of SD cards, USB memory sticks or the file system on the QSPI flash. The Slideshow app expects to find a slideshow script in /mci/elec14/ea_logo.txt.

This is what it looks like on the 4.3" display:

/media/uploads/embeddedartists/everything_cap_000.png /media/uploads/embeddedartists/everything_cap_001.png /media/uploads/embeddedartists/everything_cap_003.png /media/uploads/embeddedartists/everything_cap_004.png /media/uploads/embeddedartists/everything_cap_006.png /media/uploads/embeddedartists/everything_cap_008.png

Revision:
7:c8bef6a4b019
Parent:
6:8007691f78dc
Child:
11:4830c7689843
--- a/main.cpp	Fri Dec 19 16:44:03 2014 +0100
+++ b/main.cpp	Sun Dec 21 13:55:46 2014 +0100
@@ -17,6 +17,13 @@
 #include "AppLauncher.h"
 #include "meas.h"
 
+#include "AppSettings.h"
+#include "AppTouchCalibration.h"
+#include "AppColorPicker.h"
+#include "AppImageViewer.h"
+#include "AppSlideShow.h"
+#include "image_data.h"
+
 
 /******************************************************************************
  * Typedefs and defines
@@ -110,6 +117,41 @@
 
 #if defined(DM_BOARD_USE_DISPLAY)
 
+typedef enum {
+    ColorPickerApp,
+    ImageViewerApp,
+    SlideshowApp,
+    SettingsApp, 
+    TouchTestApp,
+    CalibrationApp =  AppLauncher::CalibrationApp,
+    Placeholder,
+} myapps_t;
+
+static App* launchApp(uint32_t id)
+{
+  App* a = NULL;
+  switch ((myapps_t)id) {
+      case CalibrationApp:
+          a = new AppTouchCalibration();
+          break;
+      case SettingsApp:
+          a = new AppSettings();
+          break;
+      case ColorPickerApp:
+          a = new AppColorPicker();
+          break;
+      case ImageViewerApp:
+          a = new AppImageViewer();
+          break;
+      case SlideshowApp:
+          a = new AppSlideShow();
+          break;
+      default:
+          break;
+  }
+  return a;
+}
+
 #define SWIM_TASK_PREFIX  "[SWIM] "
 void swimTask(void const* args)
 {
@@ -118,16 +160,20 @@
   log->printf(SWIM_TASK_PREFIX"swimTask started\n");
   
   AppLauncher launcher;
+    
+    
   if (launcher.setup()) {
+    launcher.addImageButton(SettingsApp,  img_preferences_desktop_applications, img_size_preferences_desktop_applications);
+    launcher.addImageButton(Placeholder, img_bijiben, img_size_bijiben);
+    launcher.addImageButton(SlideshowApp, img_multimedia_photo_manager, img_size_multimedia_photo_manager);
+    //launcher.addImageButton(TouchGFXApp,  "TouchGFX");
+    //launcher.addImageButton(EmWinApp,     "emWin");
+    launcher.addImageButton(ColorPickerApp,  img_preferences_color, img_size_preferences_color);
+    launcher.addImageButton(ImageViewerApp,  img_multimedia_photo_manager, img_size_multimedia_photo_manager);
+    launcher.addImageButton(Placeholder,  img_help_info, img_size_help_info);
+    launcher.addImageButton(Placeholder,  img_unetbootin, img_size_unetbootin);
       
-    //// With icons as buttons we need the USB memory stick to with the image files
-    //if (!haveUSBMSD) {
-    //  log->printf("Waiting for USB MSD to be connected!\n");
-    //  do {
-    //    Thread::wait(1000);
-    //  } while(!haveUSBMSD);
-    //}
-      
+    launcher.setAppCreatorFunc(launchApp);
     log->printf(SWIM_TASK_PREFIX"Starting menu system\n");
     launcher.runToCompletion();
     launcher.teardown();