From ca0ae4567ef652252372fba01327dd23d9d1b8b0 Mon Sep 17 00:00:00 2001 From: Martin Hammerschmid Date: Sat, 31 Aug 2002 12:19:51 +0200 Subject: Version 0.0.3 --- lcd.c | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++------- lcd.h | 4 +++- lcdproc.c | 10 +++++---- 3 files changed, 74 insertions(+), 13 deletions(-) diff --git a/lcd.c b/lcd.c index 950f484..dd61bca 100644 --- a/lcd.c +++ b/lcd.c @@ -32,7 +32,7 @@ cLcd::cLcd() { int i,j; - connected=false; ThreadStateData.showvolume=false; sock=wid=hgt=cellwid=cellhgt=0; + connected=false; ThreadStateData.showvolume=false; ThreadStateData.newscroll=false; sock=wid=hgt=cellwid=cellhgt=0; replayDvbApi=NULL; primaryDvbApi=NULL; for (i=0;iGetTimeString(),PresentTitle,PresentSubtitle); else if (!isempty(PresentTitle)) SetRunning(false,Present->GetTimeString(),PresentTitle); - } + } else + SetRunning(false,"No EPG info available.\0", NULL); // XXX tr !!! if ((Present = Schedule->GetFollowingEvent()) != NULL) nextLcdUpdate=(Present->GetTime()GetTime():nextLcdUpdate; } @@ -564,19 +581,59 @@ void cLcd::Action(void) { // LCD output thread replayDvbApi->GetIndex(Current, Total, false); sprintf(tempbuffer,IndexToHMSF(Total)); SetProgress(IndexToHMSF(Current),tempbuffer, (100 * Current) / Total); - } + } + + // copy BeginMutualExclusion(); // all data needed for output are copied here memcpy(&OutStateData,&ThreadStateData, sizeof (cLcd::StateData)); - ThreadStateData.showvolume=false; + ThreadStateData.showvolume=false; + if (ThreadStateData.newscroll) { scrollpos=0; scrollwaitcnt=scrollwait; ThreadStateData.newscroll=false; } for (i=0;i (2*wid+3) ) + && !(scrollcnt=(scrollcnt+1)%scrollspeed) ) { + if ( (scrollpos) || (scrollwaitcnt-- < 1) ) { + scrollpos=(scrollpos+1)%strlen(OutStateData.lcdfullbuffer[ScrollState]); + if ( scrollpos==1 ) scrollwaitcnt=scrollwait; + for (i=0; i #include "lcd.h" -static const char *VERSION = "0.0.2"; +static const char *VERSION = "0.0.3"; static const char *MAINMENUENTRY = NULL; #ifdef LCD_hd44780 static const char *DESCRIPTION = "LCDproc using hd44780 output-mapping"; @@ -58,7 +58,8 @@ void cLcdFeed::ChannelSwitch(const cDevice *Device, int ChannelNumber) syslog(LOG_INFO, "lcdproc: cLcdFeed::ChannelSwitch %d %d", Device->CardIndex(), ChannelNumber); if (ChannelNumber) { LCDproc->SetLine(1,2," "); - LCDproc->SetLine(1,3," "); + LCDproc->SetLine(1,3," "); + LCDproc->SetRunning(false,"No EPG info available.\0", NULL); // XXX tr !!! switched = true; } else switched = false; if (Device) LCDproc->SetPrimaryDevice( (cDevice *) Device ); @@ -183,6 +184,7 @@ void cLcdFeed::OsdProgramme(time_t PresentTime, const char *PresentTitle, const if ( (!isempty(PresentTitle)) && (!isempty(PresentSubtitle)) ) LCDproc->SetRunning(false,buffer,PresentTitle,PresentSubtitle); else if (!isempty(PresentTitle)) LCDproc->SetRunning(false,buffer,PresentTitle); + else LCDproc->SetRunning(false,"No EPG info available.\0", NULL); // XXX tr !!! strftime(buffer, sizeof(buffer), "%R", localtime_r(&FollowingTime, &tm_r)); @@ -192,7 +194,7 @@ void cLcdFeed::OsdProgramme(time_t PresentTime, const char *PresentTitle, const if ( (!isempty(FollowingTitle)) && (!isempty(FollowingSubtitle)) ) LCDproc->SetRunning(true,buffer,FollowingTitle,FollowingSubtitle); else if (!isempty(FollowingTitle)) LCDproc->SetRunning(true,buffer,FollowingTitle); - + else LCDproc->SetRunning(true,"No EPG info available.\0", NULL); // XXX tr !!! } // --- -- cgit v1.2.3