Save Magnetometer Calibration Parameters

Firmware/software/electronics/mechanics
Post Reply
jackemoore
Member
Posts: 75
Joined: Mon Apr 06, 2015 6:47 pm

Save Magnetometer Calibration Parameters

Post 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
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Save Magnetometer Calibration Parameters

Post 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...
jackemoore
Member
Posts: 75
Joined: Mon Apr 06, 2015 6:47 pm

Re: Save Magnetometer Calibration Parameters

Post 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.
Post Reply