mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-10 01:44:00 -04:00
GCS_MAVLink: added send_power_status()
This commit is contained in:
parent
8797f38038
commit
87355127ca
@ -180,6 +180,7 @@ public:
|
||||
|
||||
// common send functions
|
||||
void send_meminfo(void);
|
||||
void send_power_status(void);
|
||||
|
||||
private:
|
||||
void handleMessage(mavlink_message_t * msg);
|
||||
@ -280,7 +281,6 @@ private:
|
||||
void handle_log_send(DataFlash_Class &dataflash);
|
||||
void handle_log_send_listing(DataFlash_Class &dataflash);
|
||||
bool handle_log_send_data(DataFlash_Class &dataflash);
|
||||
|
||||
};
|
||||
|
||||
#endif // __GCS_H
|
||||
|
@ -149,3 +149,13 @@ void GCS_MAVLINK::send_meminfo(void)
|
||||
mavlink_msg_meminfo_send(chan, __brkval, hal.util->available_memory());
|
||||
}
|
||||
|
||||
// report power supply status
|
||||
void GCS_MAVLINK::send_power_status(void)
|
||||
{
|
||||
#ifdef CONFIG_ARCH_BOARD_PX4FMU_V2
|
||||
mavlink_msg_power_status_send(chan,
|
||||
hal.analogin->board_voltage() * 1000,
|
||||
hal.analogin->servorail_voltage() * 1000,
|
||||
hal.analogin->power_status_flags());
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user