Skip to content
Snippets Groups Projects
Commit 98ba7a62 authored by raoul.dupuis's avatar raoul.dupuis
Browse files

update for python 3.10 or higher

parent eb8e80d7
Branches master
No related tags found
No related merge requests found
......@@ -20,6 +20,11 @@ Python 3.
$ sudo apt-get update
$ sudo apt-get install python-pyqt5
```
or, for python >= 3.10 :
```shell
$ python3 -m pip install PyQt5
$ python3 -m pip install PyQt5-tools
```
**N.B.** Python 3 is now the default interpreter in most recent Linux
distributions. Do not use Python 2! If unsure, check with:
```shell
......
......@@ -98,7 +98,7 @@ class BlindWidget(QWidget):
if end_value == self.ui.progressBar.value():
return
blind_move_speed_ratio = abs(self.ui.progressBar.value()-end_value)/BlindWidget.MAX_PROGRESS_BAR
self.animate_progress.setDuration(self.animation_speed*blind_move_speed_ratio)
self.animate_progress.setDuration(int(self.animation_speed*blind_move_speed_ratio))
self.animate_progress.setStartValue(self.ui.progressBar.value())
self.animate_progress.setEndValue(end_value)
self.is_moving = True
......
......@@ -85,4 +85,4 @@ class ValveWidget(QWidget):
angle = (ValveWidget.MAX_PROGRESS_BAR - self.position) * to_180_degree + 90
x = self.line_origin.x() + self.line_length * sin(radians(angle))
y = self.line_origin.y() + self.line_length * cos(radians(angle))
painter.drawLine(self.line_origin, QPoint(x, y))
painter.drawLine(self.line_origin, QPoint(int(x), int(y)))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment