Mercurial > maestro-servo
changeset 13:8f15aa3cfa18
Properly compute center
| author | Radomir Dopieralski <sheep-devel@sheep.art.pl> |
|---|---|
| date | Mon, 23 Jun 2014 20:19:56 +0200 |
| parents | 885ca625da11 |
| children | 01e5a1efec52 |
| files | maestro.py |
| diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/maestro.py Mon Jun 23 20:17:44 2014 +0200 +++ b/maestro.py Mon Jun 23 20:19:56 2014 +0200 @@ -96,7 +96,7 @@ position = (width * degrees) / self.max_degrees if self.reverse: position = -position - center = self.max_position + width / 2 + center = self.min_position + width / 2 target = center + position target = min(self.max_position, max(self.min_position, target)) self.maestro.set_target(self.index, target)
