From 71f6a49110b6696ca6ac7956baa4edaa1aaa9527 Mon Sep 17 00:00:00 2001 From: Eddy Pedroni Date: Sat, 1 Jan 2022 10:18:37 +0100 Subject: Added partial Launchpad support, refactored existing files --- abcontroller.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'abcontroller.py') 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) -- cgit v1.2.3