<!DOCTYPE module SYSTEM "module.dtd">

<module name="imu_vectornav">
  <doc>
    <description>
      Vectornav VN-200 over uart used as IMU.
      The default configuration doesn't show MAG data.
      Vectornav is factory calibrated
    </description>
    <configure name="VN_PORT" value="uart3" description="UART to use"/>
    <configure name="VN_BAUD" value="B921600" description="UART baudrate"/>
  </doc>
  <autoload name="imu_common"/>
  <autoload name="imu_nps"/>
  <header>
    <file name="imu_vectornav.h" dir="modules/imu"/>
  </header>
  <init fun="imu_vectornav_init()"/>
  <periodic fun="imu_vectornav_init()" freq="1"/>
  <event fun="imu_vectornav_event()"/>
  <makefile target="!sim|nps|fbw">
    <configure name="VN_PORT" default="uart3" case="upper|lower"/>
    <configure name="VN_BAUD" default="B921600"/>
    <define name="USE_$(VN_PORT_UPPER)"/>
    <define name="VN_PORT" value="$(VN_PORT_LOWER)"/>
    <define name="$(VN_PORT_UPPER)_BAUD" value="$(VN_BAUD)"/>

    <file name="vn200_serial.c" dir="peripherals"/>
    <file name="imu_vectornav.c" dir="modules/imu"/>

    <define name="IMU_TYPE_H" value="modules/imu/imu_vectornav.h" type="string"/>
  </makefile>
</module>
