Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: VDR developer version 1.3.12



Luca Olivetti wrote:
Klaus Schmidinger wrote:

Luca Olivetti wrote:
[...]

Any opinion on the patch I sent before your holidays?
http://www.linuxtv.org/mailinglists/vdr/2004/06-2004/msg00820.html

Not that I'm in a hurry (didn't have time to advance with the plugin
that will be needing that functionality) but I'd like your opinion, (and
I can always patch vdr if it's negative).


From a quick glance: what I don't like about this is the
exposure you give to the cDisplayChannel object and that there is
yet another cStatus call.

What _exactly_ is it that you want to achieve?
If it is just displaying a message, I'd say we should find another
way to accomplish this.

Displaying a message quickly changing (the dish position) *and* keeping the channel info on screen until the position has been reached or a positioning error occurred.
You suggested to use Skins.Message but it didn't work/it's not enough:
http://www.linuxtv.org/mailinglists/vdr/2004/06-2004/msg00545.html
Maybe it's more clear if I show the method using this patch (note that returning true will extend the time the channel info is shown):

bool cStatusMonitor::AlterDisplayChannel(cSkinDisplayChannel *displayChannel)
{
actuator_status status;
char *buf=NULL;

CHECK(ioctl(fd_actuator, AC_RSTATUS, &status));

bool showit=((last_state_shown != status.state) || (last_position_shown != status.position));
last_state_shown=status.state;
last_position_shown=status.position;

switch(status.state) {
case ACM_IDLE:
return false;

case ACM_WEST:
case ACM_EAST:
if (showit) {
asprintf(&buf,tr("Dish target %i position %i"),status.target, status.position);
displayChannel->SetMessage(mtInfo,buf);
}
return true;

case ACM_REACHED:
if (showit) displayChannel->SetMessage(mtInfo,tr("Position reached"));
return false;

case ACM_STOPPED:
case ACM_CHANGE:
if (showit) displayChannel->SetMessage(mtInfo,tr("Motor wait"));
return true;

case ACM_ERROR:
if (showit) displayChannel->SetMessage(mtError,tr("Motor error"));
return false;
}
return false;

}


Bye
--
- Yo también quiero una Europa libre de Patentes de Software -
- I want a Software Patents Free Europe too! And you? -
---------------------------------------------------------------
EuropeSwPatentFree - http://EuropeSwPatentFree.hispalinux.es

Attachment: signature.asc
Description: OpenPGP digital signature


Home | Main Index | Thread Index