Skip to content

Commit 24f2e95

Browse files
committed
Add info for Mac OS X (M1) instalation, close #10, upgrade version
1 parent be1eb2f commit 24f2e95

File tree

3 files changed

+31
-9
lines changed

3 files changed

+31
-9
lines changed

README.md

+15-4
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,28 @@ pip install pyspacemouse
6666
the [hidapi releases](https://github.com/libusb/hidapi/releases) page.
6767
- Set system environment: add absolute path for `x64` or `x86` folder in Path.
6868

69-
- ### Mac OS X
69+
- ### Mac OS X (M1)
7070
- Install from [Homebrew](https://formulae.brew.sh/formula/hidapi)
7171
- `brew install hidapi`
72+
- Add hidapi to your `DYLD_LIBRARY_PATH` directory.
73+
```bash
74+
export DYLD_LIBRARY_PATH=/opt/homebrew/Cellar/hidapi/0.14.0/lib:$DYLD_LIBRARY_PATH
75+
```
76+
- On MacOS M1 you will need patched version of easyhid
77+
```bash
78+
pip install git+https://github.com/bglopez/python-easyhid.git
79+
```
80+
- In case of problem with M1 chip, try to run you code with Rosseta 2
81+
- How to use Rosseta 2 - [Setup Rosetta](https://apple.stackexchange.com/questions/428768/on-apple-m1-with-rosetta-how-to-open-entire-terminal-iterm-in-x86-64-architec)
82+
- Tested and developed by [consi](https://github.com/JakubAndrysek/PySpaceMouse/issues/10#issuecomment-1768362007) - thanks!
7283

7384
- [easyhid](https://github.com/bglopez/python-easyhid) is `hidapi` interface for Python - required on all platforms
7485
- `pip install git+https://github.com/bglopez/python-easyhid.git`
7586
- this fork fix problems with `hidapi` on MacOS.
7687
- on other platforms it possible works with original package `pip install easyhid`
7788

7889
## Basic Usage:
79-
[basicExample.py](examples/basicExample.py)
90+
[basicExample.py](https://github.com/JakubAndrysek/PySpaceMouse/blob/master/examples/basicExample.py)
8091
````py
8192
import pyspacemouse
8293
import time
@@ -91,15 +102,15 @@ if success:
91102

92103
## State objects
93104

94-
State objects returned from read() have 7 attributes: [t,x,y,z,roll,pitch,yaw,button].
105+
State objects returned from `read()` have 7 attributes: [t,x,y,z,roll,pitch,yaw,button].
95106
96107
* t: timestamp in seconds since the script started.
97108
* x,y,z: translations in the range [-1.0, 1.0]
98109
* roll, pitch, yaw: rotations in the range [-1.0, 1.0].
99110
* button: list of button states (0 or 1), in order specified in the device specifier
100111
101112
## Usage with callback
102-
[callbackExample.py](examples/callbackExample.py)
113+
[callbackExample.py](https://github.com/JakubAndrysek/PySpaceMouse/blob/master/examples/callbackExample.py)
103114
````py
104115
import pyspacemouse
105116
import time

docs/README.md

+15-4
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,28 @@ pip install pyspacemouse
6666
the [hidapi releases](https://github.com/libusb/hidapi/releases) page.
6767
- Set system environment: add absolute path for `x64` or `x86` folder in Path.
6868

69-
- ### Mac OS X
69+
- ### Mac OS X (M1)
7070
- Install from [Homebrew](https://formulae.brew.sh/formula/hidapi)
7171
- `brew install hidapi`
72+
- Add hidapi to your `DYLD_LIBRARY_PATH` directory.
73+
```bash
74+
export DYLD_LIBRARY_PATH=/opt/homebrew/Cellar/hidapi/0.14.0/lib:$DYLD_LIBRARY_PATH
75+
```
76+
- On MacOS M1 you will need patched version of easyhid
77+
```bash
78+
pip install git+https://github.com/bglopez/python-easyhid.git
79+
```
80+
- In case of problem with M1 chip, try to run you code with Rosseta 2
81+
- How to use Rosseta 2 - [Setup Rosetta](https://apple.stackexchange.com/questions/428768/on-apple-m1-with-rosetta-how-to-open-entire-terminal-iterm-in-x86-64-architec)
82+
- Tested and developed by [consi](https://github.com/JakubAndrysek/PySpaceMouse/issues/10#issuecomment-1768362007) - thanks!
7283

7384
- [easyhid](https://github.com/bglopez/python-easyhid) is `hidapi` interface for Python - required on all platforms
7485
- `pip install git+https://github.com/bglopez/python-easyhid.git`
7586
- this fork fix problems with `hidapi` on MacOS.
7687
- on other platforms it possible works with original package `pip install easyhid`
7788

7889
## Basic Usage:
79-
[basicExample.py](examples/basicExample.py)
90+
[basicExample.py](https://github.com/JakubAndrysek/PySpaceMouse/blob/master/examples/basicExample.py)
8091
````py
8192
import pyspacemouse
8293
import time
@@ -91,15 +102,15 @@ if success:
91102

92103
## State objects
93104

94-
State objects returned from read() have 7 attributes: [t,x,y,z,roll,pitch,yaw,button].
105+
State objects returned from `read()` have 7 attributes: [t,x,y,z,roll,pitch,yaw,button].
95106
96107
* t: timestamp in seconds since the script started.
97108
* x,y,z: translations in the range [-1.0, 1.0]
98109
* roll, pitch, yaw: rotations in the range [-1.0, 1.0].
99110
* button: list of button states (0 or 1), in order specified in the device specifier
100111
101112
## Usage with callback
102-
[callbackExample.py](examples/callbackExample.py)
113+
[callbackExample.py](https://github.com/JakubAndrysek/PySpaceMouse/blob/master/examples/callbackExample.py)
103114
````py
104115
import pyspacemouse
105116
import time

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
setuptools.setup(
1313
name='pyspacemouse',
14-
version='1.0.9',
14+
version='1.1.0',
1515
author='Jakub Andrýsek',
1616
author_email='email@kubaandrysek.cz',
1717
description='Multiplatform Python interface to the 3DConnexion Space Mouse - forked from pyspacenavigator',

0 commit comments

Comments
 (0)