Normal
[CODE=csharp] if (currentDetail == null) { //add new channel exists = false; dbChannel = layer.AddNewChannel(channel.Name, channel.LogicalChannelNumber); dbChannel.SortOrder = 10000; if (channel.LogicalChannelNumber >= 1) { dbChannel.SortOrder = channel.LogicalChannelNumber; } dbChannel.IsTv = channel.IsTv; dbChannel.IsRadio = channel.IsRadio; dbChannel.Persist(); } else { exists = true; dbChannel = null; if (RemoteControl.Instance.SignalLevel(_cardNumber) >= 30) { // add new strong channel dbChannel = layer.AddNewChannel(channel.Name, channel.LogicalChannelNumber); } else { dbChannel = currentDetail.ReferencedChannel(); } }[/CODE]That's it.WIth the comparitor:[CODE=csharp]if (RemoteControl.Instance.SignalLevel(_cardNumber) >= 30)[/CODE]Setting a crude, but seemingly real-world here, 30 (units unknown) threshold.I'm thinking a real-world Quality threshold should be introduced that matches the Signal Quality measure as they do seem to correlate in the real-world.
[CODE=csharp]
if (currentDetail == null)
{
//add new channel
exists = false;
dbChannel = layer.AddNewChannel(channel.Name, channel.LogicalChannelNumber);
dbChannel.SortOrder = 10000;
if (channel.LogicalChannelNumber >= 1)
dbChannel.SortOrder = channel.LogicalChannelNumber;
}
dbChannel.IsTv = channel.IsTv;
dbChannel.IsRadio = channel.IsRadio;
dbChannel.Persist();
else
exists = true;
dbChannel = null;
if (RemoteControl.Instance.SignalLevel(_cardNumber) >= 30)
// add new strong channel
} else
dbChannel = currentDetail.ReferencedChannel();
}[/CODE]
That's it.
WIth the comparitor:
[CODE=csharp]if (RemoteControl.Instance.SignalLevel(_cardNumber) >= 30)[/CODE]
Setting a crude, but seemingly real-world here, 30 (units unknown) threshold.
I'm thinking a real-world Quality threshold should be introduced that matches the Signal Quality measure as they do seem to correlate in the real-world.