Function rc_mav_send_sys_status#

Function Documentation#

int rc_mav_send_sys_status(uint32_t onboard_control_sensors_present, uint32_t onboard_control_sensors_enabled, uint32_t onboard_control_sensors_health, uint16_t load, uint16_t voltage_battery, int16_t current_battery, uint16_t drop_rate_comm, uint16_t errors_comm, uint16_t errors_count1, uint16_t errors_count2, uint16_t errors_count3, uint16_t errors_count4, int8_t battery_remaining)#

{ function_description }

Parameters:
  • onboard_control_sensors_present – [in] Bitmask showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present. Indices defined by ENUM MAV_SYS_STATUS_SENSOR

  • onboard_control_sensors_enabled – [in] Bitmask showing which onboard controllers and sensors are enabled: Value of 0: not enabled. Value of 1: enabled. Indices defined by ENUM MAV_SYS_STATUS_SENSOR

  • onboard_control_sensors_health – [in] Bitmask showing which onboard controllers and sensors are operational or have an error: Value of 0: not enabled. Value of 1: enabled. Indices defined by ENUM MAV_SYS_STATUS_SENSOR

  • load – [in] Maximum usage in percent of the mainloop time, (0%: 0, 100%: 1000) should be always below 1000

  • voltage_battery – [in] Battery voltage, in millivolts (1 = 1 millivolt)

  • current_battery – [in] Battery current, in 10*milliamperes (1 = 10 milliampere), -1: autopilot does not measure the current

  • drop_rate_comm – [in] Communication drops in percent, (0%: 0, 100%: 10’000), (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)

  • errors_comm – [in] Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)

  • errors_count1 – [in] Autopilot-specific errors

  • errors_count2 – [in] Autopilot-specific errors

  • errors_count3 – [in] Autopilot-specific errors

  • errors_count4 – [in] Autopilot-specific errors

  • battery_remaining – [in] Remaining battery energy: (0%: 0, 100%: 100), -1: autopilot estimate the remaining battery

Returns:

0 on success, -1 on failure