IMU Heater through a resistor or IO co-processor
No detailed description...
Example for airframe file
Add to your firmware section: This example contains all possible configuration options, not all of them are mandatory!
<module name="imu_heater">
b'<define name="IMU_HEATER_TARGET_TEMP" value="55." unit="Celcius" />\n '
b'<define name="IMU_HEATER_P_GAIN" value="200." unit="%/degC" />\n '
b'<define name="IMU_HEATER_I_GAIN" value="0.3" />\n '
b'<define name="IMU_HEATER_GYRO_ID" value="ABI_BROADCAST" />\n '
b'<define name="IMU_HEATER_ACCEL_ID" />\n '
b'<define name="IMU_HEATER_GPIO" />\n '
b'<define name="IMU_HEATER_GPIO_PIN" />\n '
b'<define name="INTERMCU_IOMCU" />\n '
</module>
Module configuration options
Define Options
- name:
IMU_HEATER_TARGET_TEMP
value: 55.
Description: Target temperature
- name:
IMU_HEATER_P_GAIN
value: 200.
Description: kP gain for the heater
- name:
IMU_HEATER_I_GAIN
value: 0.3
Description: kI gain for the heater
- name:
IMU_HEATER_GYRO_ID
value: ABI_BROADCAST
Description: Gyro ABI id for the temperature measurement
- name:
IMU_HEATER_ACCEL_ID
value: None
Description: Accel ABI id for the temperature measurement
- name:
IMU_HEATER_GPIO
value: None
Description: Heater GPIO port for resistor activation
- name:
IMU_HEATER_GPIO_PIN
value: None
Description: Heater GPIO pin for resistor activation
- name:
INTERMCU_IOMCU
value: None
Description: Heater IOMCU communication enabled
Module functions
Init Functions
These initialization functions are called once on startup.
Periodic Functions
These functions are called periodically at the specified frequency from the module periodic loop.
- imu_heater_periodic()
- Running at maximum module frequency.
- Autorun: LOCK
Periodic function automatically starts after init and can't be stopped.
- imu_heater_periodic_10hz()
- Frequency in Hz: 10
- Autorun: LOCK
Periodic function automatically starts after init and can't be stopped.
Files
Header Files
The following headers are automatically included in modules.h
Source Files
Raw imu_heater.xml file:
<!DOCTYPE module SYSTEM "module.dtd">
<module name="imu_heater" dir="imu">
<doc>
<description>
IMU Heater through a resistor or IO co-processor
</description>
<define name="IMU_HEATER_TARGET_TEMP" value="55." description="Target temperature" unit="Celcius"/>
<define name="IMU_HEATER_P_GAIN" value="200." description="kP gain for the heater" unit="%/degC"/>
<define name="IMU_HEATER_I_GAIN" value="0.3" description="kI gain for the heater"/>
<define name="IMU_HEATER_GYRO_ID" value="ABI_BROADCAST" description="Gyro ABI id for the temperature measurement"/>
<define name="IMU_HEATER_ACCEL_ID" description="Accel ABI id for the temperature measurement"/>
<define name="IMU_HEATER_GPIO" description="Heater GPIO port for resistor activation"/>
<define name="IMU_HEATER_GPIO_PIN" description="Heater GPIO pin for resistor activation"/>
<define name="INTERMCU_IOMCU" description="Heater IOMCU communication enabled"/>
</doc>
<settings>
<dl_settings>
<dl_settings NAME="IMU Heater">
<dl_setting var="imu_heater.target_temp" min="-1" step="0.1" max="70" shortname="target_temp" param="IMU_HEATER_TARGET_TEMP"/>
<dl_setting var="imu_heater.gain_p" min="0" step="0.1" max="500" shortname="gain_p" param="IMU_HEATER_P_GAIN"/>
<dl_setting var="imu_heater.gain_i" min="0" step="0.01" max="10" shortname="gain_i" param="IMU_HEATER_I_GAIN"/>
</dl_settings>
</dl_settings>
</settings>
<header>
<file name="imu_heater.h"/>
</header>
<init fun="imu_heater_init()"/>
<periodic fun="imu_heater_periodic()"/>
<periodic fun="imu_heater_periodic_10hz()" freq="10"/>
<makefile target="!sim|nps|fbw">
<file name="imu_heater.c"/>
</makefile>
</module>