mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-23 09:08:30 -04:00
AP_BoardConfig: added BRD_IMU_TARGTEMP
set target temperature for IMU
This commit is contained in:
parent
834acaffee
commit
45c72eb442
@ -101,6 +101,15 @@ const AP_Param::GroupInfo AP_BoardConfig::var_info[] = {
|
||||
// @Values: 0:Disabled,1:Enabled
|
||||
AP_GROUPINFO("CAN_ENABLE", 6, AP_BoardConfig, _can_enable, 0),
|
||||
#endif
|
||||
|
||||
#if HAL_HAVE_IMU_HEATER
|
||||
// @Param: IMU_TARGTEMP
|
||||
// @DisplayName: Target IMU temperature
|
||||
// @Description: This sets the target IMU temperature for boards with controllable IMU heating units. A value of -1 disables heating.
|
||||
// @Range: -1 80
|
||||
// @Units: degreesC
|
||||
AP_GROUPINFO("IMU_TARGTEMP", 7, AP_BoardConfig, _imu_target_temperature, HAL_IMU_TEMP_DEFAULT),
|
||||
#endif
|
||||
|
||||
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4
|
||||
// @Param: SAFETY_MASK
|
||||
@ -246,5 +255,10 @@ void AP_BoardConfig::init()
|
||||
#elif CONFIG_HAL_BOARD == HAL_BOARD_VRBRAIN
|
||||
/* configure the VRBRAIN driver for the right number of PWMs */
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// let the HAL know the target temperature. We pass a pointer as
|
||||
// we want the user to be able to change the parameter without
|
||||
// rebooting
|
||||
hal.util->set_imu_target_temp((int8_t *)&_imu_target_temperature);
|
||||
}
|
||||
|
@ -35,4 +35,7 @@ private:
|
||||
#if CONFIG_HAL_BOARD == HAL_BOARD_VRBRAIN
|
||||
|
||||
#endif
|
||||
|
||||
// target temperarure for IMU in Celsius, or -1 to disable
|
||||
AP_Int8 _imu_target_temperature;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user