mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-23 17:18:28 -04:00
AP_BoardConfig: added BRD_IMU_TARGTEMP
set target temperature for IMU
This commit is contained in:
parent
834acaffee
commit
45c72eb442
@ -102,6 +102,15 @@ const AP_Param::GroupInfo AP_BoardConfig::var_info[] = {
|
|||||||
AP_GROUPINFO("CAN_ENABLE", 6, AP_BoardConfig, _can_enable, 0),
|
AP_GROUPINFO("CAN_ENABLE", 6, AP_BoardConfig, _can_enable, 0),
|
||||||
#endif
|
#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
|
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4
|
||||||
// @Param: SAFETY_MASK
|
// @Param: SAFETY_MASK
|
||||||
// @DisplayName: Channels to which ignore the safety switch state
|
// @DisplayName: Channels to which ignore the safety switch state
|
||||||
@ -247,4 +256,9 @@ void AP_BoardConfig::init()
|
|||||||
/* configure the VRBRAIN driver for the right number of PWMs */
|
/* 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
|
#if CONFIG_HAL_BOARD == HAL_BOARD_VRBRAIN
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// target temperarure for IMU in Celsius, or -1 to disable
|
||||||
|
AP_Int8 _imu_target_temperature;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user