mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-10 18:08:30 -04:00
added memory reporting over MAVLink
git-svn-id: https://arducopter.googlecode.com/svn/trunk@3207 f9c3cf11-9bcb-44bc-f272-b75c42450872
This commit is contained in:
parent
5cac97ca8d
commit
635d4418c8
@ -64,6 +64,7 @@ And much more so PLEASE PM me on DIYDRONES to add your contribution to the List
|
||||
#include <AP_OpticalFlow.h> // Optical Flow library
|
||||
#include <ModeFilter.h>
|
||||
#include <GCS_MAVLink.h> // MAVLink GCS definitions
|
||||
#include <memcheck.h>
|
||||
|
||||
// Configuration
|
||||
#include "defines.h"
|
||||
@ -524,6 +525,7 @@ static byte loop_step;
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void setup() {
|
||||
memcheck_init();
|
||||
init_ardupilot();
|
||||
}
|
||||
|
||||
|
@ -76,6 +76,11 @@ void mavlink_send_message(mavlink_channel_t chan, uint8_t id, uint32_t param, ui
|
||||
battery_voltage * 1000,
|
||||
battery_remaining,
|
||||
packet_drops);
|
||||
|
||||
#ifdef MAVLINK_MSG_ID_MEMINFO
|
||||
extern unsigned __brkval;
|
||||
mavlink_msg_meminfo_send(chan, __brkval, memcheck_available_memory());
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user