Esempio n. 1
0
 def createConfigElement(self):
     if self.object_type == EIB_SWITCH and self.img in ("light", "outlet",
                                                        "fan", "pump"):
         self.config_element = ConfigOnOff()
     elif self.object_type == EIB_SWITCH and self.img == "blinds":
         self.config_element = ConfigUpDown()
     elif self.object_type == EIB_SWITCH:
         self.config_element = ConfigBoolean()
     elif self.object_type == EIB_MULTISWITCH:
         choiceslist = []
         for choice in self.custom_values:
             choiceslist.append(choice)
         self.config_element = ConfigSelection(choices=choiceslist)
     elif self.object_type == EIB_DIMMER:
         self.config_element = ConfigSelectionNumber(0, 255, 1)
         #self.config_element = ConfigSlider(increment = 10, limits=(0,255))
     elif self.object_type == EIB_THERMO:
         self.config_element = ConfigFloat(default=[0, 0],
                                           limits=[(-31, +31), (0, 99)])
     elif self.object_type == EIB_GOTO:
         self.config_element = ConfigGoto()
     elif self.object_type == EIB_TEXT:
         self.config_element = ConfigEIBText()
     else:
         print "[createConfigElement] couldn't create config_element for", self.getInfo(
         )
Esempio n. 2
0
	def createConfig(self):
		rotorposition = 1
		orb_pos = 0
		self.printMsg(_("Using tuner %s") % chr(0x41 + self.feid))
		if not self.advanced:
			self.printMsg(_("Configuration mode: %s") % _("simple"))
			nim = config.Nims[self.feid]
			self.sitelon = nim.longitude.float
			self.longitudeOrientation = nim.longitudeOrientation.value
			self.sitelat = nim.latitude.float
			self.latitudeOrientation = nim.latitudeOrientation.value
			self.sitelat = PositionerSetup.orbital2metric(self.sitelat, self.latitudeOrientation)
			self.sitelon = PositionerSetup.orbital2metric(self.sitelon, self.longitudeOrientation)
			self.tuningstepsize = nim.tuningstepsize.float
			self.rotorPositions = nim.rotorPositions.value
			self.turningspeedH = nim.turningspeedH.float
			self.turningspeedV = nim.turningspeedV.float
		else:	# it is advanced
			self.printMsg(_("Configuration mode: %s") % _("advanced"))
			fe_data = { }
			self.frontend.getFrontendData(fe_data)
			self.frontend.getTransponderData(fe_data, True)
			orb_pos = fe_data.get("orbital_position", None)
			if orb_pos in self.availablesats:
				rotorposition = int(self.advancedsats[orb_pos].rotorposition.value)
			self.setLNB(self.getLNBfromConfig(orb_pos))
		self.positioner_tune = ConfigNothing()
		self.positioner_move = ConfigNothing()
		self.positioner_finemove = ConfigNothing()
		self.positioner_limits = ConfigNothing()
		self.positioner_storage = ConfigInteger(default = rotorposition, limits = (1, self.rotorPositions))
		self.allocatedIndices = []
		m = PositionerSetup.satposition2metric(orb_pos)
		self.orbitalposition = ConfigFloat(default = [int(m[0] / 10), m[0] % 10], limits = [(0,180),(0,9)])
		self.orientation = ConfigSelection([("east", _("East")), ("west", _("West"))], m[1])
Esempio n. 3
0
	def __init__(self, session, frequency):
		Screen.__init__(self, session)
		self.setTitle(_("SDR input"))
		self.skinName = ["SDGRadioInput", "Setup"]

		self["key_red"] = StaticText(_("Cancel"))
		self["key_green"] = StaticText(_("OK"))
		self["description"] = Label("") # filled automatically when calling createSummary()

		self["setupActions"] = ActionMap(["OkCancelActions", "ColorActions"],
		{
			"cancel": self.keyCancel,
			"red": self.keyCancel,
			"ok": self.ok,
			"green": self.ok
		}, -2)

		# split frequency string to interger and decimal parts
		freq = frequency.partition(".")
		freqInt = "{:0>4s}".format(freq[0])
		freqDec = "{:0<4s}".format(freq[2])

		#self.input = ConfigSubsection() # not needed
		self.inputfreq = ConfigFloat(default=[int(freqInt), int(freqDec)], limits=[(SDR_MIN_FREQ, SDR_MAX_FREQ), (0, 9999)])

		configlist = []

		configlist.append(getConfigListEntry(_('Frequency in MHz'),
			self.inputfreq,
			_('Enter the desired frequency. You can input values between %(min)d - %(max)d MHz with up to 4 decimal digits'
				' (precision of 0.1 KHz).') % {'min': SDR_MIN_FREQ, 'max': SDR_MAX_FREQ}))

		ConfigListScreen.__init__(self, configlist, session)
Esempio n. 4
0
                                 self.scanFrequency, self.scanSymbolRate,
                                 self.scanModulation, self.keepNumbers,
                                 self.hdList)

    def ok(self):
        if self["scan"].isDone():
            self.close()

    def cancel(self):
        self.close()


config.plugins.CableScan = ConfigSubsection()
config.plugins.CableScan.keepnumbering = ConfigYesNo(default=False)
config.plugins.CableScan.hdlist = ConfigYesNo(default=False)
config.plugins.CableScan.frequency = ConfigFloat(default=[323, 0],
                                                 limits=[(50, 999), (0, 999)])
config.plugins.CableScan.symbolrate = ConfigInteger(default=6875,
                                                    limits=(1, 9999))
config.plugins.CableScan.networkid = ConfigInteger(default=0,
                                                   limits=(0, 99999))
config.plugins.CableScan.modulation = ConfigSelection(
    choices=[(str(eDVBFrontendParametersCable.Modulation_QAM16), "16-QAM"),
             (str(eDVBFrontendParametersCable.Modulation_QAM32), "32-QAM"),
             (str(eDVBFrontendParametersCable.Modulation_QAM64), "64-QAM"),
             (str(eDVBFrontendParametersCable.Modulation_QAM128), "128-QAM"),
             (str(eDVBFrontendParametersCable.Modulation_QAM256), "256-QAM")],
    default=str(eDVBFrontendParametersCable.Modulation_QAM64))
config.plugins.CableScan.auto = ConfigYesNo(default=True)


class CableScanScreen(ConfigListScreen, Screen):
Esempio n. 5
0
		self.onFirstExecBegin.append(self.doServiceScan)

	def doServiceScan(self):
		self["scan"] = CableScan(self["scan_state"], self["scan_progress"], self.scanTuner, self.scanNetwork, self.scanFrequency, self.scanSymbolRate, self.scanModulation, self.keepNumbers, self.hdList)

	def ok(self):
		if self["scan"].isDone():
			self.close()

	def cancel(self):
		self.close()

config.plugins.CableScan = ConfigSubsection()
config.plugins.CableScan.keepnumbering = ConfigYesNo(default = True)
config.plugins.CableScan.hdlist = ConfigYesNo(default = True)
config.plugins.CableScan.frequency = ConfigFloat(default = [130, 0], limits = [(42, 870),(0, 999)])
config.plugins.CableScan.symbolrate = ConfigInteger(default = 6900, limits = (1000, 7200))
config.plugins.CableScan.networkid = ConfigInteger(default = 0, limits = (0, 99999))
config.plugins.CableScan.modulation = ConfigSelection(
	choices =
		[(str(eDVBFrontendParametersCable.Modulation_QAM16), "16-QAM"),
		(str(eDVBFrontendParametersCable.Modulation_QAM32), "32-QAM"),
		(str(eDVBFrontendParametersCable.Modulation_QAM64), "64-QAM"),
		(str(eDVBFrontendParametersCable.Modulation_QAM128), "128-QAM"),
		(str(eDVBFrontendParametersCable.Modulation_QAM256), "256-QAM")],
	default = str(eDVBFrontendParametersCable.Modulation_QAM256))
config.plugins.CableScan.auto = ConfigYesNo(default = False)

class CableScanScreen(ConfigListScreen, Screen):
	skin = """
<screen position="center,center" size="580,320" title="Cable Scan">
Esempio n. 6
0
                                                    choices=[("1", "Dynamic"),
                                                             ("2", "Moodlamp")
                                                             ])
config.plugins.Boblight_grab.moodlamp_onoff_standby = ConfigEnableDisable(
    default=False)
#config.plugins.Boblight_grab.moodlamp_static_color_r    = ConfigSlider(default=28, increment=1, limits=(0,255))
#config.plugins.Boblight_grab.moodlamp_static_color_g    = ConfigSlider(default=107, increment=1, limits=(0,255))
#config.plugins.Boblight_grab.moodlamp_static_color_b    = ConfigSlider(default=160, increment=1, limits=(0,255))
config.plugins.Boblight_grab.moodlamp_static_color_r = ConfigInteger(
    0, (0, 255))
config.plugins.Boblight_grab.moodlamp_static_color_g = ConfigInteger(
    0, (0, 255))
config.plugins.Boblight_grab.moodlamp_static_color_b = ConfigInteger(
    0, (0, 255))
config.plugins.Boblight_grab.address = ConfigFloat(default=[127, 0, 0, 0],
                                                   limits=[(0, 255), (0, 255),
                                                           (0, 255), (0, 255)])
config.plugins.Boblight_grab.port = ConfigInteger(default=19333,
                                                  limits=(1, 65535))
config.plugins.Boblight_grab.network_onoff = ConfigEnableDisable(default=False)
config.plugins.Boblight_grab.moodlamp_static_profile = ConfigSelection(
    default="0",
    choices=[("0", "Custom color"), ("1", "Ladybug"), ("2", "Blue"),
             ("3", "Ocean blue")])
config.plugins.Boblight_grab.moodlamp_static = ConfigEnableDisable(
    default=False)
config.plugins.Boblight_grab.moodlamp_mode = ConfigSelection(
    default="0",
    choices=[("0", "Static color"), ("1", "Fading color (coming soon)")])

config.plugins.Boblight_grab.standby = ConfigEnableDisable(default=False)
Esempio n. 7
0
config.plugins.enigmalight.scanl  = ConfigInteger(10,(0, 100))
config.plugins.enigmalight.scanr  = ConfigInteger(10,(0, 100))
config.plugins.enigmalight.scant  = ConfigInteger(10,(0, 100))
config.plugins.enigmalight.scanb  = ConfigInteger(10,(0, 100))

config.plugins.enigmalight.color_order  = ConfigSelection(default = "0", choices = [("0", "RGB"), ("1", "BGR"), ("2", "GBR"), ("3", "GRB"), ("4", "BRG"), ("5", "RBG")])

config.plugins.enigmalight.begincount_cw = ConfigSelection(default = "left-bottom", choices = [("left-bottom", _("LEFT [bottom]")), ("top-left", _("TOP [left]")),
("right-top", _("RIGHT [top]")), ("bottom-right", _("BOTTOM [right]")), ("bottom-middle-left", _("BOTTOM [middle]"))])

config.plugins.enigmalight.begincount_bw = ConfigSelection(default = "bottom-left", choices = [("bottom-left", _("BOTTOM [left]")), ("right-bottom", _("RIGHT [bottom]")), 
("top-right", _("TOP [right]")),("left-top", _("LEFT [top]")), ("bottom-middle-right", _("BOTTOM [middle]"))])

config.plugins.enigmalight.clockwise  = ConfigSelection(default = "1", choices = [("1", _("Clockwise")), ("2", _("Backwards"))])
config.plugins.enigmalight.floorstand = ConfigSelection(default = "1", choices = [("1", _("No")), ("2", _("Yes"))])
config.plugins.enigmalight.blacklevel = ConfigFloat(default = [0,0], limits = [(0,9),(0,99)])
config.plugins.enigmalight.overlap= ConfigOnOff(default=False)
config.plugins.enigmalight.precision  = ConfigInteger(255,(0, 255))

config.plugins.enigmalight.lastmode   = ConfigText(default = "-", fixed_size=10)
config.plugins.enigmalight.m_3dmode   = ConfigSelection(default = "1", choices = [("1", _("Disabled")), ("2", _("Top and Bottom")), ("3", _("SidebySide"))])

config.plugins.enigmalight.config_r_adjust = ConfigFloat(default = [1,00], limits = [(0,9),(00,99)])
config.plugins.enigmalight.config_r_gamma  = ConfigFloat(default = [0,91], limits = [(0,9),(00,99)])
config.plugins.enigmalight.config_r_blacklevel = ConfigFloat(default = [0,00], limits = [(0,9),(00,99)])
config.plugins.enigmalight.config_g_adjust = ConfigFloat(default = [0,96], limits = [(0,9),(00,99)])
config.plugins.enigmalight.config_g_gamma  = ConfigFloat(default = [0,86], limits = [(0,9),(00,99)])
config.plugins.enigmalight.config_g_blacklevel = ConfigFloat(default = [0,00], limits = [(0,9),(00,99)])

config.plugins.enigmalight.config_b_adjust = ConfigFloat(default = [0,80], limits = [(0,9),(00,99)])
config.plugins.enigmalight.config_b_gamma  = ConfigFloat(default = [0,95], limits = [(0,9),(00,99)])