示例#1
0
	def save(self):
		for count in range(fancontrol.getFanCount()):
#			fancontrol.getConfig(count).vlt.save()		# [iq]
			fancontrol.getConfig(count).pwm.save()
#			fancontrol.getConfig(count).vlt_standby.save()		# [iq]
			fancontrol.getConfig(count).pwm_standby.save()
		self.close()
示例#2
0
	def revert(self):
		for count in range(fancontrol.getFanCount()):
#			fancontrol.getConfig(count).vlt.load()		# [iq]
			fancontrol.getConfig(count).pwm.load()
#			fancontrol.getConfig(count).vlt_standby.load()		# [iq]
			fancontrol.getConfig(count).pwm_standby.load()
		self.close()
示例#3
0
    def __init__(self, session, args=None):
        Screen.__init__(self, session)

        templist = sensors.getSensorsList(sensors.TYPE_TEMPERATURE)
        tempcount = len(templist)
        fanlist = sensors.getSensorsList(sensors.TYPE_FAN_RPM)
        fancount = len(fanlist)

        self["red"] = StaticText(_("Cancel"))
        self["green"] = StaticText(_("OK"))
        self["yellow"] = StaticText("")
        self["blue"] = StaticText("")

        for count in range(8):
            if count < tempcount:
                id = templist[count]
                self["SensorTempText%d" % count] = StaticText(
                    sensors.getSensorName(id))
                self["SensorTemp%d" % count] = SensorSource(sensorid=id)
            else:
                self["SensorTempText%d" % count] = StaticText("")
                self["SensorTemp%d" % count] = SensorSource()

            if count < fancount:
                id = fanlist[count]
                self["SensorFanText%d" % count] = StaticText(
                    sensors.getSensorName(id))
                self["SensorFan%d" % count] = SensorSource(sensorid=id)
            else:
                self["SensorFanText%d" % count] = StaticText("")
                self["SensorFan%d" % count] = SensorSource()

        self.list = []
        for count in range(fancontrol.getFanCount()):
            self.list.append(
                getConfigListEntry(
                    _("Fan %d Voltage") % (count + 1),
                    fancontrol.getConfig(count).vlt))
            self.list.append(
                getConfigListEntry(
                    _("Fan %d PWM") % (count + 1),
                    fancontrol.getConfig(count).pwm))
            self.list.append(
                getConfigListEntry(
                    _("Standby Fan %d Voltage") % (count + 1),
                    fancontrol.getConfig(count).vlt_standby))
            self.list.append(
                getConfigListEntry(
                    _("Standby Fan %d PWM") % (count + 1),
                    fancontrol.getConfig(count).pwm_standby))

        ConfigListScreen.__init__(self, self.list, session=self.session)

        self["actions"] = ActionMap(
            ["OkCancelActions", "ColorActions"], {
                "ok": self.save,
                "cancel": self.revert,
                "red": self.revert,
                "green": self.save
            }, -1)
示例#4
0
 def save(self):
     for count in range(fancontrol.getFanCount()):
         fancontrol.getConfig(count).vlt.save()
         fancontrol.getConfig(count).pwm.save()
         fancontrol.getConfig(count).vlt_standby.save()
         fancontrol.getConfig(count).pwm_standby.save()
     self.close()
示例#5
0
 def revert(self):
     for count in range(fancontrol.getFanCount()):
         fancontrol.getConfig(count).vlt.load()
         fancontrol.getConfig(count).pwm.load()
         fancontrol.getConfig(count).vlt_standby.load()
         fancontrol.getConfig(count).pwm_standby.load()
     self.close()
示例#6
0
	def __init__(self, session, args = None):
		Screen.__init__(self, session)
		Screen.setTitle(self, _("Fan Control"))

		templist = sensors.getSensorsList(sensors.TYPE_TEMPERATURE)
		tempcount = len(templist)
		fanlist = sensors.getSensorsList(sensors.TYPE_FAN_RPM)
		fancount = len(fanlist)

		stb = HardwareInfo().get_device_name()
		self["key_red"] = self["red"] = StaticText(_("Cancel"))
		self["key_green"] = self["green"] = StaticText(_("OK"))

		for count in range(8):
			if count < tempcount:
				id = templist[count]
				if stb not in ('optimussos1', 'optimussos2', 'solo2'):
					self["SensorTempText%d" % count] = StaticText(sensors.getSensorName(id))
					self["SensorTemp%d" % count] = SensorSource(sensorid = id)
				elif stb in ('optimussos1', 'optimussos2', 'solo2') and id < 1:
					self["SensorTempText%d" % count] = StaticText(sensors.getSensorName(id))
					self["SensorTemp%d" % count] = SensorSource(sensorid = id)
				else:
					self["SensorTempText%d" % count] = StaticText("")
					self["SensorTemp%d" % count] = SensorSource()
			else:
				self["SensorTempText%d" % count] = StaticText("")
				self["SensorTemp%d" % count] = SensorSource()

			if count < fancount:
				id = fanlist[count]
				self["SensorFanText%d" % count] = StaticText(sensors.getSensorName(id))
				self["SensorFan%d" % count] = SensorSource(sensorid = id)
			else:
				self["SensorFanText%d" % count] = StaticText("")
				self["SensorFan%d" % count] = SensorSource()

		self.list = []
		for count in range(fancontrol.getFanCount()):
			if stb not in ('optimussos1', 'optimussos2', 'solo2'):
				self.list.append(getConfigListEntry(_("Fan %d voltage") % (count + 1), fancontrol.getConfig(count).vlt))
			self.list.append(getConfigListEntry(_("Fan %d PWM") % (count + 1), fancontrol.getConfig(count).pwm))
			if stb not in ('optimussos1', 'optimussos2', 'solo2'):
				self.list.append(getConfigListEntry(_("Standby fan %d voltage") % (count + 1), fancontrol.getConfig(count).vlt_standby))
			self.list.append(getConfigListEntry(_("Standby fan %d PWM") % (count + 1), fancontrol.getConfig(count).pwm_standby))

		ConfigListScreen.__init__(self, self.list, session = self.session)
		#self["config"].list = self.list
		#self["config"].setList(self.list)
		self["config"].l.setSeperation(300)

		self["actions"] = ActionMap(["OkCancelActions", "ColorActions", "MenuActions"],
		{
			"ok": self.save,
			"cancel": self.revert,
			"red": self.revert,
			"green": self.save,
			"menu": self.closeRecursive,
		}, -1)
示例#7
0
	def __init__(self, session, args = None):
		Screen.__init__(self, session)
		Screen.setTitle(self, _("Fan Control"))

		templist = sensors.getSensorsList(sensors.TYPE_TEMPERATURE)
		tempcount = len(templist)
		fanlist = sensors.getSensorsList(sensors.TYPE_FAN_RPM)
		fancount = len(fanlist)

		self["key_red"] = self["red"] = StaticText(_("Cancel"))
		self["key_green"] = self["green"] = StaticText(_("OK"))

		for count in range(8):
			if count < tempcount:
				id = templist[count]
				if getBrandOEM() not in ('dags', 'vuplus'):
					self["SensorTempText%d" % count] = StaticText(sensors.getSensorName(id))
					self["SensorTemp%d" % count] = SensorSource(sensorid = id)
				elif getBrandOEM() in ('dags', 'vuplus') and id < 1:
					self["SensorTempText%d" % count] = StaticText(sensors.getSensorName(id))
					self["SensorTemp%d" % count] = SensorSource(sensorid = id)
				else:
					self["SensorTempText%d" % count] = StaticText("")
					self["SensorTemp%d" % count] = SensorSource()
			else:
				self["SensorTempText%d" % count] = StaticText("")
				self["SensorTemp%d" % count] = SensorSource()

			if count < fancount:
				id = fanlist[count]
				self["SensorFanText%d" % count] = StaticText(sensors.getSensorName(id))
				self["SensorFan%d" % count] = SensorSource(sensorid = id)
			else:
				self["SensorFanText%d" % count] = StaticText("")
				self["SensorFan%d" % count] = SensorSource()

		self.list = []
		for count in range(fancontrol.getFanCount()):
			if getBrandOEM() not in ('dags', 'vuplus'):
				self.list.append(getConfigListEntry(_("Fan %d voltage") % (count + 1), fancontrol.getConfig(count).vlt))
			self.list.append(getConfigListEntry(_("Fan %d PWM") % (count + 1), fancontrol.getConfig(count).pwm))
			if getBrandOEM() not in ('dags', 'vuplus'):
				self.list.append(getConfigListEntry(_("Standby fan %d voltage") % (count + 1), fancontrol.getConfig(count).vlt_standby))
			self.list.append(getConfigListEntry(_("Standby fan %d PWM") % (count + 1), fancontrol.getConfig(count).pwm_standby))

		ConfigListScreen.__init__(self, self.list, session = self.session)
		#self["config"].list = self.list
		#self["config"].setList(self.list)
		self["config"].l.setSeperation(300)

		self["actions"] = ActionMap(["OkCancelActions", "ColorActions", "MenuActions"],
		{
			"ok": self.save,
			"cancel": self.revert,
			"red": self.revert,
			"green": self.save,
			"menu": self.closeRecursive,
		}, -1)
示例#8
0
	def revert(self):
		for count in range(fancontrol.getFanCount()):
			if getBrandOEM() not in ('dags', 'vuplus'):
				fancontrol.getConfig(count).vlt.load()
			fancontrol.getConfig(count).pwm.load()
			if getBrandOEM() not in ('dags', 'vuplus'):
				fancontrol.getConfig(count).vlt_standby.load()
			fancontrol.getConfig(count).pwm_standby.load()
		self.close()
示例#9
0
 def save(self):
     for count in range(fancontrol.getFanCount()):
         if getBrandOEM() not in ("dags", "vuplus"):
             fancontrol.getConfig(count).vlt.save()
         fancontrol.getConfig(count).pwm.save()
         if getBrandOEM() not in ("dags", "vuplus"):
             fancontrol.getConfig(count).vlt_standby.save()
         fancontrol.getConfig(count).pwm_standby.save()
     self.close()
示例#10
0
	def revert(self):
		for count in range(fancontrol.getFanCount()):
			if not getBoxType().startswith('tm') or not getBoxType().startswith('vu'):
				fancontrol.getConfig(count).vlt.load()
			fancontrol.getConfig(count).pwm.load()
			if not getBoxType().startswith('tm') or not getBoxType().startswith('vu'):
				fancontrol.getConfig(count).vlt_standby.load()
			fancontrol.getConfig(count).pwm_standby.load()
		self.close()
示例#11
0
	def createSetup(self):
		self.list = []
		for count in range(fancontrol.getFanCount()):
			self.list.append(getConfigListEntry(_("Fan %d Voltage") % (count + 1), fancontrol.getConfig(count).vlt))
			self.list.append(getConfigListEntry(_("Fan %d PWM") % (count + 1), fancontrol.getConfig(count).pwm))
			self.list.append(getConfigListEntry(_("Standby Fan %d Voltage") % (count + 1), fancontrol.getConfig(count).vlt_standby))
			self.list.append(getConfigListEntry(_("Standby Fan %d PWM") % (count + 1), fancontrol.getConfig(count).pwm_standby))
			self["config"].list = self.list
			self["config"].l.setList(self.list)
示例#12
0
 def revert(self):
     for count in range(fancontrol.getFanCount()):
         if getBrandOEM() not in ('dags', 'vuplus'):
             fancontrol.getConfig(count).vlt.load()
         fancontrol.getConfig(count).pwm.load()
         if getBrandOEM() not in ('dags', 'vuplus'):
             fancontrol.getConfig(count).vlt_standby.load()
         fancontrol.getConfig(count).pwm_standby.load()
     self.close()
示例#13
0
	def revert(self):
		for count in range(fancontrol.getFanCount()):
			stb = HardwareInfo().get_device_name()
			if stb not in ('optimussos1', 'optimussos2', 'solo2'):
				fancontrol.getConfig(count).vlt.load()
			fancontrol.getConfig(count).pwm.load()
			if stb not in ('optimussos1', 'optimussos2', 'solo2'):
				fancontrol.getConfig(count).vlt_standby.load()
			fancontrol.getConfig(count).pwm_standby.load()
		self.close()
示例#14
0
	def __init__(self, session, args = None):
		Screen.__init__(self, session)

		self.setTitle(_("Temperature and fan control"))

		templist = sensors.getSensorsList(sensors.TYPE_TEMPERATURE)
		tempcount = len(templist)
		fanlist = sensors.getSensorsList(sensors.TYPE_FAN_RPM)
		fancount = len(fanlist)

		self["red"] = StaticText(_("Cancel"))
		self["green"] = StaticText(_("OK"))
		self["yellow"] = StaticText("")
		self["blue"] = StaticText("")

		for count in range(8):
			if count < tempcount:
				id = templist[count]
				self["SensorTempText%d" % count] = StaticText(sensors.getSensorName(id))
				self["SensorTemp%d" % count] = SensorSource(sensorid = id)
			else:
				self["SensorTempText%d" % count] = StaticText("")
				self["SensorTemp%d" % count] = SensorSource()

			if count < fancount:
				id = fanlist[count]
				self["SensorFanText%d" % count] = StaticText(sensors.getSensorName(id))
				self["SensorFan%d" % count] = SensorSource(sensorid = id)
			else:
				self["SensorFanText%d" % count] = StaticText("")
				self["SensorFan%d" % count] = SensorSource()

		self.list = []
		for count in range(fancontrol.getFanCount()):
			self.list.append(getConfigListEntry(_("Fan %d voltage") % (count + 1), fancontrol.getConfig(count).vlt))
			self.list.append(getConfigListEntry(_("Fan %d PWM") % (count + 1), fancontrol.getConfig(count).pwm))
			self.list.append(getConfigListEntry(_("Standby fan %d voltage") % (count + 1), fancontrol.getConfig(count).vlt_standby))
			self.list.append(getConfigListEntry(_("Standby fan %d PWM") % (count + 1), fancontrol.getConfig(count).pwm_standby))

		ConfigListScreen.__init__(self, self.list, session = self.session)
		#self["config"].list = self.list
		#self["config"].setList(self.list)
		self["config"].l.setSeperation(300)
		seperation = skin.parameters.get("ConfigListSeperator", 300)
		self["config"].l.setSeperation(seperation)

		self["actions"] = ActionMap(["OkCancelActions", "ColorActions", "MenuActions"],
		{
			"ok": self.save,
			"cancel": self.revert,
			"red": self.revert,
			"green": self.save,
			"menu": self.closeRecursive,
		}, -1)
示例#15
0
	def addSensors(self):
		import os
		if os.path.exists("/proc/stb/sensors"):
			for dirname in os.listdir("/proc/stb/sensors"):
				if dirname.find("temp", 0, 4) == 0:
					name = open("/proc/stb/sensors/%s/name" % dirname, "r").readline().strip()
					unit = open("/proc/stb/sensors/%s/unit" % dirname, "r").readline().strip()
					self.sensors_list.append((self.TYPE_TEMPERATURE, name, unit, "/proc/stb/sensors/%s" % dirname))
		for fanid in range(fancontrol.getFanCount()):
			if fancontrol.hasRPMSensor(fanid):
				self.sensors_list.append((self.TYPE_FAN_RPM, _("Fan %d") % (fanid + 1), "rpm", fanid))
示例#16
0
 def revert(self):
     for count in range(fancontrol.getFanCount()):
         if not getBoxType().startswith(
                 'tm') or not getBoxType().startswith('vu'):
             fancontrol.getConfig(count).vlt.load()
         fancontrol.getConfig(count).pwm.load()
         if not getBoxType().startswith(
                 'tm') or not getBoxType().startswith('vu'):
             fancontrol.getConfig(count).vlt_standby.load()
         fancontrol.getConfig(count).pwm_standby.load()
     self.close()
示例#17
0
    def addSensors(self):
        import os
        if os.path.exists('/proc/stb/sensors'):
            for dirname in os.listdir('/proc/stb/sensors'):
                if dirname.find('temp', 0, 4) == 0:
                    name = open('/proc/stb/sensors/%s/name' % dirname, 'r').readline().strip()
                    unit = open('/proc/stb/sensors/%s/unit' % dirname, 'r').readline().strip()
                    self.sensors_list.append((self.TYPE_TEMPERATURE, name, unit, '/proc/stb/sensors/%s' % dirname))

        for fanid in range(fancontrol.getFanCount()):
            if fancontrol.hasRPMSensor(fanid):
                self.sensors_list.append((self.TYPE_FAN_RPM, _('Fan %d') % (fanid + 1), 'rpm', fanid))
示例#18
0
    def addSensors(self):
        import os
        if os.path.exists('/proc/stb/sensors'):
            for dirname in os.listdir('/proc/stb/sensors'):
                if dirname.find('temp', 0, 4) == 0:
                    name = open('/proc/stb/sensors/%s/name' % dirname, 'r').readline().strip()
                    unit = open('/proc/stb/sensors/%s/unit' % dirname, 'r').readline().strip()
                    self.sensors_list.append((self.TYPE_TEMPERATURE,
                     name,
                     unit,
                     '/proc/stb/sensors/%s' % dirname))

        for fanid in range(fancontrol.getFanCount()):
            if fancontrol.hasRPMSensor(fanid):
                self.sensors_list.append((self.TYPE_FAN_RPM,
                 _('Fan %d') % (fanid + 1),
                 'rpm',
                 fanid))