Browse Source

added memory reporting over MAVLink

git-svn-id: https://arducopter.googlecode.com/svn/trunk@3207 f9c3cf11-9bcb-44bc-f272-b75c42450872
mission-4.1.18
tridge60@gmail.com 14 years ago
parent
commit
4e71884298
  1. 2
      ArduCopterMega/ArduCopterMega.pde
  2. 5
      ArduCopterMega/Mavlink_Common.h

2
ArduCopterMega/ArduCopterMega.pde

@ -64,6 +64,7 @@ And much more so PLEASE PM me on DIYDRONES to add your contribution to the List @@ -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; @@ -524,6 +525,7 @@ static byte loop_step;
////////////////////////////////////////////////////////////////////////////////
void setup() {
memcheck_init();
init_ardupilot();
}

5
ArduCopterMega/Mavlink_Common.h

@ -76,6 +76,11 @@ void mavlink_send_message(mavlink_channel_t chan, uint8_t id, uint32_t param, ui @@ -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…
Cancel
Save