diff options
Diffstat (limited to 'vfd.c')
-rw-r--r-- | vfd.c | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -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); |