Skip to content

Commit

Permalink
[Satconfig] setup tuners FBCLink remove all 1.2 diseqc mode (#2857)
Browse files Browse the repository at this point in the history
-When FBCRoot not 1.2 diseqc mode tuners FBCLink  not visible
"Additional cable of motorized LNB"
  • Loading branch information
Dima73 authored and Huevos committed Feb 17, 2021
1 parent be65a8a commit ec756cc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
5 changes: 3 additions & 2 deletions lib/python/Components/NimManager.py
Expand Up @@ -1003,7 +1003,7 @@ def canEqualTo(self, slotid):
nimList.remove(nim)
return nimList

def canDependOn(self, slotid, advanced_satposdepends=False):
def canDependOn(self, slotid, advanced_satposdepends=""):
type = self.getNimType(slotid)
type = type[:5] # DVB-S2X --> DVB-S, DVB-S2 --> DVB-S, DVB-T2 --> DVB-T, DVB-C2 --> DVB-C
nimList = self.getNimListOfType(type, slotid)
Expand All @@ -1026,7 +1026,8 @@ def canDependOn(self, slotid, advanced_satposdepends=False):
break
if nimHaveRotor:
if advanced_satposdepends:
positionerList.append(nim)
if advanced_satposdepends == "all" or self.nim_slots[nim].isFBCRoot():
positionerList.append(nim)
else:
alreadyConnected = False
for testnim in nimList:
Expand Down
13 changes: 9 additions & 4 deletions lib/python/Screens/Satconfig.py
Expand Up @@ -148,10 +148,13 @@ def createSetup(self):
elif self.nimConfig.configMode.value == "nothing":
pass
elif self.nimConfig.configMode.value == "advanced":
advanced_satposdepends_satlist_choices = ("3607", _("Additional cable of motorized LNB"), 1)
advanced_satlist_choices = self.nimConfig.advanced.sats.choices.choices
advanced_setchoices = False
if nimmanager.canDependOn(self.slotid, True):
advanced_satposdepends_satlist_choices = ("3607", _("Additional cable of motorized LNB"), 1)
advanced_satlist_choices = self.nimConfig.advanced.sats.choices.choices[:]
if self.nim.isFBCLink() and ("3602", _('All satellites 2 (USALS)')) in advanced_satlist_choices:
advanced_satlist_choices = nimmanager.satList[:]
advanced_setchoices = True
if nimmanager.canDependOn(self.slotid, advanced_satposdepends=self.nim.isFBCLink() and "fbc" or "all"):
if advanced_satposdepends_satlist_choices not in advanced_satlist_choices:
advanced_satlist_choices.append(advanced_satposdepends_satlist_choices)
advanced_setchoices = True
Expand All @@ -169,7 +172,7 @@ def createSetup(self):
self.list.append(self.advancedSatsEntry)
current_config_sats = self.nimConfig.advanced.sats.value
if current_config_sats == "3607":
self.nimConfig.connectedTo.setChoices([((str(id), nimmanager.getNimDescription(id))) for id in nimmanager.canDependOn(self.slotid, True)])
self.nimConfig.connectedTo.setChoices([((str(id), nimmanager.getNimDescription(id))) for id in nimmanager.canDependOn(self.slotid, advanced_satposdepends=self.nim.isFBCLink() and "fbc" or "all")])
self.list.append(getConfigListEntry(self.indent % _("Tuner"), self.nimConfig.connectedTo, _("Select the tuner that controls the motorised dish.")))
if current_config_sats in ("3605", "3606", "3607"):
if current_config_sats != "3607":
Expand Down Expand Up @@ -440,6 +443,8 @@ def fillListWithAdvancedSatEntrys(self, Sat):
self.list.append(getConfigListEntry(self.indent % _("Tone mode"), Sat.tonemode, _("Select 'band' if using a 'universal' LNB, otherwise consult your LNB spec sheet.")))

if lnbnum < 65 or lnbnum == 71:
if self.nim.isFBCLink() and ("1_2", _("1.2")) in currLnb.diseqcMode.choices.choices:
currLnb.diseqcMode.setChoices([("none", _("None")), ("1_0", _("1.0")), ("1_1", _("1.1"))], "none")
self.advancedDiseqcMode = getConfigListEntry(self.indent % _("DiSEqC mode"), currLnb.diseqcMode, _("Select '1.0' for standard committed switches, '1.1' for uncommitted switches, and '1.2' for systems using a positioner."))
self.list.append(self.advancedDiseqcMode)
if currLnb.diseqcMode.value != "none":
Expand Down

0 comments on commit ec756cc

Please sign in to comment.