mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-21 23:33:57 -04:00
AP_InertialSensor: added support using the 2nd IMU for heater control
This commit is contained in:
parent
eb4f544535
commit
34a52142c8
@ -12,6 +12,10 @@
|
||||
|
||||
#define SENSOR_RATE_DEBUG 0
|
||||
|
||||
#ifndef AP_HEATER_IMU_INSTANCE
|
||||
#define AP_HEATER_IMU_INSTANCE 0
|
||||
#endif
|
||||
|
||||
const extern AP_HAL::HAL& hal;
|
||||
|
||||
AP_InertialSensor_Backend::AP_InertialSensor_Backend(AP_InertialSensor &imu) :
|
||||
@ -731,7 +735,7 @@ void AP_InertialSensor_Backend::_publish_temperature(uint8_t instance, float tem
|
||||
|
||||
#if HAL_HAVE_IMU_HEATER
|
||||
/* give the temperature to the control loop in order to keep it constant*/
|
||||
if (instance == 0) {
|
||||
if (instance == AP_HEATER_IMU_INSTANCE) {
|
||||
AP_BoardConfig *bc = AP::boardConfig();
|
||||
if (bc) {
|
||||
bc->set_imu_temp(temperature);
|
||||
|
Loading…
Reference in New Issue
Block a user