Small changes
This commit is contained in:
parent
3f8c6e7648
commit
5158094549
@ -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,...]
|
||||
```
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 --------------------------------------------
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user