Compass: set device id for ak8963 and hmc5843

This commit is contained in:
Randy Mackay 2015-07-06 21:03:30 +09:00
parent 5ef4f8e90a
commit d192b3ccea
2 changed files with 2 additions and 0 deletions

View File

@ -187,6 +187,7 @@ bool AP_Compass_AK8963::init()
/* register the compass instance in the frontend */
_compass_instance = register_compass();
set_dev_id(_compass_instance, AP_COMPASS_TYPE_AK8963_MPU9250);
hal.scheduler->register_timer_process(FUNCTOR_BIND_MEMBER(&AP_Compass_AK8963::_update, void));

View File

@ -348,6 +348,7 @@ AP_Compass_HMC5843::init()
if (success) {
// register the compass instance in the frontend
_compass_instance = register_compass();
set_dev_id(_compass_instance, _product_id);
}
return success;