// generated from rosidl_adapter/resource/msg.idl.em
// with input from px4_msgs/msg/EscStatus.msg
// generated code does not contain a copyright notice

#include "px4_msgs/msg/EscReport.idl"

module px4_msgs {
  module msg {
    typedef px4_msgs::msg::EscReport px4_msgs__msg__EscReport;
    typedef px4_msgs__msg__EscReport px4_msgs__msg__EscReport__8[8];
    module EscStatus_Constants {
      @verbatim (language="comment", text=
        "The number of ESCs supported. Current (Q2/2013) we support 8 ESCs")
      const uint8 CONNECTED_ESC_MAX = 8;
      @verbatim (language="comment", text=
        "Traditional PPM ESC")
      const uint8 ESC_CONNECTION_TYPE_PPM = 0;
      @verbatim (language="comment", text=
        "Serial Bus connected ESC")
      const uint8 ESC_CONNECTION_TYPE_SERIAL = 1;
      @verbatim (language="comment", text=
        "One Shot PPM")
      const uint8 ESC_CONNECTION_TYPE_ONESHOT = 2;
      @verbatim (language="comment", text=
        "I2C")
      const uint8 ESC_CONNECTION_TYPE_I2C = 3;
      @verbatim (language="comment", text=
        "CAN-Bus")
      const uint8 ESC_CONNECTION_TYPE_CAN = 4;
      @verbatim (language="comment", text=
        "DShot")
      const uint8 ESC_CONNECTION_TYPE_DSHOT = 5;
    };
    struct EscStatus {
      @verbatim (language="comment", text=
        "time since system start (microseconds)")
      uint64 timestamp;

      @verbatim (language="comment", text=
        "incremented by the writing thread everytime new data is stored")
      uint16 counter;

      @verbatim (language="comment", text=
        "number of connected ESCs")
      uint8 esc_count;

      @verbatim (language="comment", text=
        "how ESCs connected to the system")
      uint8 esc_connectiontype;

      @verbatim (language="comment", text=
        "Bitmask indicating which ESC is online/offline")
      uint8 esc_online_flags;

      @verbatim (language="comment", text=
        "esc_online_flags bit 0 : Set to 1 if ESC0 is online" "\n"
        "esc_online_flags bit 1 : Set to 1 if ESC1 is online" "\n"
        "esc_online_flags bit 2 : Set to 1 if ESC2 is online" "\n"
        "esc_online_flags bit 3 : Set to 1 if ESC3 is online" "\n"
        "esc_online_flags bit 4 : Set to 1 if ESC4 is online" "\n"
        "esc_online_flags bit 5 : Set to 1 if ESC5 is online" "\n"
        "esc_online_flags bit 6 : Set to 1 if ESC6 is online" "\n"
        "esc_online_flags bit 7 : Set to 1 if ESC7 is online" "\n"
        "Bitmask indicating which ESC is armed. For ESC's where the arming state is not known (returned by the ESC), the arming bits should always be set.")
      uint8 esc_armed_flags;

      px4_msgs__msg__EscReport__8 esc;
    };
  };
};
