+ def createConfig(self, frontendData):
+ #("Type", frontendData["system"], TYPE_TEXT),
+ #("Modulation", frontendData["modulation"], TYPE_TEXT),
+ #("Orbital position", frontendData["orbital_position"], TYPE_VALUE_DEC),
+ #("Frequency", frontendData["frequency"], TYPE_VALUE_DEC),
+ #("Symbolrate", frontendData["symbol_rate"], TYPE_VALUE_DEC),
+ #("Polarization", frontendData["polarization"], TYPE_TEXT),
+ #("Inversion", frontendData["inversion"], TYPE_TEXT),
+ #("FEC inner", frontendData["fec_inner"], TYPE_TEXT),
+ #)
+ #elif frontendData["tuner_type"] == "DVB-C":
+ #return ( ("NIM", ['A', 'B', 'C', 'D'][frontendData["tuner_number"]], TYPE_TEXT),
+ #("Type", frontendData["tuner_type"], TYPE_TEXT),
+ #("Frequency", frontendData["frequency"], TYPE_VALUE_DEC),
+ #("Symbolrate", frontendData["symbol_rate"], TYPE_VALUE_DEC),
+ #("Modulation", frontendData["modulation"], TYPE_TEXT),
+ #("Inversion", frontendData["inversion"], TYPE_TEXT),
+ # ("FEC inner", frontendData["fec_inner"], TYPE_TEXT),
+ #)
+ #elif frontendData["tuner_type"] == "DVB-T":
+ #return ( ("NIM", ['A', 'B', 'C', 'D'][frontendData["tuner_number"]], TYPE_TEXT),
+ #("Type", frontendData["tuner_type"], TYPE_TEXT),
+ #("Frequency", frontendData["frequency"], TYPE_VALUE_DEC),
+ #("Inversion", frontendData["inversion"], TYPE_TEXT),
+ #("Bandwidth", frontendData["bandwidth"], TYPE_VALUE_DEC),
+ #("CodeRateLP", frontendData["code_rate_lp"], TYPE_TEXT),
+ #("CodeRateHP", frontendData["code_rate_hp"], TYPE_TEXT),
+ #("Constellation", frontendData["constellation"], TYPE_TEXT),
+ #("Transmission Mode", frontendData["transmission_mode"], TYPE_TEXT),
+ #("Guard Interval", frontendData["guard_interval"], TYPE_TEXT),
+ #("Hierarchy Inform.", frontendData["hierarchy_information"], TYPE_TEXT),
+ defaultSat = { "orbpos": 192, "system": "dvb-s", "frequency": 11836, "inversion": "auto", "symbolrate": 27500, "polarization": "horizontal", "fec": "auto", "fec_s2": "9_10", "modulation": "qpsk" }
+ defaultCab = {"frequency": 466, "inversion": "auto", "modulation": "64qam", "fec": "auto", "symbolrate": 6900}
+ if frontendData is not None:
+ ttype = frontendData.get("tuner_type", "UNKNOWN")
+ if ttype == "DVB-S":
+ defaultSat["system"] = {"DVB-S": "dvb-s", "DVB-S2": "dvb-s2"}[frontendData.get("system", "DVB-S")]
+ defaultSat["frequency"] = int(frontendData.get("frequency", 0) / 1000)
+ defaultSat["inversion"] = {"INVERSION_OFF": "off", "INVERSION_ON": "on", "INVERSION_AUTO": "auto"}[frontendData.get("inversion", "INVERSION_AUTO")]
+ defaultSat["symbolrate"] = int(frontendData.get("symbol_rate", 0) / 1000)
+ defaultSat["polarization"] = {"HORIZONTAL": "horizontal", "VERTICAL": "vertical", "CIRCULAR_LEFT": "circular_left", "CIRCULAR_RIGHT": "circular_right", "UNKNOWN": None}[frontendData.get("polarization", "HORIZONTAL")]
+
+ if frontendData.get("system", "DVB-S") == "DVB-S2":
+ defaultSat["fec_s2"] = {"FEC_1_2": "1_2", "FEC_2_3": "2_3", "FEC_3_4": "3_4", "FEC_4_5": "4_5", "FEC_5_6": "5_6", "FEC_7_8": "7_8", "FEC_8_9": "8_9", "FEC_9_10": "9_10"} \
+ [frontendData.get("fec_inner", "FEC_AUTO")]
+ else:
+ defaultSat["fec"] = {"FEC_AUTO": "auto", "FEC_1_2": "1_2", "FEC_2_3": "2_3", "FEC_3_4": "3_4", "FEC_5_6": "5_6", "FEC_7_8": "7_8", "FEC_NONE": "none"} \
+ [frontendData.get("fec_inner", "FEC_AUTO")]
+
+ defaultSat["modulation"] = {"QPSK": "qpsk", "8PSK": "8psk"}[frontendData.get("modulation", "QPSK")]
+ defaultSat["orbpos"] = frontendData.get("orbital_position", 0)
+ elif ttype == "DVB-C":
+ defaultCab["frequency"] = int(frontendData.get("frequency", 0) / 1000)
+ defaultCab["symbolrate"] = int(frontendData.get("symbol_rate", 0) / 1000)
+ defaultCab["inversion"] = {"INVERSION_OFF": "off", "INVERSION_ON": "on", "INVERSION_AUTO": "auto"}[frontendData.get("inversion", "INVERSION_AUTO")]
+ defaultCab["fec"] = {"FEC_AUTO": "auto", "FEC_1_2": "1_2", "FEC_2_3": "2_3", "FEC_3_4": "3_4", "FEC_5_6": "5_6", "FEC_7_8": "7_8", "FEC_8_9": "8_9", "FEC_NONE": "none"}[frontendData.get("fec_inner", "FEC_AUTO")]
+ defaultCab["modulation"] = {"QAM_AUTO": "auto", "QAM_16": "16qam", "QAM_32": "32qam", "QAM_64": "64qam", "QAM_128": "128qam", "QAM_256": "256qam"}[frontendData.get("modulation", "QAM_16")]
+
+ self.scan_sat = ConfigSubsection()
+ self.scan_cab = ConfigSubsection()
+ self.scan_ter = ConfigSubsection()
+
+ self.scan_type = ConfigSelection(default = "single_transponder", choices = [("single_transponder", _("Single transponder")), ("single_satellite", _("Single satellite")), ("multisat", _("Multisat"))])
+ self.scan_typecable = ConfigSelection(default = "single_transponder", choices = [("single_transponder", _("Single transponder")), ("complete", _("Complete"))])
+ self.scan_typeterrestrial = ConfigSelection(default = "single_transponder", choices = [("single_transponder", _("Single transponder")), ("complete", _("Complete"))])
+ self.scan_clearallservices = ConfigSelection(default = "no", choices = [("no", _("no")), ("yes", _("yes")), ("yes_hold_feeds", _("yes (keep feeds)"))])
+ self.scan_networkScan = ConfigYesNo(default = False)
+
+ nim_list = []
+ # collect all nims which are *not* set to "nothing"
+ for n in nimmanager.nim_slots:
+ if n.config_mode != "nothing":
+ nim_list.append((str(n.slot), n.friendly_full_description))
+
+ self.scan_nims = ConfigSelection(choices = nim_list)
+
+ # status
+ self.scan_snr = ConfigSlider()
+ self.scan_snr.enabled = False
+ self.scan_agc = ConfigSlider()
+ self.scan_agc.enabled = False
+ self.scan_ber = ConfigSlider()
+ self.scan_ber.enabled = False