Closed michroz2 closed 1 year ago
Hi Michael (@michroz2 ), This is a reasonable request, but we will not be able to implement it any time soon. If you want to send us a Pull Request, that would be great. Best wishes, Paul
Thanks Paul! Maybe I will. I am just a hobbyist programmer though. Best to you, Mich
On Thu, Apr 8, 2021 at 10:45 AM Paul @.***> wrote:
Hi Michael @.*** https://github.com/michroz2 ), This is a reasonable request, but we will not be able to implement it any time soon. If you want to send us a Pull Request, that would be great. Best wishes, Paul
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sparkfun/SparkFun_BNO080_Arduino_Library/issues/83#issuecomment-815533869, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKJS6APGMC5GZAHY5GPM2SLTHVNI3ANCNFSM42SJLWKA .
I have implemented it and would be happy to provide a pull request. What would be the preferred API? Tare has a number of options, namely:
How about something like this:
void tare(bool zAxis=false); // <-- tare now
Or:
void tareNow(bool zAxis=false); // <-- tare now
Or:
void tareZ(); // <-- tare now according to z-axis
void tareAll(); // <-- tare now according to all axis
For the "persist" I would suggest:
void saveTare(); // <-- tare persist
My vote is for the second option. Thank you!
On Wed, Mar 2, 2022 at 12:36 AM Sofian Audry @.***> wrote:
I have implemented it and would be happy to provide a pull request. What would be the preferred API? Tare has a number of options, namely:
- "tare now" with options for "z axis only" or "all axis"
- "tare persist" which makes the tare persistent
How about something like this:
void tare(bool zAxis=false); // <-- tare now
Or:
void tareNow(bool zAxis=false); // <-- tare now
Or:
void tareZ(); // <-- tare now according to z-axisvoid tareAll(); // <-- tare now according to all axis
For the "persist" I would suggest:
void saveTare(); // <-- tare persist
— Reply to this email directly, view it on GitHub https://github.com/sparkfun/SparkFun_BNO080_Arduino_Library/issues/83#issuecomment-1055927555, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKJS6AM6SNKOCUA25M3JRV3U52LVVANCNFSM42SJLWKA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were mentioned.Message ID: @.***>
Just did it, let me know what you think.
I will, but I'm only able at the next update of my project, happening, hopefully this year. Did you use this function in your project or what was your incentive for doing this update? Best and Thank You!
On Thu, Mar 3, 2022 at 4:27 AM Sofian Audry @.***> wrote:
Just did it, let me know what you think.
— Reply to this email directly, view it on GitHub https://github.com/sparkfun/SparkFun_BNO080_Arduino_Library/issues/83#issuecomment-1057603069, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKJS6AORFY3RK2BMSSXENF3U6APSHANCNFSM42SJLWKA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were mentioned.Message ID: @.***>
I needed it for one of my own projects. No problem about the update, just happy to contribute.
Hi Michael (@michroz2 ),
Apologies for the very slow reply. I have merged @sofian 's code. I will up-issue the library once I have tested it.
Closed by #99 .
Best wishes, Paul
Thank you Paul!
On Mon, Jan 23, 2023 at 1:28 PM Paul @.***> wrote:
Hi Michael @.*** https://github.com/michroz2 ),
Apologies for the very slow reply. I have merged @sofian https://github.com/sofian 's code. I will up-issue the library once I have tested it.
Closed by #99 https://github.com/sparkfun/SparkFun_BNO080_Arduino_Library/pull/99 .
Best wishes, Paul
— Reply to this email directly, view it on GitHub https://github.com/sparkfun/SparkFun_BNO080_Arduino_Library/issues/83#issuecomment-1400192833, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKJS6ALOLDFBEIZR4KF23CTWTZTMLANCNFSM42SJLWKA . You are receiving this because you were mentioned.Message ID: @.***>
Please could you implement the TARE function? Thank you!
The BNO08X have Tare function described in the "SH-2 Reference Manual Document Number: 1000-3625" and "1000-4045 - App Note BNO080/BNO085 Tare Function Usage Guide" I find this feature useful for the cases of BNO08X installations independent of the ground level. I actually implemented this function for me, but for my specific case of Game Vector and XYZ axes only, while for the public library it probably should feature all possible bells and whistles.
Your workbench
*irrelevant
Steps to reproduce
irrelevant
Expected behavior
The BNO08X should "Tare", i.e. re-orient their vectors according to the current actual position of the local G and M vectors.
Actual behavior
No such function in the library
Below is my humble implementation of the Tare (based on version 1.1.9)
.h file: void sendCommand(uint8_t command); void sendTareGameXYZCommand(); //MR> I added this command to this library for my project - by example. void sendCalibrateCommand(uint8_t thingToCalibrate); .cpp file: //MR> This tells the BNO080 to Tare //MR> See page 45 of reference manual void BNO080::sendTareGameXYZCommand() { /Setting the shtpData[] byte Name Description 3 P0 0x00 – Subcommand: Perform Tare now 4 P1 Bitmap of axes to tare: Bit 0= X, Bit 1= Y, Bit 2= Z MR> 7 = X,Y,Z 5 P2 Rotation Vector to use as basis for tare. 0: Rotation Vector 1: Gaming Rotation Vector MR> This! 2: Geomagnetic Rotation Vector 3: Gyro-Integrated Rotation Vector 4: ARVR-Stabilized Rotation Vector 5: ARVR-Stabilized Game Rotation Vector 6 P3 Reserved 7 P4 Reserved 8 P5 Reserved 9 P6 Reserved 10 P7 Reserved 11 P8 Reserved /
}
//This tells the BNO080 to begin calibrating //See page 50 of reference manual and the 1000-4044 calibration doc void BNO080::sendCalibrateCommand(uint8_t thingToCalibrate) { ...