Skip to content

Commit

Permalink
Try to resolve issues related to AutoDiseqc
Browse files Browse the repository at this point in the history
E.g. when you did predefine satellites on some ports then the mode
setting could be manipulated to less ports. This resolved it by not
changing the port parameter depending on the scan ports. I also removed
some lines and parameters that were not really needed.
  • Loading branch information
Littlesat committed Dec 29, 2024
1 parent 260287d commit 5b75b40
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
15 changes: 2 additions & 13 deletions lib/python/Screens/AutoDiseqc.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ class AutoDiseqc(ConfigListScreen, Screen):
SAT_TABLE_ONID = 16
SAT_TABLE_NAME = 17

def __init__(self, session, feid, nr_of_ports, simple_tone, simple_sat_change, order="all"):
def __init__(self, session, feid, nr_of_ports, order="all"):
self.skin = AutoDiseqc.skin
Screen.__init__(self, session)

Expand All @@ -321,8 +321,6 @@ def __init__(self, session, feid, nr_of_ports, simple_tone, simple_sat_change, o
self.port_index = 0
self.feid = feid
self.nr_of_ports = nr_of_ports
self.simple_tone = simple_tone
self.simple_sat_change = simple_sat_change
self.found_sats = []
self.circular_setup = 0
if order == "all":
Expand Down Expand Up @@ -426,23 +424,14 @@ def statusCallback(self):
self.clearNimEntries()
config.Nims[self.feid].diseqcD.value = "%d" % (self.sat_frequencies[self.index][self.SAT_TABLE_ORBPOS])

if self.nr_of_ports == 4:
config.Nims[self.feid].diseqcMode.value = "diseqc_a_b_c_d"
elif self.nr_of_ports == 2:
config.Nims[self.feid].diseqcMode.value = "diseqc_a_b"
else:
config.Nims[self.feid].diseqcMode.value = "single"
if config.Nims[self.feid].diseqcMode.value == "single":
if self.sat_frequencies[self.index][self.SAT_TABLE_ORBPOS] == 360 and not self.found_sats:
config.Nims[self.feid].simpleDiSEqCSetCircularLNB.value = True
self.circular_setup = 1
if self.sat_frequencies[self.index][self.SAT_TABLE_ORBPOS] == 560 and not self.found_sats:
config.Nims[self.feid].simpleDiSEqCSetCircularLNB.value = True
self.circular_setup = 2

config.Nims[self.feid].configMode.value = "simple"
config.Nims[self.feid].simpleDiSEqCSetVoltageTone = self.simple_tone
config.Nims[self.feid].simpleDiSEqCOnlyOnSatChange = self.simple_sat_change

self.saveAndReloadNimConfig()
self.state += 1

Expand Down
2 changes: 1 addition & 1 deletion lib/python/Screens/Satconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ def run(self):
def autoDiseqcRun(self):
self.stopService()
order = self.nimConfig.autoDiSEqC_order_single.value if self.nimConfig.diseqcMode.value == "single" else self.nimConfig.autoDiSEqC_order.value
self.session.openWithCallback(self.autoDiseqcCallback, AutoDiseqc, self.slotid, self.autodiseqc_ports, self.nimConfig.simpleDiSEqCSetVoltageTone, self.nimConfig.simpleDiSEqCOnlyOnSatChange, order)
self.session.openWithCallback(self.autoDiseqcCallback, AutoDiseqc, self.slotid, self.autodiseqc_ports, order)

def autoDiseqcCallback(self, result):
from Screens.Wizard import Wizard
Expand Down

0 comments on commit 5b75b40

Please sign in to comment.