aboutsummaryrefslogtreecommitdiffstats
path: root/abcontroller.py
diff options
context:
space:
mode:
authorEddy Pedroni <eddy@0xf7.com>2022-01-01 10:18:37 +0100
committerEddy Pedroni <eddy@0xf7.com>2022-01-01 10:18:37 +0100
commit71f6a49110b6696ca6ac7956baa4edaa1aaa9527 (patch)
treee16178d2db8c6a8b7459801aab34d46255d4e8f6 /abcontroller.py
parent9090422b2ba5eab9e4131f9b9281ed83128d977c (diff)
Added partial Launchpad support, refactored existing files
Diffstat (limited to 'abcontroller.py')
-rw-r--r--abcontroller.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/abcontroller.py b/abcontroller.py
index 0a10078..c04b8db 100644
--- a/abcontroller.py
+++ b/abcontroller.py
@@ -42,16 +42,17 @@ class ABController:
self._currentLimits = _AB(aLimit, bLimit)
def positionChanged(self, position):
- if not self._currentLimits:
- return
if position > self._currentLimits.b and self._setPositionCallback and self._enabled:
self._setPositionCallback(self._currentLimits.a)
def setEnable(self, enable):
self._enabled = enable
- def getLimits(self, song):
+ def getStoredLimits(self, song):
return self._limits.get(song)
+ def getCurrentLimits(self):
+ return self._currentLimits
+
def clear(self):
self.__init__(enabled=self._enabled, callback=self._setPositionCallback)