Browse Source

Ignore OpenRGB errors

master
Davide Depau 5 months ago
parent
commit
2374eab240
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      stats-sender/stats_sender.py

+ 4
- 0
stats-sender/stats_sender.py View File

@ -6,6 +6,7 @@ import struct
import sys
import threading
import time
import traceback
import psutil
import sensors
@ -174,11 +175,14 @@ def read_serial(s: serial.Serial):
def set_fridge_lights(on: bool):
client = None
# noinspection PyBroadException
try:
client = OpenRGBClient()
motherboard = client.get_devices_by_type(DeviceType.MOTHERBOARD)[0]
onboard_led_0 = filter(lambda x: x.name == "Onboard LED 0", motherboard.zones).__next__()
onboard_led_0.set_color(RGBColor(0x00, 0xFF if on else 0x00, 0x00))
except Exception:
traceback.print_exc()
finally:
if client is not None:
client.disconnect()


Loading…
Cancel
Save