CHR-UM6 IMU.
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!
1 <module name="imu_um6">
2 <configure name="UM6_PORT" value="uart3" />
3 <configure name="UM6_BAUD" value="B115200" />
Module configuration options
Configure Options
- name:
UM6_PORT
value: uart3
Description: UART to use
- name:
UM6_BAUD
value: B115200
Description: Baud rate
Auto-loaded modules
The following modules are automatically loaded (just as if you had added them in the airframe file)
Module functions
Init Functions
These initialization functions are called once on startup.
Event Functions
These event functions are called in each cycle of the module event loop.
Periodic Functions
These functions are called periodically at the specified frequency from the module periodic loop.
- imu_um6_periodic()
- Running at maximum module frequency.
- 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_um6.xml file:
<!DOCTYPE module SYSTEM "module.dtd">
<module name="imu_um6" dir="imu">
<doc>
<description>
CHR-UM6 IMU.
</description>
<configure name="UM6_PORT" value="uart3" description="UART to use"/>
<configure name="UM6_BAUD" value="B115200" description="Baud rate"/>
</doc>
<define name="USE_IMU"/>
<autoload name="imu_nps"/>
<header>
<file name="imu_um6.h" dir="subsystems/imu"/>
</header>
<init fun="imu_um6_init()"/>
<periodic fun="imu_um6_periodic()"/>
<event fun="imu_um6_event()"/>
<makefile target="!sim|nps|fbw">
<configure name="UM6_PORT" default="uart3" case="lower|upper"/>
<configure name="UM6_BAUD" default="B115200"/>
<define name="USE_$(UM6_PORT_UPPER)"/>
<define name="$(UM6_PORT_UPPER)_BAUD" value="$(UM6_BAUD)"/>
<define name="UM6_LINK" value="$(UM6_PORT_LOWER)"/>
<define name="IMU_TYPE_H" value="imu/imu_um6.h" type="string"/>
<file name="imu_um6.c" dir="subsystems/imu"/>
</makefile>
</module>