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
Pitch and roll values are reversed In real machine. #1075
Comments
Good catch, this is a regression as it only happens in /beta |
@jaustin has something changed in the micro:bit framework around rotation? Our v0: https://github.com/Microsoft/pxt-microbit/blob/master/libs/core/input.cpp#L310
|
Maybe @finneyj or @jamesadevine would have some info as well? |
Looks strongly like we broke this in the DAL, as the 'dal-integration' instance of v0 gets this wrong too. @finneyj we should fix our axes! DAL bug lancaster-university/microbit-dal#371 (PS this reminds me of #799 - which would have helped a lot here!) |
Thanks @guillaumejenkins, @jaustin. @mbitfun. Curious - we definitely checked the axes were consistent after the patch. Will check again... |
Just built up two fresh C++ native test cases for the current HEAD revision of microbit-dal master, and the HEAD revision of dal-integration (which should translate to the versions compared above). The accelerometer data coming out of the device driver via getX(), getY() and getZ() is consistent in terms of magnitude and axis alignment, so the issue must be constrained to the pitch and roll computation a little further up the stack... will dig some more. |
@finneyj any update here? |
hi @abchatra yep - should be fixed in the dal-integration-2 beta... |
Thanks @finneyj We will validate and close this bug. |
thanks @abchatra. Let me know if you have any issues. |
@finneyj Jonny mentioned new config parameters for the build, to enable legacy pitch/roll. Where can I find info on those flags, and where must I enable them? |
Indeed, there's a compile time option that we should keep for v0. For v1 we'd like to move to the new full range values that make pitch and roll consistent with each other. For legacy compat, you should set this #define to '0' : there should be an option to allow you to flip this in your config.json file, but I'm afraid I forgot to add some glue in dal-integration-2 to let this happen. Jonny and I are happy for the v0 beta to be a little inconsistent until the next release where we'll fix it, if that's ok with you? |
@finneyj you mean we take this drop and introduce the small bug for v0. looks ok to me. |
Yep, it's a very minor bug we can live with until the next drop. |
A couple if things: @pelikhan dal-integration-2 shouldn't be going to live yet, just v0-beta and v1-beta. I'd argue this is more incomplete fix than it is new bug, but it's still not the final state of affairs. @finneyj perhaps it's worth picking the yotta config name now so the MakeCode team can set the config in advance of the DAL arriving with it? |
I'd argue it's a bugfix. ;) let's go with this for config.json
|
FYI, I've added the glue logic for this into the HEAD revision of the dal-integration branch, ready for the next tag. |
@finneyj just to clarify, you only added the flag to dal-integration, not the full fix, correct? To test the fix we should still have our beta sites point to dal-integration-2? |
@guillaumejenkins HEAD revision of the dal-integration branch now contains the full fix, including the config.json glue that was missing yesterday. No tag on that yet though, pending other changes. If it's a big problem for you, let us know and i'll do an interim tag, but I'm happy to wait until we do another scheduled tag. |
Just on the train with a draining battery… can it wait an hour? |
Of course no worries. |
actually, I just made it with a few minute to spare. ;)
no time to test though, so please shout if you have problems |
Works well, thanks! We'll release this to our beta websites shortly |
great stuff. thanks @guillaumejenkins. |
Fix will be in the following releases:
|
This thread has been automatically locked since there has not been |
Describe the bug
In simulator the pitch and roll values are correct.
But, In real machine pitch and roll values are reversed
To Reproduce
Please check in real machine.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: