Rotor Plugin fix for circular polarity

Message ID 76b958a105090919053f2051f@mail.gmail.com
State New
Headers

Commit Message

M Racine Sept. 10, 2005, 2:05 a.m. UTC
  Great plugin!
 But it was not reading all my rotor positions in my diseqc.conf.
I use a circular LNB, the polarities are 'L' or 'R' instead of 'H' or 'V'
 So a little patch was needed for the plugin to read both Linear and 
Circular sources found in diseqc.conf.
  

Comments

Thomas Bergwinkl Sept. 10, 2005, 8:03 a.m. UTC | #1
M Racine wrote:
> But it was not reading all my rotor positions 
> in my diseqc.conf.
> I use a circular LNB, the polarities are 'L' or 
> 'R' instead of 'H' or 'V'
>  
> So a little patch was needed for the plugin to 
> read both Linear and Circular sources found in diseqc.conf.

Thank you very much for your patch. I will include it
in the next version of the plugin. 

Thomas
  

Patch

--- ./rotor.c.orig	2005-09-09 21:49:52.000000000 -0400
+++ ./rotor.c	2005-09-09 21:51:06.000000000 -0400
@@ -101,6 +101,19 @@ 
         }   
       } 
     }
+    if (diseqc=Diseqcs.Get(source->Code(),12000,'l')) 
+    {
+      char *CurrentAction = NULL;
+      while ((diseqc->Execute(&CurrentAction))!= cDiseqc::daNone)  
+      {
+        codes = diseqc->Codes(n);
+        if (n==4 && (*codes==0xe0 || *codes==0xe1) && (*(codes+1)==0x30 || *(codes+1)==0x31) && *(codes+2)==0x6b)
+        {
+          List.Add(cSource::ToString(source->Code()),source->Description(),*(codes+3),source->Code());
+          break;
+        }   
+      } 
+    }
     if (!List.GetfromSource(source->Code()) && ((source->Code() & 0xC000) == 0x8000))
       List.Add(cSource::ToString(source->Code()),source->Description(),0,source->Code());
   }