Page 1 of 1

Save Magnetometer Calibration Parameters

Posted: Thu Jun 02, 2016 12:56 pm
by jackemoore
Hi,

Is there a way to save compass calibration parameters within the crazyflie_firmware and retrieve them at a later time the next time the crazyflie is powered on? I believe a similar question was asked back in 2013 and the answer was this is currently not possible but development of it is ongoing.

Best regards,
Jack

Re: Save Magnetometer Calibration Parameters

Posted: Tue Jun 07, 2016 11:00 am
by tobias
Well it should have been developed now but unfortunately not :oops:.

I think the quickest way forward for you would to extend the configblock memory. It might take a while before we have a more flexible system implemented...

Re: Save Magnetometer Calibration Parameters

Posted: Wed Jun 08, 2016 6:14 pm
by jackemoore
Hi Tobias,

I modified the configblockeeprom module to include the magnetometer calibration parameters and it worked. However, the watchdog timer gets upset when there is writing to eeprom and this triggers a timeout and crazyflie reset. Depending upon when the write begins and where the watchdog timer is in its timeout interval, occasionally the writing to eeprom appears to be aborted before it is started/completed.

The watchdog timer is enabled at system startup and I don't see a way to temporarily suspend it. And I'm unaware of a firmware function that handles a graceful powering down of the firmware, for example to permit writing to eeprom, when turning off the the crazyflie.

Please hold your hands over your ears! I delayed enabling the watchdog timer until after performing the compass calibration and writing to eeprom. This kinda worked, but I saw some potentially questionable symptoms at startup when connecting the cfclient to the crazyflie. Perhaps the watchdog aids in establishing a proper communication with cfclient or in its absence, some unplanned things happen?

Anyway, a better solution from Bitcraze would be greatly appreciated.

Best regards,
Jack,

PS you can now lower your hands.