mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-10 09:58:28 -04:00
Compass: set device id for ak8963 and hmc5843
This commit is contained in:
parent
5ef4f8e90a
commit
d192b3ccea
@ -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));
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user