Comments (4)
It seems to be an issue with MonomeGridEvent inheriting from MonomeEvent (which only expects 1 constructor parameter). As soon as I remove the inheritance of MonomeEvent, it works.
from libmonome.
The following patch works for me:
diff --git a/bindings/python/monome.pyx b/bindings/python/monome.pyx
index af750ec..bdee2e4 100644
--- a/bindings/python/monome.pyx
+++ b/bindings/python/monome.pyx
@@ -115,6 +115,8 @@ all = [
"Monome"]
+BUTTON_UP, BUTTON_DOWN, ENCODER_DELTA, ENCODER_KEY_UP, ENCODER_KEY_DOWN, TILT = range(6)
+CABLE_LEFT, CABLE_BOTTOM, CABLE_RIGHT, CABLE_TOP = range(4)
MODE_NORMAL = 0
MODE_TEST = 1
@@ -155,15 +157,12 @@ def _bitmap_data(data):
cdef class MonomeEvent(object):
cdef object monome
- def __cinit__(self, object monome):
- self.monome = monome
-
cdef class MonomeGridEvent(MonomeEvent):
cdef uint x, y
cdef bool pressed
def __cinit__(self, pressed, uint x, uint y, object monome):
- MonomeEvent.__cinit__(monome)
+ self.monome = monome
self.pressed = bool(pressed)
self.x = x
self.y = y
from libmonome.
yeah i'm cool with this. it would be nice to handle all common stuff in MonomeEvent but Cython sometimes doesn't want to play nice.
could you submit this as a pull request?
from libmonome.
Cool. I submitted a pull request...
best regards
Alex
from libmonome.
Related Issues (20)
- Can we get a tag for v1.1 HOT 1
- Build instructions HOT 1
- Broken with liblo 0.27
- Can't get examples to work HOT 2
- Can't build with clang HOT 6
- liblo not found on OS X 10.9 HOT 8
- Checking for liblo fails HOT 6
- Homepage is not reachable HOT 1
- Compilation fails when building without udev HOT 5
- Add option to not run ldconfig (or don't run it at all?) HOT 1
- Python binding no longer gets built/fails building HOT 6
- Add pkg-config file to make it easier for other projects to use libmonome?
- macOS Mojave build failure, due to -mmacosx-version-min=10.5
- Drop Python bindings? HOT 10
- Build fails with Python > 3.6 because of old waf version HOT 3
- [Question] Difference between LED intensity and LED level all HOT 2
- OpenBSD support HOT 2
- liblo not found: macOS12.6 + M1
- `monome_event_next` sometimes produces odd results HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libmonome.