1 diff --git a/configure.ac b/configure.ac
2 index ef30e71..96742b5 100644
5 @@ -65,6 +65,28 @@ if test x"$setrighthalfvfdskin" != xno ; then
7 AM_CONDITIONAL(SET_RIGHT_HALF_VFD_SKIN, test x"$setrighthalfvfdskin" != xno)
10 +AC_ARG_WITH(display-text-vfd,
11 + AC_HELP_STRING([--with-display-text-vfd], [use text based vfd, yes or no]),
12 + [[withtextvfd=$withval]],
15 +if test x"$withtextvfd" != xno ; then
16 + AC_DEFINE(DISPLAY_TEXTVFD, 1,[Define when using an text based vfd device])
18 +AM_CONDITIONAL(DISPLAY_TEXTVFD, test x"$withtextvfd" != xno)
20 +AC_ARG_WITH(display-graphic-vfd,
21 + AC_HELP_STRING([--with-display-graphic-vfd], [use graphic based vfd, yes or no]),
22 + [[withgraphicvfd=$withval]],
23 + [[withgraphicvfd=no]]
25 +if test x"$withgraphicvfd" != xno ; then
26 + AC_DEFINE(DISPLAY_GRAPHICVFD, 1,[Define when using an graphic based vfd device])
28 +AM_CONDITIONAL(DISPLAY_GRAPHICVFD, test x"$withgraphicvfd != xno")
32 AS_HELP_STRING([--with-libsdl],[use libsdl, yes or no]),
33 [with_libsdl=$withval],[with_libsdl=no])
34 diff --git a/lib/gdi/glcddc.cpp b/lib/gdi/glcddc.cpp
35 index 07bd910..74f6afd 100755
36 --- a/lib/gdi/glcddc.cpp
37 +++ b/lib/gdi/glcddc.cpp
38 @@ -34,13 +34,23 @@ void gLCDDC::exec(const gOpcode *o)
42 +#if defined(DISPLAY_TEXTVFD)
43 + case gOpcode::renderText:
44 + if (o->parm.renderText->text)
46 + lcd->updates(gDC::m_current_offset, o->parm.renderText->text);
47 + free(o->parm.renderText->text);
48 + delete o->parm.renderText;
51 +#endif /*defined(DISPLAY_TEXTVFD)*/
53 +#if defined(DISPLAY_GRAPHICVFD) && !defined(DISPLAY_TEXTVFD)
61 +#endif /*defined(DISPLAY_GRAPHICVFD) && !defined(DISPLAY_TEXTVFD)*/
65 diff --git a/lib/gdi/lcd.cpp b/lib/gdi/lcd.cpp
66 index 04ed7e2..7464d1f 100755
69 @@ -189,9 +189,7 @@ eDBoxLCD *eDBoxLCD::getInstance()
71 void eDBoxLCD::update()
76 +#if defined(DISPLAY_GRAPHICVFD) && !defined(DISPLAY_TEXTVFD)
79 if (!is_oled || is_oled == 2)
80 @@ -233,5 +231,20 @@ void eDBoxLCD::update()
81 write(lcdfd, raw, 64*64);
84 +#endif /*defined(DISPLAY_GRAPHICVFD) && !defined(DISPLAY_TEXTVFD)*/
87 +#if defined(DISPLAY_TEXTVFD)
88 +void eDBoxLCD::updates(ePoint start,char *text)
90 + if((lcdfd >= 0) && (start.y() < 5))
92 + int i = 0, text_len = strlen(text);
93 + for(; i<text_len ; i++)
95 + if(text[i]==0x0a) text[i] = 0x20;
97 + write(lcdfd, text, text_len);
100 +#endif /*defined(DISPLAY_TEXTVFD)*/
101 diff --git a/lib/gdi/lcd.h b/lib/gdi/lcd.h
102 index e7b4c2c..80a56f2 100755
105 @@ -36,6 +36,9 @@ public:
106 int stride() { return _stride; }
107 eSize size() { return res; }
108 virtual void update()=0;
109 +#if defined(DISPLAY_TEXTVFD)
110 + virtual void updates(ePoint start,char *text) = 0;
111 +#endif /*defined(DISPLAY_TEXTVFD)*/
115 @@ -59,6 +62,9 @@ public:
116 void setInverted( unsigned char );
117 bool isOled() const { return !!is_oled; }
119 +#if defined(DISPLAY_TEXTVFD)
120 + void updates(ePoint start,char *text);
121 +#endif /*defined(DISPLAY_TEXTVFD)*/