Automatically Tune to Strongest Duplicate Channel (1 Viewer)

ajs

Development Group
  • Team MediaPortal
  • February 29, 2008
    12,117
    6,888
    Kyiv
    Ukraine Ukraine
    Country flag
    @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
    4,539
    549
    South of France
    France France
    Country flag
    @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
    142
    43
    United Kingdom United Kingdom
    Country flag
    @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
    142
    43
    United Kingdom United Kingdom
    Country flag
    C#:
                  int level = RemoteControl.Instance.SignalLevel(_cardNumber);
                  progressBarLevel.Value = Math.Abs(level);
    ???
     

    vapourEyes

    Portal Pro
    July 31, 2013
    142
    43
    United Kingdom United Kingdom
    Country flag
    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
    4,539
    549
    South of France
    France France
    Country flag
    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
    12,117
    6,888
    Kyiv
    Ukraine Ukraine
    Country flag
    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 (Users: 0, Guests: 1)

    OP Similar threads Forum Replies Date
    vapourEyes Automatically Re-Tune Periodically Improvement Suggestions 1
    S TV-Server MP1 - Automatic search doesn't work Installation, configuration support 2
    W [solved] [FIXED] Survivor season 40 not automatically matching My TVSeries 1
    G Switch to new channel at begining of program automatically Feature Requests 0
    C How do I get MediaPortal to separate recording files by channel and month? General 2
    H MP1.21F video database scan, can it be scheduled to automatically run in background General Support 5
    Steve.Rayner61 Online Videos - Automatic Updates fails 'Automatic update disabled. Check your internet connection' OnlineVideos 10
    greybox 1.20 final does not update video duration automatically 1.20 10
    greybox 1.20 final does not update video duration automatically 1.20 Pre Release 1
    M TV Server can't tune to some DVB-S multiplexes while other software can General 0
    bribbon [Pending] DVB-C Tuning Parameters: Switzerland.UPC Cablecom [NID 43020] v.7.xml Submit: EPG-Grabbers and tuningdetails 0
    J DVB-S2 card fails to tune? Subchannel count increasing Television (MyTV frontend and TV-Server) 3
    M Tuning channels with quad tuner question General 6
    E [solved] Vodafone Kabel dvb-c Braunschweig Tuning Liste (Stand 31.01.2019) TV / Streaming 0
    A VB-IP SPAIN Movistar plus tunning details (Update 26 dec 2018) Submit: EPG-Grabbers and tuningdetails 1
    M Wrong DVB-T tuning parameters for Sweden, Vannas - Granlundsberget 1.20 Pre Release 1
    U Client cannot tune channels General 1
    Charlie TV [solved] Channels disappeared after transmitter changes (Midhurst) General Support 4
    Top Bottom