Skip to content
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

Cannot select mode number >= 8 #214

Open
muzkr opened this issue Dec 15, 2024 · 2 comments
Open

Cannot select mode number >= 8 #214

muzkr opened this issue Dec 15, 2024 · 2 comments

Comments

@muzkr
Copy link

muzkr commented Dec 15, 2024

For the ultrasonic distance sensor (device ID 0x3E), there are 9 modes (numbered 0 - 8). After sending the serial command select 8, the BH does not return any data.
Although, it is possible to indirectly get the data for mode 8 by configuring a combi, e.g. combi 0 8 0 8 1 8 2 8 3; select 0, it seems that there is a bug in the implementation of the BH fw for reading the data of modes numbered >= 8.
I have no direct evidence, but would suggest that developers check to see if any leading CMD_EXT_MODE message is ignored before reading the MESSAGE_DATA message.

EDIT:

I realized a little later that combi doesn't work the way I thought it would, so I crossed out the sentence above.
However, the main problem described in this issue still stands. As another example, the SPIKE color sensor (ID 0x3D) has 10 modes, and the select 8 or select 9 commands do not get any output.

@mutesplash
Copy link
Contributor

Mode 8 is a calibration mode that does not specify accepting input or output in the port information?

@muzkr
Copy link
Author

muzkr commented Dec 16, 2024

Mode 8 is a calibration mode that does not specify accepting input or output in the port information?

I don't known if the name of a mode or the actual meaning of its data would justify not returning it. Mode 4 of the medium motor (device ID 0x4B) in the Robot Inventor 51515 set is also CALIB, and BH returns data as expected upon input of command select 4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants