Skip to content

Commit 5eeb855

Browse files
committed
declare hopper dependency, add pyproject.toml file, fix cytron issue
1 parent f73abd7 commit 5eeb855

3 files changed

Lines changed: 22 additions & 4 deletions

File tree

pyproject.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[project]
2+
name = "robot"
3+
version = "2024.1"
4+
readme = "README.md"
5+
requires-python = ">=3.6"
6+
dependencies = [
7+
"smbus2>=0.4.2",
8+
"opencv-python-headless~=3.4.0",
9+
"scipy>=1.9.1",
10+
"numpy<2.0.0",
11+
"hopper @ git+https://github.com/systemetric/hopper.git",
12+
]
13+
14+
[dependency-groups]
15+
dev = [
16+
"fake-rpi>=0.7.1",
17+
]

robot/cytron.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ def __init__(self, max_motor_voltage):
3232
max_motor_voltage / _MAX_OUTPUT_VOLTAGE) ** 2
3333

3434
self._dir = [
35-
(GPIO.LOW, _DIR_PIN_1),
36-
(GPIO.LOW, _DIR_PIN_2),
35+
[GPIO.LOW, _DIR_PIN_1],
36+
[GPIO.LOW, _DIR_PIN_2],
3737
]
3838
self._pwm = [
39-
(0, GPIO.PWM(_PWM_PIN_1, 100)),
40-
(0, GPIO.PWM(_PWM_PIN_2, 100)),
39+
[0, GPIO.PWM(_PWM_PIN_1, 100)],
40+
[0, GPIO.PWM(_PWM_PIN_2, 100)],
4141
]
4242

4343
GPIO.setmode(GPIO.BCM)

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"opencv-python-headless~=3.4.0",
1212
"scipy>=1.9.1",
1313
"numpy<2.0.0",
14+
"hopper @ git+https://github.com/systemetric/hopper.git",
1415
],
1516

1617
author="Skyler Grey",

0 commit comments

Comments
 (0)