Skip to content

Commit

Permalink
update examples and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
thewh1teagle committed Dec 4, 2023
1 parent aa27d98 commit 62559ab
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Note: You should connect the data usb port (left one) to the raspberry, and NOT
from zero_hid import Mouse
m = Mouse()
for i in range(5):
m.move_relative(10, 10)
m.move(10, 10)
```
- Control keyboard
```python
Expand Down
5 changes: 5 additions & 0 deletions examples/absolute_mouse.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from zero_hid import Mouse

m = Mouse(absolute=True)
m.move(50,50)
m.close()
4 changes: 1 addition & 3 deletions examples/mouse_example.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
from zero_hid import Mouse



m = Mouse()
for i in range(5):
m.move_relative(5,5)
m.move(5,5)
m.close()
2 changes: 1 addition & 1 deletion tests/mouse_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def test_left_click():
def test_move():
with open(random_file(), 'ab+') as f:
m = Mouse(f)
m.move_relative(100, 100)
m.move(100, 100)
f.seek(0)
data = f.read()
f.close()
Expand Down

0 comments on commit 62559ab

Please sign in to comment.