MCPcopy Create free account
hub / github.com/KMKfw/kmk_firmware / decrease_val

Method decrease_val

kmk/extensions/rgb.py:334–345  ·  view source on GitHub ↗

Decreases value by step amount stopping at 0 :param step:

(self, step=None)

Source from the content-addressed store, hash-verified

332 self._do_update()
333
334 def decrease_val(self, step=None):
335 '''
336 Decreases value by step amount stopping at 0
337 :param step:
338 '''
339 if step is None:
340 step = self.val_step
341
342 self.val = clamp(self.val - step, 0, 255)
343
344 if self._check_update():
345 self._do_update()
346
347 def increase_ani(self):
348 '''

Callers 1

_rgb_vadMethod · 0.95

Calls 3

_check_updateMethod · 0.95
_do_updateMethod · 0.95
clampFunction · 0.90

Tested by

no test coverage detected