summaryrefslogtreecommitdiff
path: root/vfd.c
diff options
context:
space:
mode:
authoranbr <vdr07@deltab.de>2010-04-29 20:44:38 +0200
committeranbr <vdr07@deltab.de>2010-04-29 20:44:38 +0200
commit8b649a7fa73b9449597b1cf3513e75c8f4733002 (patch)
tree56f81ffe7b1360b739ecede52939ea0af0148b71 /vfd.c
parentc69752e202af6ccc3caa5857b6fa2da0729b8ffa (diff)
downloadvdr-plugin-targavfd-8b649a7fa73b9449597b1cf3513e75c8f4733002.tar.gz
vdr-plugin-targavfd-8b649a7fa73b9449597b1cf3513e75c8f4733002.tar.bz2
Allow setup font size0.0.4
Show current time, on dual line mode
Diffstat (limited to 'vfd.c')
-rw-r--r--vfd.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/vfd.c b/vfd.c
index 1670eab..2ea935c 100644
--- a/vfd.c
+++ b/vfd.c
@@ -260,7 +260,10 @@ cVFD::~cVFD() {
*/
bool cVFD::open()
{
- if(!SetFont(theSetup.m_szFont,theSetup.m_bTwoLineMode)) {
+ if(!SetFont(theSetup.m_szFont,
+ theSetup.m_bTwoLineMode,
+ theSetup.m_nBigFontHeight,
+ theSetup.m_nSmallFontHeight)) {
return false;
}
if(!cVFDQueue::open()) {
@@ -445,18 +448,17 @@ void cVFD::Brightness(int nBrightness)
this->QueueData((byte) (nBrightness));
}
-bool cVFD::SetFont(const char *szFont, int bTwoLineMode) {
+bool cVFD::SetFont(const char *szFont, int bTwoLineMode, int nBigFontHeight, int nSmallFontHeight) {
cVFDFont* tmpFont = NULL;
cString sFileName = cFont::GetFontFileName(szFont);
if(!isempty(sFileName))
{
- if (bTwoLineMode)
- {
- tmpFont = new cVFDFont(sFileName,6,8);
+ if (bTwoLineMode) {
+ tmpFont = new cVFDFont(sFileName,nSmallFontHeight);
} else {
- tmpFont = new cVFDFont(sFileName,12,11);
+ tmpFont = new cVFDFont(sFileName,nBigFontHeight);
}
} else {
esyslog("targaVFD: unable to find font '%s'",szFont);