Compare commits
No commits in common. "6db1568718acc617bc14dd9914c2e56e39cb46a5" and "830cee6d72c3d0a572664b4135807798c6f1d44d" have entirely different histories.
6db1568718
...
830cee6d72
@ -15,9 +15,9 @@ if __name__ == "__main__":
|
|||||||
# Right LED Matrix location: "1-3.3"
|
# Right LED Matrix location: "1-3.3"
|
||||||
|
|
||||||
# Set up monitors and serial for left LED Matrix
|
# Set up monitors and serial for left LED Matrix
|
||||||
min_background_brightness = 12
|
min_background_brightness = 8
|
||||||
max_background_brightness = 35
|
max_background_brightness = 35
|
||||||
min_foreground_brightness = 24
|
min_foreground_brightness = 30
|
||||||
max_foreground_brightness = 160
|
max_foreground_brightness = 160
|
||||||
|
|
||||||
cpu_monitor = CPUMonitor()
|
cpu_monitor = CPUMonitor()
|
||||||
|
@ -129,12 +129,6 @@ def get_monitor_brightness():
|
|||||||
if os.name == 'nt':
|
if os.name == 'nt':
|
||||||
return wmi.WMI(namespace='wmi').WmiMonitorBrightness()[0].CurrentBrightness / 100.0
|
return wmi.WMI(namespace='wmi').WmiMonitorBrightness()[0].CurrentBrightness / 100.0
|
||||||
else:
|
else:
|
||||||
try: # First try the dGPU brightness
|
return int(open('/sys/class/backlight/amdgpu_bl1/brightness', 'r').read()) / 255.0
|
||||||
return int(open('/sys/class/backlight/amdgpu_bl2/brightness', 'r').read()) / 255.0
|
|
||||||
except: # If that doesn't work, try the iGPU brightness
|
|
||||||
return int(open('/sys/class/backlight/amdgpu_bl1/brightness', 'r').read()) / 255.0
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
return 1.0
|
return 1.0
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
print(get_monitor_brightness())
|
|
Loading…
Reference in New Issue
Block a user