-
-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] DCMotor does not function with CityHub in PortA after no device attached warning #500
Comments
Thank you for reporting this. I can reproduce this on my end as well. We will investigate. In the mean time, things should work if you plug in the motor before you turn the hub on. |
This happens on both ports. When we fix this, we should also fix the following:
|
Does this happen consistently for you, @s-drahcir ? I can't seem to reproduce it today, so I'm wondering if I saw something different two days ago. |
Apologies for not replying as I've been away. I have tried again and still experience the same issue. This is again using https://beta.pybricks.com/ and 'cityhub', '3.1.0b1', 'v3.1.0b1 on 2021-09-21'. As a side note, I did both "Check for update" and reflashed the PyBricks beta firmware to confirm I was using the latest available. |
Something like this is also happening on port C of the Technic Hub. Time for a closer look! |
It appears that passive devices are sometimes detected as UART devices. This is also happening on Prime Hub, which make it a bit easier to debug. Also, a passive device can be detected as the wrong type. Such as 9 for a train motor instead of 2. Or 8 for a Wedo 2.0 motor instead of 1. (ID 2 detected as So maybe this is the same issue, getting |
It would also be good to make sure we can get unstuck higher up --- |
This makes it easier to see failed device detection events such as in pybricks/support#500.
This makes it easier to see failed device detection events such as in pybricks/support#500.
I removed my assignment, so feel free to pick this up if you want to, @dlech. The tl;dr to reproduce:
Sometimes it takes a while, sometimes it happens right away. To be complete, this can go wrong as well:
|
This should be fixed now. With the debug prints, I occasionally see this when a medium motor is first plugged in:
But since it immediately transitions to the correct device ID, I don't think this should be a problem. If the problem still persists, Adding more calls to |
Describe the bug
DCMotor (in my case train motor) does not work with CityHub when plugged in to Port A AFTER warning regarding no device attached/detected etc (OSError: [Errno 19] ENODEV)
To reproduce
Use https://beta.pybricks.com/ v3.1 with CityHub and train motor. CityHub reports: ('cityhub', '3.1.0b1', 'v3.1.0b1 on 2021-09-21').
Expected behavior
For it to work :)
Notes
It's possible it is not just limited to DCMotor. However, as this is the only device I have, that's all I can confirm.
Does not appear to have the same issue with Port B when specified in the script. It will warn, but plugging DCMotor into Port B and then running the script again works fine.
The text was updated successfully, but these errors were encountered: