EV3-G API GyroSensor#387
Conversation
|
For issue #362 |
|
This isn't ready yet, when I run the following: We get a TimeoutError when trying to set the mode I haven't seen this issue on any other sensor....can someone with a gyro sensor try the patch in this PR and see if you get the same behavior? |
| return self.value(0) | ||
|
|
||
| @property | ||
| def direct(self): |
There was a problem hiding this comment.
Should probably be _direct. I don't expect that it would be used normally, if at all.
|
Check |
|
If I scroll back in dmesg a bit I see But when I unplug/plug the sensor I see and then run but I got no new output in dmesg when I ran gyro.py |
| attribute.write(value) | ||
| else: | ||
| attribute.write(value.encode()) | ||
|
|
There was a problem hiding this comment.
You could drop the raw parameter and just say
if isinstance(value, str):
value = value.encode()
attribute.write(value)|
I'm not seeing a TimeoutError on EV3. Are you still running on EVB? |
|
I'm seeing it on both. My EV3 is running |
|
@dlech can you try a few different gyros and see if you see this with any of them? I think mine is an older one, maybe that is a factor. |
|
What is mfg code stamped on the sensor? |
|
Sure enough. I just got the TimeoutError with an 19N3 sensor (mfg 19th week of 2013) |
|
Would you mind open an issue for this? It's definitely a kernel driver issue. The code hasn't changed in 3 years, so I'm kind of surprised that no one has noticed before. |
|
Mine is |
|
Opened ev3dev/ev3dev#975 |
|
Any objections to merging this PR? I'll test it more later once the kernel issue is fixed. |
No description provided.