Klaus Schmidinger wrote:
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.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.htmlMaybe 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).
Why periodically? Should be needed only after a channel switch.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).
Attachment:
signature.asc
Description: OpenPGP digital signature