Automatically Tune to Strongest Duplicate Channel (1 Viewer)

ajs

Development Group
  • Team MediaPortal
  • February 29, 2008
    15,492
    10,369
    Kyiv
    Home Country
    Ukraine Ukraine
    @framug we have in code this block: MediaPortal/MediaPortal-1
    C#:
            int level = _currentCard.SignalLevel;
            if (level < 0) level = 0;
            if (level > 100) level = 100;
            progressBarLevel.Value = level;
    Maybe the signal level should always be normalized? And in the GUI, as far as I remember, it is always displayed within 0..100.
     

    framug

    Super Moderator
  • Team MediaPortal
  • January 31, 2005
    5,884
    1,956
    South of France
    Home Country
    France France
    @framug we have in code this block: MediaPortal/MediaPortal-1
    C#:
            int level = _currentCard.SignalLevel;
            if (level < 0) level = 0;
            if (level > 100) level = 100;
            progressBarLevel.Value = level;
    Well, I know that, it's because, negative values for signal where not accepted in the past.
    If you want to know all the story, please search "signal" in the forum and, me as author....
     

    vapourEyes

    Portal Pro
    July 31, 2013
    144
    43
    Home Country
    United Kingdom United Kingdom
    @framug we have in code this block: MediaPortal/MediaPortal-1
    C#:
            int level = _currentCard.SignalLevel;
            if (level < 0) level = 0;
            if (level > 100) level = 100;
            progressBarLevel.Value = level;
    Maybe the signal level should always be normalized? And in the GUI, as far as I remember, it is always displayed within 0..100.

    Abs

    C#:
            int level = Abs(_currentCard.SignalLevel);
            progressBarLevel.Value = level;

    ???
     

    vapourEyes

    Portal Pro
    July 31, 2013
    144
    43
    Home Country
    United Kingdom United Kingdom
    C#:
                  int level = RemoteControl.Instance.SignalLevel(_cardNumber);
                  progressBarLevel.Value = Math.Abs(level);

    ???
     

    vapourEyes

    Portal Pro
    July 31, 2013
    144
    43
    Home Country
    United Kingdom United Kingdom
    C#:
                  exists = true;
                  dbChannel = null;
    
                  int tuningOverallThreshold = 35;
    
                  int level = RemoteControl.Instance.SignalLevel(_cardNumber);
                  progressBarLevel.Value = Math.Abs(level);
    
                  // Normalise
                  if (level < 0) level = 0;
                  if (level > 100) level = 100;
    
                  // Filter weaker channels...
                  if (!( Math.Abs(RemoteControl.Instance.SignalLevel(_cardNumber)) > tuningOverallThreshold && RemoteControl.Instance.SignalQuality(_cardNumber) > tuningOverallThreshold)) {
                    continue;
                  }
    
                  // Darwinian channel natural selection...
                  if (RemoteControl.Instance.SignalLevel(_cardNumber) > 0)
                    if (Math.Abs(RemoteControl.Instance.SignalLevel(_cardNumber)) >= tuningOverallThreshold && Math.Abs(RemoteControl.Instance.SignalQuality(_cardNumber)) >= tuningOverallThreshold)
                    {
                      // add new strong channel
                      dbChannel = layer.AddNewChannel(channel.Name, channel.LogicalChannelNumber);
                    }
                    else
                    {
                      dbChannel = currentDetail.ReferencedChannel();
                    }
                }


    A crude approximation without per-channel and overall level storage. Which wont work anyways logically coz you need a start point that then acts as a limiter in any comparitor... ???

    You'd have to constantly reset and revise all stored levels, adjusting as the next highest level enters the system.

    I've also introduced weak-channel ignore too, since under testing here a weak channel crept in under the radar.... don't worry - we'll show some mercy.

    ???
     
    Last edited:

    framug

    Super Moderator
  • Team MediaPortal
  • January 31, 2005
    5,884
    1,956
    South of France
    Home Country
    France France
    Well, if you continue, you will modify all classes I already modified for others things, LOL ! :D
    Also, when you post, the name of the class could be interesting, for others.
    An advice : Wait a bit for an answer, don't be impatient.
    Otherwise, I'm afraid you will work for nothing...
    But, it's up to you.
     

    ajs

    Development Group
  • Team MediaPortal
  • February 29, 2008
    15,492
    10,369
    Kyiv
    Home Country
    Ukraine Ukraine
    Well, I know that, it's because, negative values for signal where not accepted in the past.
    If you want to know all the story, please search "signal" in the forum and, me as author....
    I do not use the TV part, because I do not have a satellite, etc., there is only IPTV, but the Media Portal does not support it. :)
     

    Users who are viewing this thread

    Top Bottom