Reply to thread

[CODE=csharp]


              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();

                }

            }


[/CODE]



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.


???


Top Bottom