final commit before rebase

This commit is contained in:
Kyle Brown
2019-06-21 16:31:20 -07:00
parent 5158094549
commit 39b0b1e7f2
4 changed files with 22 additions and 81 deletions

View File

@@ -294,8 +294,7 @@ class Firmware:
if self.pixels:
# Only check animations if pixels is initialized
if self.pixels.animation_mode:
if self.pixels.animation_mode:
self.pixels = self.pixels.animate()
self.pixels = self.pixels.animate()
if self.led:
# Only check animations if led is initialized

View File

@@ -67,9 +67,10 @@ class RGB:
self.breathe_center = const(config['breathe_center'])
self.knight_effect_length = const(config['knight_effect_length'])
self.val_limit = const(config['val_limit'])
self.rgb_animation_mode = const(config['animation_mode'])
self.animation_mode = config['animation_mode']
self.animation_speed = const(config['animation_speed'])
if config['user_animation']:
if 'user_animation' in config:
print(config['user_animation'])
self.user_animation = config['user_animation']
except ImportError as e:
@@ -282,14 +283,11 @@ class RGB:
return self
def increase_val(self, step=None):
def increase_val(self, step=0):
"""
Increases value by step amount stopping at 100
:param step:
"""
if not step:
step = self.val_step
if (self.val + step) >= 100:
self.val = 100
else:
@@ -300,14 +298,11 @@ class RGB:
return self
def decrease_val(self, step=None):
def decrease_val(self, step=0):
"""
Decreases value by step amount stopping at 0
:param step:
"""
if not step:
step = self.val_step
if (self.val - step) <= 0:
self.val = 0
else: