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


module px4_msgs {
  module msg {
    module EscReport_Constants {
      @verbatim (language="comment", text=
        "(1 << 0)")
      const uint8 FAILURE_OVER_CURRENT = 0;
      @verbatim (language="comment", text=
        "(1 << 1)")
      const uint8 FAILURE_OVER_VOLTAGE = 1;
      @verbatim (language="comment", text=
        "(1 << 2)")
      const uint8 FAILURE_MOTOR_OVER_TEMPERATURE = 2;
      @verbatim (language="comment", text=
        "(1 << 3)")
      const uint8 FAILURE_OVER_RPM = 3;
      @verbatim (language="comment", text=
        "(1 << 4)  Set if ESC received an inconsistent command (i.e out of boundaries)")
      const uint8 FAILURE_INCONSISTENT_CMD = 4;
      @verbatim (language="comment", text=
        "(1 << 5)")
      const uint8 FAILURE_MOTOR_STUCK = 5;
      @verbatim (language="comment", text=
        "(1 << 6)")
      const uint8 FAILURE_GENERIC = 6;
      @verbatim (language="comment", text=
        "(1 << 7)")
      const uint8 FAILURE_MOTOR_WARN_TEMPERATURE = 7;
      @verbatim (language="comment", text=
        "(1 << 8)")
      const uint8 FAILURE_WARN_ESC_TEMPERATURE = 8;
      @verbatim (language="comment", text=
        "(1 << 9)")
      const uint8 FAILURE_OVER_ESC_TEMPERATURE = 9;
      @verbatim (language="comment", text=
        "Counter - keep it as last element!")
      const uint8 ESC_FAILURE_COUNT = 10;
    };
    struct EscReport {
      @verbatim (language="comment", text=
        "time since system start (microseconds)")
      uint64 timestamp;

      @verbatim (language="comment", text=
        "Number of reported errors by ESC - if supported")
      uint32 esc_errorcount;

      @verbatim (language="comment", text=
        "Motor RPM, negative for reverse rotation - if supported")
      @unit (value="RPM")
      int32 esc_rpm;

      @verbatim (language="comment", text=
        "Voltage measured from current ESC - if supported")
      @unit (value="V")
      float esc_voltage;

      @verbatim (language="comment", text=
        "Current measured from current ESC - if supported")
      @unit (value="A")
      float esc_current;

      @verbatim (language="comment", text=
        "Temperature measured from current ESC - if supported")
      @unit (value="degC")
      float esc_temperature;

      @verbatim (language="comment", text=
        "Address of current ESC (in most cases 1-8 / must be set by driver)")
      uint8 esc_address;

      @verbatim (language="comment", text=
        "Counter of number of commands")
      uint8 esc_cmdcount;

      @verbatim (language="comment", text=
        "State of ESC - depend on Vendor")
      uint8 esc_state;

      @verbatim (language="comment", text=
        "actuator output function (one of Motor1...MotorN)")
      uint8 actuator_function;

      @verbatim (language="comment", text=
        "Bitmask to indicate the internal ESC faults")
      uint16 failures;

      @verbatim (language="comment", text=
        "Applied power 0-100 in % (negative values reserved)")
      int8 esc_power;
    };
  };
};
