ardupilot icon indicating copy to clipboard operation
ardupilot copied to clipboard

Ardupilot-MAVlink battery monitor

Open FAIZALR opened this issue 8 months ago • 3 comments

This commit introduces functionality to support battery monitors using the MAVLink protocol. The following changes are included:

  • Added conditional compilation for MAVLink support (#if AP_BATTERY_MAVLINK_ENABLED).
  • Defined AP_BATTERY_MAVLINK_ENABLED to default to AP_BATTERY_BACKEND_DEFAULT_ENABLED if not explicitly set.
  • Implemented handle_msg(const mavlink_message_t &msg) in AP_BattMonitor to iterate through configured instances and pass MAVLink messages to appropriate drivers.
  • Updated driver instantiation to include MAVLink type (Type::MAVLink) when configured (BATTx_MONITOR=30).

These changes enables the battery monitor to interface with MAVLink-enabled battery devices, enabling the flight controller to receive and process battery status updates via MAVLink messages. The implementation ensures compatibility and functionality when MAVLink battery monitor driver is enabled through configuration (BATTx_MONITOR=30) and tested in SITL.

mavproxy mission_planner

FAIZALR avatar Jun 21 '24 17:06 FAIZALR