Mercurial > maestro-servo
changeset 12:885ca625da11
Add a bounds check for position
| author | Radomir Dopieralski <sheep-devel@sheep.art.pl> |
|---|---|
| date | Mon, 23 Jun 2014 20:17:44 +0200 |
| parents | d5a830b67bf9 |
| children | 8f15aa3cfa18 |
| files | maestro.py |
| diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/maestro.py Mon Jun 23 20:08:13 2014 +0200 +++ b/maestro.py Mon Jun 23 20:17:44 2014 +0200 @@ -98,6 +98,7 @@ position = -position center = self.max_position + width / 2 target = center + position + target = min(self.max_position, max(self.min_position, target)) self.maestro.set_target(self.index, target) @property
