From 51580945499a95da8755d47522232f1ad1c11b8a Mon Sep 17 00:00:00 2001 From: Kyle Brown Date: Tue, 9 Apr 2019 16:47:20 -0700 Subject: [PATCH] Small changes --- docs/rgb.md | 2 +- kmk/rgb.py | 5 +++++ user_keymaps/kdb424/levinson_r2.py | 11 ++--------- user_keymaps/kdb424/luddite.py | 4 ++-- 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/docs/rgb.md b/docs/rgb.md index 2705973..c595f89 100644 --- a/docs/rgb.md +++ b/docs/rgb.md @@ -126,7 +126,7 @@ def light_show(self): keyboard.rgb_config['user_animation'] = light_show # Makes a key that would start your animation -LS = make_key(on_press=start_light_show()) +LS = make_key(on_press=start_light_show) keymap = [...LS,...] ``` diff --git a/kmk/rgb.py b/kmk/rgb.py index 8916b97..ca80b50 100644 --- a/kmk/rgb.py +++ b/kmk/rgb.py @@ -399,6 +399,11 @@ class RGB: return False def _init_effect(self): + if self.animation_mode == 'breathing' or self.animation_mode == 'breathing_rainbow': + self.intervals = (30, 20, 10, 5) + elif self.animation_mode == 'swirl': + self.intervals = (50, 50) + self.pos = 0 self.reverse_animation = False self.effect_init = False diff --git a/user_keymaps/kdb424/levinson_r2.py b/user_keymaps/kdb424/levinson_r2.py index 5313e6c..98e8e40 100644 --- a/user_keymaps/kdb424/levinson_r2.py +++ b/user_keymaps/kdb424/levinson_r2.py @@ -1,18 +1,11 @@ -import board -import busio +from kmk.boards.converter.keebio.levinson_r2 import Firmware -from kmk.consts import DiodeOrientation, LeaderMode, UnicodeMode +from kmk.consts import LeaderMode, UnicodeMode from kmk.handlers.sequences import compile_unicode_string_sequences from kmk.keys import KC -from kmk.mcus.circuitpython_samd51 import Firmware -from kmk.pins import Pin as P keyboard = Firmware() -keyboard.col_pins = (P.A2, P.A3, P.A4, P.A5, P.SCK, P.MOSI) -keyboard.row_pins = (P.D13, P.D11, P.D10, P.D9) -keyboard.diode_orientation = DiodeOrientation.COLUMNS - # ------------------User level config variables --------------------------------------- keyboard.leader_mode = LeaderMode.TIMEOUT keyboard.unicode_mode = UnicodeMode.LINUX diff --git a/user_keymaps/kdb424/luddite.py b/user_keymaps/kdb424/luddite.py index 65cec58..9265512 100644 --- a/user_keymaps/kdb424/luddite.py +++ b/user_keymaps/kdb424/luddite.py @@ -23,7 +23,7 @@ keyboard.rgb_config['val_default'] = 20 keyboard.rgb_config['knight_effect_length'] = 6 keyboard.rgb_config['animation_mode'] = 'static' keyboard.rgb_config['animation_speed'] = 2 -keyboard.debug_enabled = True +keyboard.debug_enabled = False # ---------------------- Custom Functions -------------------------------------------- @@ -55,7 +55,7 @@ def light_show(self): keyboard.rgb_config['user_animation'] = light_show -LS = make_key(on_press=start_light_show()) +LS = make_key(on_press=start_light_show) # ---------------------- Custom Keys --------------------------------------------