keyboard_comm: wrap reload_persistent_rgb and reload_rgb for dummy
parent
f1f61799ce
commit
5d760330a6
|
|
@ -921,3 +921,37 @@ class DummyKeyboard(Keyboard):
|
|||
|
||||
def reload_via_protocol(self):
|
||||
pass
|
||||
|
||||
def reload_persistent_rgb(self):
|
||||
"""
|
||||
Reload RGB properties which are slow, and do not change while keyboard is plugged in
|
||||
e.g. VialRGB supported effects list
|
||||
"""
|
||||
|
||||
if "lighting" in self.definition:
|
||||
self.lighting_qmk_rgblight = self.definition["lighting"] in ["qmk_rgblight", "qmk_backlight_rgblight"]
|
||||
self.lighting_qmk_backlight = self.definition["lighting"] in ["qmk_backlight", "qmk_backlight_rgblight"]
|
||||
self.lighting_vialrgb = self.definition["lighting"] == "vialrgb"
|
||||
|
||||
if self.lighting_vialrgb:
|
||||
self.rgb_version = 1
|
||||
self.rgb_maximum_brightness = 128
|
||||
|
||||
self.rgb_supported_effects = {0, 1, 2, 3}
|
||||
|
||||
def reload_rgb(self):
|
||||
if self.lighting_qmk_rgblight:
|
||||
self.underglow_brightness = 128
|
||||
self.underglow_effect = 1
|
||||
self.underglow_effect_speed = 5
|
||||
# hue, sat
|
||||
self.underglow_color = (32, 64)
|
||||
|
||||
if self.lighting_qmk_backlight:
|
||||
self.backlight_brightness = 42
|
||||
self.backlight_effect = 0
|
||||
|
||||
if self.lighting_vialrgb:
|
||||
self.rgb_mode = 2
|
||||
self.rgb_speed = 90
|
||||
self.rgb_hsv = (16, 32, 64)
|
||||
|
|
|
|||
Loading…
Reference in New Issue