Skip to content

Commit

Permalink
[hd51] add new control led option
Browse files Browse the repository at this point in the history
  • Loading branch information
captain committed Apr 5, 2020
1 parent e434180 commit 379e3d6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions data/setup.xml
Expand Up @@ -314,6 +314,7 @@
<item level="0" text="LED Standby" description="LED brightness during standby.">config.lcd.ledbrightnessstandby</item>
<item level="0" text="LED Deep Standby" description="LED brightness during deep standby.">config.lcd.ledbrightnessdeepstandby</item>
<item level="0" requires="PowerLed" text="Turn on the power LED." description="Power LED can be turned on or off here.">config.usage.lcd_powerled</item>
<item level="0" requires="PowerLed2" text="Turn on the control LED." description="Control LED can be turned on or off here.">config.usage.lcd_powerled2</item>
<item level="0" requires="StandbyPowerLed" text="Power LED State in Standby" description="Power LED state during standby.">config.usage.lcd_standbypowerled</item>
<item level="0" requires="SuspendPowerLed" text="Power LED State in Deep-Standby" description="Power LED state during deep-standby.">config.usage.lcd_deepstandbypowerled</item>
<item level="0" requires="LedPowerColor" text="Operating LED status while running" description="With this option you can switch the LED color or deactivate the LED.">config.usage.lcd_ledpowercolor</item>
Expand Down
9 changes: 9 additions & 0 deletions lib/python/Components/Lcd.py
Expand Up @@ -437,6 +437,12 @@ def setPowerLEDstate(configElement):
f.write(configElement.value)
f.close()

def setPowerLEDstate2(configElement):
if fileExists("/proc/stb/power/powerled2"):
f = open("/proc/stb/power/powerled2", "w")
f.write(configElement.value)
f.close()

def setPowerLEDstanbystate(configElement):
if fileExists("/proc/stb/power/standbyled"):
f = open("/proc/stb/power/standbyled", "w")
Expand Down Expand Up @@ -509,6 +515,9 @@ def setXcoreVFD(configElement):
config.usage.lcd_powerled = ConfigSelection(default = "on", choices = [("off", _("Off")), ("on", _("On"))])
config.usage.lcd_powerled.addNotifier(setPowerLEDstate)

config.usage.lcd_powerled2 = ConfigSelection(default = "on", choices = [("off", _("Off")), ("on", _("On"))])
config.usage.lcd_powerled2.addNotifier(setPowerLEDstate2)

config.usage.lcd_standbypowerled = ConfigSelection(default = "on", choices = [("off", _("Off")), ("on", _("On"))])
config.usage.lcd_standbypowerled.addNotifier(setPowerLEDstanbystate)

Expand Down
1 change: 1 addition & 0 deletions lib/python/Components/SystemInfo.py
Expand Up @@ -56,6 +56,7 @@ def haveInitCam():
SystemInfo["Fan"] = fileCheck("/proc/stb/fp/fan")
SystemInfo["FanPWM"] = SystemInfo["Fan"] and fileCheck("/proc/stb/fp/fan_pwm")
SystemInfo["PowerLed"] = fileExists("/proc/stb/power/powerled")
SystemInfo["PowerLed2"] = fileExists("/proc/stb/power/powerled2")
SystemInfo["StandbyPowerLed"] = fileExists("/proc/stb/power/standbyled")
SystemInfo["SuspendPowerLed"] = fileExists("/proc/stb/power/suspendled")
SystemInfo["LedPowerColor"] = fileExists("/proc/stb/fp/ledpowercolor")
Expand Down

0 comments on commit 379e3d6

Please sign in to comment.