Re: [ANNOUNCE] vdr-rotor support patches for VDR-1.5.16

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

 



Hi,

I haven't been able to make rotor plugin work with the multiproto 
driver. I created dummy channel entries that have tone off (f < 11700) 
into beginning of each satellite position group in my channels.conf  and 
now zapping with rotor plugin by pressing ok and then < and > keys works 
with 100% success. I have been looking at rotor plugin and didn't get 
idea how switching off tone could be syncronized to tuning and 
diseqc.conf sequences without possible negative influence to tuning. Or 
is there a guarantee for some order of execution? I wonder if it worked 
with the existing Linux kernel DVB-S driver with just good luck.

Wouldn't it be better to have in diseqc.conf possibility for this kind 
of setup

S19.2E 11700 V  9750 t V W15 G W15 v t
S19.2E 99999 V 10600 t V W15 G W15 v T
S19.2E 11700 H  9750 t V W15 G W15 V t
S19.2E 99999 H 10600 t V W15 G W15 V T

where the continuous tone is first switched off, then LNB voltage is set 
to 18V for better rotor speed and then GotoX is sent with internal 
computation based on new position and geographic location, etc (to be 
added to vdr setup, e.g. LNB diseqc config page). There could blind be 
waiting of positioning inside G operation with estimate about rotor 
speed to avoid temporary tuning to intermediate positions. Finally the 
proper tone and voltage is set. This way there would be exact control 
when GotoX is issued. It would be possible to enable EIT scan and 
channel/multiplex updates with rotor without fear that it messes up 
channels.conf. With some more thinking the "t V W15" and  "W15" should 
perhaps be put inside "G".

This could be done by utilizing code from rotor plugin this into dvbdevice.c

  if (frontendType & (DVBFE_DELSYS_DVBS | DVBFE_DELSYS_DVBS2)) {
     unsigned int frequency = channel.Frequency();
     if (Setup.DiSEqC) {
        cDiseqc *diseqc = Diseqcs.Get(channel.Source(), 
channel.Frequency(), channel.Polarization());
        if (diseqc) {
           if (diseqc->Commands() && (!diseqcCommands || 
strcmp(diseqcCommands, diseqc->Commands()) != 0)) {
              cDiseqc::eDiseqcActions da;
              for (char *CurrentAction = NULL; (da = 
diseqc->Execute(&CurrentAction)) != cDiseqc::daNone; ) {
                  switch (da) {
                    case cDiseqc::daNone:      break;
                    case cDiseqc::daToneOff:   CHECK(ioctl(fd_frontend, 
FE_SET_TONE, SEC_TONE_OFF)); break;
                    case cDiseqc::daToneOn:    CHECK(ioctl(fd_frontend, 
FE_SET_TONE, SEC_TONE_ON)); break;
                    case cDiseqc::daVoltage13: CHECK(ioctl(fd_frontend, 
FE_SET_VOLTAGE, SEC_VOLTAGE_13)); break;
                    case cDiseqc::daVoltage18: CHECK(ioctl(fd_frontend, 
FE_SET_VOLTAGE, SEC_VOLTAGE_18)); break;
                    case cDiseqc::daMiniA:     CHECK(ioctl(fd_frontend, 
FE_DISEQC_SEND_BURST, SEC_MINI_A)); break;
                    case cDiseqc::daMiniB:     CHECK(ioctl(fd_frontend, 
FE_DISEQC_SEND_BURST, SEC_MINI_B)); break;
                    case cDiseqc::daGotoX: {

             ...

              int gotoXTable[10] = { 0x00, 0x02, 0x03, 0x05, 0x06, 0x08, 
0x0A, 0x0B, 0x0D, 0x0E };
              int satlong = (Source & ~0xC800);
              if ((Source & 0xC000) != 0x8000)
            return;
              if (Source & 0x0800)
            satlong = satlong * (-1);
              int Long=data.GotoxEW ? -data.GotoxLong : data.GotoxLong;
              int Lat=data.GotoxSN ? -data.GotoxLat : data.GotoxLat;
              double 
azimuth=M_PI+atan(tan((satlong-Long)*M_PI/1800)/sin(Lat*M_PI/1800));
              double 
x=acos(cos((satlong-Long)*M_PI/1800)*cos(Lat*M_PI/1800));
              double elevation=atan((cos(x)-0.1513)/sin(x));
              double 
SatHourangle=180+atan((-cos(elevation)*sin(azimuth))/(sin(elevation)*cos(Lat*M_PI/1800)
                          
-cos(elevation)*sin(Lat*M_PI/1800)*cos(azimuth)))*180/M_PI;
              int tmp=(int)(fabs(180-SatHourangle)*10);
              tmp=(tmp/10)*0x10 + gotoXTable[ tmp % 10 ];
              int p2=(tmp%0x0100);
              int p1=(tmp/0x0100);
              if (SatHourangle < 180)
            p1 |= 0xe0;
              else
            p1 |= 0xd0;
              DiseqcCommand(Gotox,p1,p2);
            }

            ...

            break;

But as vdr illiterate I couldn't figure how to check if the zapped 
source (diseqc->source?) is a new one to avoid generating unnecessary 
DiSEqC traffic and delays, and wondered to get a global variable for 
storing the previous position... help!

Or does this make sense?

Cheers,
Seppo


_______________________________________________
vdr mailing list
vdr@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr

[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux