Skip to content

Commit

Permalink
Adding support for fade profile brightness
Browse files Browse the repository at this point in the history
- Adjust brightness using one of 4 of the fade profiles
- Updating to v0.5.7.7
  • Loading branch information
haata committed Feb 22, 2019
1 parent 7fb0154 commit f30a387
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion kll/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

## Variables

__version__ = '0.5.7.6'
__version__ = '0.5.7.7'
kll_name = 'kll'


Expand Down
12 changes: 12 additions & 0 deletions kll/emitters/kiibohd/kiibohd.py
Original file line number Diff line number Diff line change
Expand Up @@ -1372,6 +1372,18 @@ def get_context_name(context_type, contexts=None):
)
self.fill_dict['PixelFadeConfig'] += "};\n"

# Add profile brightnesses
self.fill_dict['PixelFadeConfig'] += "const uint8_t Pixel_LED_FadeBrightness[4] = {\n"
if 'KLL_LED_FadeBrightness' in variables.data.keys():
fadebrightnesssize = len(variables.data[defines.data['KLL_LED_FadeBrightness'].name].value)
for index in range(fadebrightnesssize):
# Construct array
self.fill_dict['PixelFadeConfig'] += "\t{}, // {}\n".format(
variables.data[defines.data['KLL_LED_FadeBrightness'].name].value[index],
index,
)
self.fill_dict['PixelFadeConfig'] += "};\n"

def fade_default_config(name):
fadeconfigsize = len(variables.data[defines.data[name].name].value)
self.fill_dict['PixelFadeConfig'] += "\t{ "
Expand Down

0 comments on commit f30a387

Please sign in to comment.