mirror of https://github.com/ArduPilot/ardupilot
AP_BoardConfig: allow for hwdef.dat setting for IMU heater gains
This commit is contained in:
parent
d5dccaa734
commit
c2a13213ae
|
@ -30,6 +30,16 @@
|
||||||
#define HAL_WATCHDOG_ENABLED_DEFAULT false
|
#define HAL_WATCHDOG_ENABLED_DEFAULT false
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if HAL_HAVE_IMU_HEATER
|
||||||
|
#ifndef HAL_IMUHEAT_P_DEFAULT
|
||||||
|
#define HAL_IMUHEAT_P_DEFAULT 200
|
||||||
|
#endif
|
||||||
|
#ifndef HAL_IMUHEAT_I_DEFAULT
|
||||||
|
#define HAL_IMUHEAT_I_DEFAULT 0.3
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
extern "C" typedef int (*main_fn_t)(int argc, char **);
|
extern "C" typedef int (*main_fn_t)(int argc, char **);
|
||||||
|
|
||||||
class AP_BoardConfig {
|
class AP_BoardConfig {
|
||||||
|
@ -238,7 +248,7 @@ private:
|
||||||
struct {
|
struct {
|
||||||
AP_Int8 imu_target_temperature;
|
AP_Int8 imu_target_temperature;
|
||||||
uint32_t last_update_ms;
|
uint32_t last_update_ms;
|
||||||
AC_PI pi_controller{200, 0.3, 70};
|
AC_PI pi_controller{HAL_IMUHEAT_P_DEFAULT, HAL_IMUHEAT_I_DEFAULT, 70};
|
||||||
uint16_t count;
|
uint16_t count;
|
||||||
float sum;
|
float sum;
|
||||||
float output;
|
float output;
|
||||||
|
|
Loading…
Reference in New Issue