mstrens / oXs_on_RP2040

version of openXsensor to be used on raspberry pi pico RP2040 (more protocols, more functionalities)
83 stars 22 forks source link

Enhancement/Feature Request: MPU6050 calibration from Tx command #106

Closed rieden1 closed 9 months ago

rieden1 commented 9 months ago

At present the MPU6050 can be calibrated using the USB command "MPUCAL". It would be extremely useful to be able to calibrate (zero the datums) at the start of a flying session with the unit installed in the aeroplane. Would it be possible to have calibration initiated from a Tx command - either from a PWB state, SBus data or something else?

Satcomix commented 9 months ago

Hello Peter, When you use a GY-521 board with MP6050, the MP6050 wil normally calibbrate itself after every PowerOn. It is already calibrated when delivered. When you use a GY-86 you must use MPUCAL one time, for the first installation. Best regards, Torsten

rieden1 commented 9 months ago

Thanks for confirming - I rather guessed that was happening but wasn't sure. However I think it would still be a useful feature because most of my fleet (100% electric these days) are powered up by connecting the main flight battery, and in many cases this is done with the model inverted or on its side. It would be jolly nice if, once the battery was fitted and the model ready for flight, I could put it in a level datum position and do a "set zero now" command from the Tx

mstrens commented 9 months ago

I expect that calibration should only be done one. When done, the results are stored in flash and retrieved/reused after each power on.

I do not like the idea of using a Rc channel to force it because:

rieden1 commented 9 months ago

Fair enough. I didn't realise it would cause extra complications!