-
-
Notifications
You must be signed in to change notification settings - Fork 324
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
Added support for MPU6500 basic functionality #581
Conversation
You need to patch the MPU6050.cpp file as well or it will fail on this function; accelgyro.testConnection(). This code will work;
|
I didn't want to make any changes to the standard MPU6050 repository so I tried to remove the "accelgyro.testConnection()" line in the main ISpindel.cpp file and replace it so that function was never used. Did I miss it somewhere else other than the repo? |
Sorry, my misstake. didnt look at the changes. just noticed that there was a call to that method in the code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Linter : code formatter fails
Is it worth altering that if statement a bit by adding brackets so as to not rely on operation order i.e.: |
https://docs.microsoft.com/en-us/cpp/c-language/precedence-and-order-of-evaluation?view=msvc-170 parentheses are not necessary here |
I know they aren't strictly needed, it's more of a good practise / style kind of thing, also for readability. |
I honestly have no idea what this is. I haven't changed this from your master branch. Any ideas why it's failing on here but not when I build it on my PC? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes made
Could I please get some advice on how to deal with the Linter fail, any pointer would be greatly appreciated. I honestly have no idea why it keeps failing. https://github.com/universam1/iSpindel/runs/6349107436?check_suite_focus=true |
Is the dark green stuff in the files changed bit the stuff the linter doesn't like? I can't find the results of the linter. |
It's in the link below. I added the linter to my fork for testing. https://github.com/Bananamannn/iSpindel/runs/6418152846?check_suite_focus=true |
@Bananamannn All you had to to to get rid of format errors is just execute "Format document" command in VS Code (assuming you have clang-format installed by default) |
Oh right, thanks for the info. I'll defiantly do it that way next time. I did it all through the Github editor this round. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed formatting. Linter now passes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
Excellent @Bananamannn thanks for contribution
Will need to be double checked using a MPU6050 as I don't have one on hand. However MPU6500 seems to work just fine