add compile option for graphic-vfd.
authorkos <kos@dev3>
Fri, 12 Aug 2011 07:51:10 +0000 (16:51 +0900)
committerkos <kos@dev3>
Fri, 12 Aug 2011 07:51:10 +0000 (16:51 +0900)
conf/machine/bm750.conf
conf/machine/vuultimo.conf
conf/machine/vuuno.conf
recipes/enigma2/enigma2.bb
recipes/enigma2/enigma2/vuplus/enigma2_vuplus_textvfd.patch [new file with mode: 0644]
recipes/enigma2/enigma2/vuplus/enigma2_vuplus_vfd_mode.patch [new file with mode: 0644]

index a2f2011..266de89 100644 (file)
@@ -55,6 +55,7 @@ EXTRA_IMAGEDEPENDS += "vuplus-makenfi-native"
 MACHINE_FEATURES += "alsa pci"
 MACHINE_FEATURES += "wifi"
 MACHINE_FEATURES += "vuwlan"
+MACHINE_FEATURES += "display-text-vfd"
 
 
 
index aaf2a0c..7c29590 100644 (file)
@@ -54,6 +54,7 @@ EXTRA_IMAGEDEPENDS += "vuplus-makenfi-native"
 MACHINE_FEATURES += "alsa pci"
 MACHINE_FEATURES += "wifi"
 MACHINE_FEATURES += "vuwlan"
+MACHINE_FEATURES += "display-graphic-vfd"
 
 
 
index aa60968..45b6e9a 100644 (file)
@@ -53,6 +53,7 @@ EXTRA_IMAGEDEPENDS += "vuplus-makenfi-native"
 MACHINE_FEATURES += "alsa pci"
 MACHINE_FEATURES += "wifi"
 MACHINE_FEATURES += "vuwlan"
+MACHINE_FEATURES += "display-text-vfd"
 
 
 EXTRA_IMAGECMD_jffs2 = " --eraseblock=0x20000 -n -l "
index 15205bb..d09d508 100644 (file)
@@ -113,6 +113,7 @@ SRC_URI = "git://archive.vuplus.com/git/enigma2.git;protocol=http;branch=${BRANC
            file://enigma2_vuplus_mediaplayer.patch;patch=1;pnum=1 \
           file://enigma2_vuplus_mediaplayer_subtitle.patch;patch=1;pnum=1 \
            file://enigma2_vuplus_remove_dreambox_enigma.patch;patch=1;pnum=1 \
+           file://enigma2_vuplus_vfd_mode.patch;patch=1;pnum=1 \
            file://MyriadPro-Regular.otf \
            file://MyriadPro-Semibold.otf \
            file://MyriadPro-SemiboldIt.otf \
@@ -121,9 +122,8 @@ SRC_URI = "git://archive.vuplus.com/git/enigma2.git;protocol=http;branch=${BRANC
            file://number_key \
            "
 
-SRC_URI_append_bm750 = " file://enigma2_vuplus_vfd.patch;patch=1;pnum=1"
-SRC_URI_append_vuuno = " file://enigma2_vuplus_vfd.patch;patch=1;pnum=1"
-SRC_URI_append_vuultimo = " file://enigma2_vuplus_vfd.patch;patch=1;pnum=1"
+SRC_URI_append_bm750 = " file://enigma2_vuplus_textvfd.patch;patch=1;pnum=1"
+SRC_URI_append_vuuno = " file://enigma2_vuplus_textvfd.patch;patch=1;pnum=1"
 
 SRC_URI_append_vusolo = " file://enigma2_vuplus_misc.patch;patch=1;pnum=1"
 
@@ -184,6 +184,8 @@ do_compile_prepend_vuplus() {
 }
 
 EXTRA_OECONF = " \
+       ${@base_contains("MACHINE_FEATURES", "display-text-vfd", "--with-display-text-vfd" , "", d)} \
+       ${@base_contains("MACHINE_FEATURES", "display-graphic-vfd", "--with-display-graphic-vfd" , "", d)} \
         BUILD_SYS=${BUILD_SYS} \
         HOST_SYS=${HOST_SYS} \
         STAGING_INCDIR=${STAGING_INCDIR} \
diff --git a/recipes/enigma2/enigma2/vuplus/enigma2_vuplus_textvfd.patch b/recipes/enigma2/enigma2/vuplus/enigma2_vuplus_textvfd.patch
new file mode 100644 (file)
index 0000000..f053a20
--- /dev/null
@@ -0,0 +1,43 @@
+diff --git a/lib/python/Screens/ChoiceBox.py b/lib/python/Screens/ChoiceBox.py
+index 7c8b142..39e70d4 100644
+--- a/lib/python/Screens/ChoiceBox.py
++++ b/lib/python/Screens/ChoiceBox.py
+@@ -31,7 +31,9 @@ class ChoiceBox(Screen):
+                       pos += 1
+               self["list"] = ChoiceList(list = self.list, selection = selection)
+               self["summary_list"] = StaticText()
+-              self.updateSummary()
++#     ikseong
++#             self.updateSummary()
++              self.updateSummary(selection)
+                               
+               self["actions"] = NumberActionMap(["WizardActions", "InputActions", "ColorActions", "DirectionActions"], 
+               {
+@@ -120,14 +122,21 @@ class ChoiceBox(Screen):
+       def updateSummary(self, curpos=0):
+               pos = 0
+               summarytext = ""
++#     ikseong         
++#             for entry in self.summarylist:
++#                     if pos > curpos-2 and pos < curpos+5:
++#                             if pos == curpos:
++#                                     summarytext += ">"
++#                             else:
++#                                     summarytext += entry[0]
++#                             summarytext += ' ' + entry[1] + '\n'
++#                     pos += 1
+               for entry in self.summarylist:
+-                      if pos > curpos-2 and pos < curpos+5:
+-                              if pos == curpos:
+-                                      summarytext += ">"
+-                              else:
+-                                      summarytext += entry[0]
+-                              summarytext += ' ' + entry[1] + '\n'
++                      if pos == curpos:
++                              summarytext += entry[1] +'\n'
++                              break
+                       pos += 1
++#
+               self["summary_list"].setText(summarytext)
+       def cancel(self):
diff --git a/recipes/enigma2/enigma2/vuplus/enigma2_vuplus_vfd_mode.patch b/recipes/enigma2/enigma2/vuplus/enigma2_vuplus_vfd_mode.patch
new file mode 100644 (file)
index 0000000..7d873ee
--- /dev/null
@@ -0,0 +1,124 @@
+diff --git a/configure.ac b/configure.ac
+index 27beb1e..8e007e1 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -46,6 +46,28 @@ AC_CHECK_LIB([xmlccwrap], [exit], [LIBXMLCCWRAP_LIBS="-lxmlccwrap"], [AC_MSG_ERR
+ AC_SUBST(LIBXMLCCWRAP_LIBS)
+ AC_LANG_POP
++
++AC_ARG_WITH(display-text-vfd,
++        AC_HELP_STRING([--with-display-text-vfd], [use text based vfd, yes or no]),
++        [[withtextvfd=$withval]],
++        [[withtextvfd=no]]
++)
++if test x"$withtextvfd" != xno ; then
++        AC_DEFINE(DISPLAY_TEXTVFD, 1,[Define when using an text based vfd device])
++fi
++AM_CONDITIONAL(DISPLAY_TEXTVFD, test x"$withtextvfd" != xno)
++
++AC_ARG_WITH(display-graphic-vfd,
++        AC_HELP_STRING([--with-display-graphic-vfd], [use graphic based vfd, yes or no]),
++        [[withgraphicvfd=$withval]],
++        [[withgraphicvfd=no]]
++)
++if test x"$withgraphicvfd" != xno ; then
++        AC_DEFINE(DISPLAY_GRAPHICVFD, 1,[Define when using an graphic based vfd device])
++fi
++AM_CONDITIONAL(DISPLAY_GRAPHICVFD, test x"$withgraphicvfd != xno")
++
++
+ AC_ARG_WITH(libsdl,
+       AS_HELP_STRING([--with-libsdl],[use libsdl, yes or no]),
+       [with_libsdl=$withval],[with_libsdl=no])
+diff --git a/lib/gdi/glcddc.cpp b/lib/gdi/glcddc.cpp
+index 8ac8cd3..74f6afd 100755
+--- a/lib/gdi/glcddc.cpp
++++ b/lib/gdi/glcddc.cpp
+@@ -34,13 +34,23 @@ void gLCDDC::exec(const gOpcode *o)
+ {
+       switch (o->opcode)
+       {
++#if defined(DISPLAY_TEXTVFD)
++      case gOpcode::renderText:
++              if (o->parm.renderText->text)
++              {
++                      lcd->updates(gDC::m_current_offset, o->parm.renderText->text);
++                      free(o->parm.renderText->text);
++                      delete o->parm.renderText;
++              }
++              break;
++#endif /*defined(DISPLAY_TEXTVFD)*/
+       case gOpcode::flush:
++#if defined(DISPLAY_GRAPHICVFD) && !defined(DISPLAY_TEXTVFD)
+ //            if (update)
+-#ifndef BUILD_VUPLUS /* ikseong  */
+                       lcd->update();
+ #else
+-                      ;
+-#endif
++              ;
++#endif /*defined(DISPLAY_GRAPHICVFD) && !defined(DISPLAY_TEXTVFD)*/
+       default:
+               gDC::exec(o);
+               break;
+diff --git a/lib/gdi/lcd.cpp b/lib/gdi/lcd.cpp
+index a5ac351..74bc3e0 100755
+--- a/lib/gdi/lcd.cpp
++++ b/lib/gdi/lcd.cpp
+@@ -183,9 +183,7 @@ eDBoxLCD *eDBoxLCD::getInstance()
+ void eDBoxLCD::update()
+ {
+-#ifdef BUILD_VUPLUS /* ikseong  */
+-      return ;
+-#endif
++#if defined(DISPLAY_GRAPHICVFD) && !defined(DISPLAY_TEXTVFD)
+       if (lcdfd >= 0)
+       {
+               if (!is_oled || is_oled == 2)
+@@ -227,5 +225,20 @@ void eDBoxLCD::update()
+                       write(lcdfd, raw, 64*64);
+               }
+       }
++#endif /*defined(DISPLAY_GRAPHICVFD) && !defined(DISPLAY_TEXTVFD)*/
+ }
++#if defined(DISPLAY_TEXTVFD)
++void eDBoxLCD::updates(ePoint start,char *text)
++{
++      if((lcdfd >= 0) && (start.y() < 5))
++      {
++              int i = 0, text_len = strlen(text);
++              for(; i<text_len ; i++)
++              {
++                      if(text[i]==0x0a) text[i] = 0x20;
++              }
++              write(lcdfd, text, text_len);
++      }
++}
++#endif /*defined(DISPLAY_TEXTVFD)*/
+diff --git a/lib/gdi/lcd.h b/lib/gdi/lcd.h
+index e7b4c2c..80a56f2 100644
+--- a/lib/gdi/lcd.h
++++ b/lib/gdi/lcd.h
+@@ -36,6 +36,9 @@ public:
+       int stride() { return _stride; }
+       eSize size() { return res; }
+       virtual void update()=0;
++#if defined(DISPLAY_TEXTVFD)
++      virtual void updates(ePoint start,char *text) = 0;
++#endif /*defined(DISPLAY_TEXTVFD)*/
+ #endif
+ };
+@@ -59,6 +62,9 @@ public:
+       void setInverted( unsigned char );
+       bool isOled() const { return !!is_oled; }
+       void update();
++#if defined(DISPLAY_TEXTVFD)
++      void updates(ePoint start,char *text);
++#endif /*defined(DISPLAY_TEXTVFD)*/
+ };
+ #endif