Re: How to customize lcdproc for vdr ?
Commit Message
Am Sonntag, 20. Mai 2007 schrieb kafifi:
> Hello,
>
> I am using vdr-1.4.7, and vdr-lcdproc-0.0.10-jw2, to drive a 16x2
> characters imon VFD module.
>
> The display is really nice, but 16x2 isn't enough to display all datas. I
> would customize lcdproc to
> remove all EPG informations, and display only time, channel number and
> channel name.
>
> Could someone help me to do this customization ?
>
> Thanks a lot.
Hi,
I have a 2x20 LC display and once made this patch. It introduces a new
option "show time" whice you can disable to have more useful information on
your display.
S.
Comments
>> Hello,
>>
>> I am using vdr-1.4.7, and vdr-lcdproc-0.0.10-jw2, to drive a 16x2
>> characters imon VFD module.
>>
>> The display is really nice, but 16x2 isn't enough to display all
>> datas. I would customize lcdproc to remove all EPG informations, and
>> display only time, channel number and channel name.
>>
>> Could someone help me to do this customization ?
>>
>> Thanks a lot.
>Hi,
>I have a 2x20 LC display and once made this patch. It introduces a new
option "show time"
>whice you can disable to have more useful information on your display.
>S.
I don't know why, the patch didn't applied without reject, then I made all
modifications manually. All is ok now, your customisation is great !
One more thing : I would like to disable EPG data. Do you plan to add such
option ?
Thanks a lot.
Am Mittwoch, 23. Mai 2007 00:19:10 schrieb kafifi:
> >> Hello,
> >>
> >> I am using vdr-1.4.7, and vdr-lcdproc-0.0.10-jw2, to drive a 16x2
> >> characters imon VFD module.
> >>
> >> The display is really nice, but 16x2 isn't enough to display all
> >> datas. I would customize lcdproc to remove all EPG informations, and
> >> display only time, channel number and channel name.
> >>
> >> Could someone help me to do this customization ?
> >>
> >> Thanks a lot.
> >
> >Hi,
> >I have a 2x20 LC display and once made this patch. It introduces a new
>
> option "show time"
>
> >whice you can disable to have more useful information on your display.
> >S.
>
> I don't know why, the patch didn't applied without reject, then I made all
> modifications manually. All is ok now, your customisation is great !
>
> One more thing : I would like to disable EPG data. Do you plan to add such
> option ?
>
If you disable EPG data too, then what's left ? Only the channel name in the
top line ?
S.
> >> I am using vdr-1.4.7, and vdr-lcdproc-0.0.10-jw2, to drive a 16x2
> >> characters imon VFD module.
> >>
> >> The display is really nice, but 16x2 isn't enough to display all
> >> datas. I would customize lcdproc to remove all EPG informations,
> >> and display only time, channel number and channel name.
> >>
> >> Could someone help me to do this customization ?
> >>
> >> Thanks a lot.
> >
> >Hi,
> >I have a 2x20 LC display and once made this patch. It introduces a
> >new
>
> option "show time"
>
> >whice you can disable to have more useful information on your display.
> >S.
>
> I don't know why, the patch didn't applied without reject, then I made
> all modifications manually. All is ok now, your customisation is great !
>
> One more thing : I would like to disable EPG data. Do you plan to add
> such option ?
>
If you disable EPG data too, then what's left ? Only the channel name in the
top line ?
S.
I would like to do one of theses schemes :
Line 1 : Channel n° XXX
Line 2 : Channel name
or
Line 1 : date --- time
Line 2 : Channel number --- channel name
I should be great if theses profiles could be choosen by a setup option.
>
> I would like to do one of theses schemes :
>
> Line 1 : Channel n° XXX
> Line 2 : Channel name
>
> or
>
> Line 1 : date --- time
> Line 2 : Channel number --- channel name
>
> I should be great if theses profiles could be choosen by a setup option.
>
>
Hello,
maybe I could do this, but not in the next 4 weeks. Perhaps Joachim Wilke
could do this too, if you ask him.
(http://www.joachim-wilke.de/show.htm?alias=vdr-patches)
S.
>> I would like to do one of theses schemes :
>>
>> Line 1 : Channel n° XXX
>> Line 2 : Channel name
>>
>> or
>>
>> Line 1 : date --- time
>> Line 2 : Channel number --- channel name
>>
>> I should be great if theses profiles could be choosen by a setup option.
>>
>>
Hello,
maybe I could do this, but not in the next 4 weeks. Perhaps Joachim Wilke
could do this too, if you ask him.
(http://www.joachim-wilke.de/show.htm?alias=vdr-patches)
S.
Because it's just a visual improvement, and not a critical feature, I am not
in a hurry. No problem to way several weeks. Anyway, I'll try to ask to
Joachim about this, and I will keep you informed.
Thanks a lot for your help.
@@ -368,5 +368,23 @@
"BackLightWait",
"BackLightWait",
},
+ {
+ "Show time",
+ "Zeit anzeigen",
+ "Show time",
+ "Show time",
+ "Show time",
+ "Show time",
+ "Show time",
+ "Show time",
+ "Show time",
+ "Show time",
+ "Show time",
+ "Show time",
+ "Show time",
+ "Show time",
+ "Show time",
+ "Show time",
+ },
{ NULL }
};
@@ -646,10 +646,10 @@
lastPrioN=LcdSetup.ClientPrioN;
syslog(LOG_INFO, "LCD output thread started (pid=%d), display size: %dx%d", getpid(),hgt,wid);
- cLcd::Write(1," Welcome to V D R\0");
- cLcd::Write(2,"--------------------\0");
- cLcd::Write(3,"Video Disk Recorder\0");
- cLcd::Write(4,"Version: "VDRVERSION"\0");
+ cLcd::Write(LcdSetup.ShowTime?1:4," Welcome to V D R\0");
+ cLcd::Write(LcdSetup.ShowTime?2:3,"--------------------\0");
+ cLcd::Write(LcdSetup.ShowTime?3:1,"Video Disk Recorder\0");
+ cLcd::Write(LcdSetup.ShowTime?4:2,"Version: "VDRVERSION"\0");
// Output init
if (LcdSetup.OutputNumber > 0){
@@ -828,19 +828,22 @@
ScrollState=LCDMENU; ScrollLine=1;
break;
case Title:
+ ScrollState=LCDTITLE;
if (!ToggleMode) {
- ScrollState=LCDTITLE; ScrollLine=2;
+ ScrollLine=2;
} else {
- ScrollState=LCDTITLE; ScrollLine=1;
- char tmpbuffer[1024];
- strcpy(tmpbuffer,OutStateData.lcdbuffer[LCDTITLE][1]);
- strcat(tmpbuffer," * ");
- strcat(tmpbuffer, OutStateData.lcdfullbuffer[ScrollState]);
- strcpy(OutStateData.lcdfullbuffer[ScrollState],tmpbuffer);
- strncpy(OutStateData.lcdbuffer[LCDTITLE][1],OutStateData.lcdfullbuffer[ScrollState],wid);
+ ScrollLine=1;
+ if (LcdSetup.ShowTime) {
+ char tmpbuffer[1024];
+ strcpy(tmpbuffer,OutStateData.lcdbuffer[LCDTITLE][1]);
+ strcat(tmpbuffer," * ");
+ strcat(tmpbuffer, OutStateData.lcdfullbuffer[LCDTITLE]);
+ strcpy(OutStateData.lcdfullbuffer[LCDTITLE],tmpbuffer);
+ }
+ strncpy(OutStateData.lcdbuffer[LCDTITLE][1],OutStateData.lcdfullbuffer[LCDTITLE],wid);
}
- if ( strlen(OutStateData.lcdfullbuffer[ScrollState]) != lasttitlelen ) {
- lasttitlelen=strlen(OutStateData.lcdfullbuffer[ScrollState]);
+ if ( strlen(OutStateData.lcdfullbuffer[LCDTITLE]) != lasttitlelen ) {
+ lasttitlelen=strlen(OutStateData.lcdfullbuffer[LCDTITLE]);
scrollpos=0; scrollwaitcnt=LcdSetup.Scrollwait; ThreadStateData.newscroll=false;
}
break;
@@ -865,7 +868,7 @@
OutStateData.lcdbuffer[ScrollState][ScrollLine+1][wid]='\0';
Lcddirty[ScrollState][ScrollLine]=Lcddirty[ScrollState][ScrollLine+1]=true;
}
- }
+ } else if (!LcdSetup.ShowTime) Lcddirty[LCDTITLE][1]=true;
}
// volume
@@ -902,12 +905,12 @@
case Title: // Display 'titlescsreen' = 1
LineMode=0;
- if ( (now.tv_usec < WakeUpCycle) || (PrevState != Title) ) {
+ if ( (LcdSetup.ShowTime) && ( (now.tv_usec < WakeUpCycle) || (PrevState != Title) ) ) {
cLcd::GetTimeDateStat(workstring,OutStateData.CardStat);
cLcd::Write(1,workstring);
- }
- if (PrevState != Title) for (i=1;i<4;i++) Lcddirty[LCDTITLE][i]=true;
- for (i=1;i<4;i++) if (Lcddirty[LCDTITLE][i]) {
+ }
+ if (PrevState != Title) for (i=LcdSetup.ShowTime?1:0;i<4;i++) Lcddirty[LCDTITLE][i]=true;
+ for (i=LcdSetup.ShowTime?1:0;i<4;i++) if (Lcddirty[LCDTITLE][i]) {
cLcd::Write(i+1,OutStateData.lcdbuffer[LCDTITLE][i]);
Lcddirty[LCDTITLE][i]=false;
}
@@ -97,7 +97,7 @@
} else {
LCDproc->SetReplayDevice(NULL);
LCDproc->SetProgress(NULL);
- LCDproc->SetLineC(1,1,tempstringbuffer);
+ LCDproc->SetLineC(1,LcdSetup.ShowTime?1:0,tempstringbuffer);
LCDproc->SetThreadState( (cLcd::ThreadStates) 1); // Title
}
menumode=false;
@@ -118,7 +118,7 @@
else
LCDproc->SetThreadState( (cLcd::ThreadStates) 1); // Title
menumode=false;
- if (group) {LCDproc->SetLineC(1,1,tempstringbuffer); group=false; }
+ if (group) {LCDproc->SetLineC(1,LcdSetup.ShowTime?1:0,tempstringbuffer); group=false; }
}
void cLcdFeed::OsdTitle(const char *Title)
@@ -170,7 +170,7 @@
void cLcdFeed::OsdChannel(const char *Text)
{
//syslog(LOG_INFO, "lcdproc: cLcdFeed::OsdChannel %s", Text);
- LCDproc->SetLineC(1,1,Text);
+ LCDproc->SetLineC(1,LcdSetup.ShowTime?1:0,Text);
bool switching = group = !isdigit(Text[0]);
if (!group) strcpy(tempstringbuffer,Text);
@@ -365,6 +365,7 @@
Add(new cMenuEditStraTrItem( str2, &newLcdSetup.OutputFunction[i],14, OutputFunctionText));
}
Add(new cMenuEditStraItem( tr("Recording status"), &newLcdSetup.RecordingStatus, 2, RecordingStatusText));
+ Add(new cMenuEditBoolItem( tr("Show time"), &newLcdSetup.ShowTime));
}
void cMenuSetupLcd::Store(void)
@@ -388,6 +389,7 @@
SetupStore(str2, LcdSetup.OutputFunction[i] = newLcdSetup.OutputFunction[i]);
}
SetupStore("RecordingStatus", LcdSetup.RecordingStatus = newLcdSetup.RecordingStatus);
+ SetupStore("ShowTime", LcdSetup.ShowTime = newLcdSetup.ShowTime);
}
@@ -424,6 +426,7 @@
else if (!strcasecmp(Name, "OutputNumber 8")) LcdSetup.OutputFunction[8] = atoi(Value);
else if (!strcasecmp(Name, "OutputNumber 9")) LcdSetup.OutputFunction[9] = atoi(Value);
else if (!strcasecmp(Name, "RecordingStatus")) LcdSetup.RecordingStatus = atoi(Value);
+ else if (!strcasecmp(Name, "ShowTime")) LcdSetup.ShowTime = atoi(Value);
else
return false;
return true;
@@ -78,6 +78,10 @@
configures whether the recording status is displayed "detailed"
(for every dvb card) or only "simple".
+ShowTime
+ implemented by Sebastian Frei <sebastian@schnapsleichen.de>
+ disable this if you have a small display and don't want to have
+ the time displayed in the top line
LCDproc is available at http://lcdproc.omnipotent.net/
or here http://sourceforge.net/projects/lcdproc/
@@ -20,5 +20,6 @@
for (int i = 0; i < LCDMAXOUTPUTS; i++)
OutputFunction[i] = 0;
RecordingStatus = 0;
+ ShowTime = 1;
}
@@ -20,6 +20,7 @@
int OutputNumber;
int OutputFunction[LCDMAXOUTPUTS];
int RecordingStatus;
+ int ShowTime;
public:
cLcdSetup(void);
};