Mailing List archive

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

[vdr] Re: Singal strength, Channels display and Actuator



Klaus Schmidinger wrote:
Luca Olivetti wrote:

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;

}

I'm thinking of a different approach, which will also work for setups
without an actuator. cDevice will get a new function that reports the
strength of the received signal, and the channel display will stay up
until the signal exceeds a given lower limit for at least 5 seconds
(it will also re-appear if the signal strength drops below that limit
for more than a given time).
If the dish is still moving (or hasn't started yet) it's possible that the signal strength will be high enough but for the wrong satellite.
Btw, will the signal strength meter visible?

Additionally there will be a new plugin interface that gets called
periodically from the tuning thread of the cDevice, through which a
plugin can implement whatever additional actions are necessary to
allow for the reception of a given channel (this is not limited to
moving a dish - it could be anything).
Why periodically? Should be needed only after a channel switch.
Maybe you mean, call it after a channel switch and call it periodically until it returns a success condition?
In this method will it be possible to modify the channel info (show a message?)

Maybe would be a good idea to allow a plugin to extend the channel info? The status message may be enough if only one plugin is using it, but suppose that either

1)there's more than one plugin wanting to display a message
2) the actuator wanting to display both the current position and signal strength on different lines
3) the actuator wanting to display the current position when the user calls up the channel info (or any other plugin wanting to display some information in the channel info).

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