Integra calibrazione RGB nel plasmoide e ripristina backend funzionante

This commit is contained in:
enne2
2026-11-01 15:43:28 +01:00
parent 72c7141ecd
commit 344e3c8764
9 changed files with 250 additions and 260 deletions
+4 -8
View File
@@ -66,19 +66,15 @@ def main(argv):
key, raw = argv[2], argv[3]
if key in ("reverse",):
value = raw.lower() in ("1", "true", "yes", "on")
vtype = "b"
elif key in ("leds", "baud"):
elif key == "leds":
value = int(raw)
vtype = "i"
elif key in ("port", "side", "capture", "drm_device"):
value = str(raw)
vtype = "s"
else:
value = float(raw)
vtype = "d"
try:
from gi.repository import GLib
res = call("SetParam", GLib.Variant("(sv)", (key, GLib.Variant(vtype, value))))
res = call("SetParam", GLib.Variant("(sv)", (key, GLib.Variant(
"b" if isinstance(value, bool) else "d" if isinstance(value, float) else "i",
value))))
err = res.unpack()[0]
if err:
print(json.dumps({"ok": False, "error": err}))