GCS_MAVLink: handle available memory of over 64k in mavlink

This commit is contained in:
Andrew Tridgell 2015-11-05 16:06:34 +11:00
parent 883ac59e4a
commit 49799257ea

View File

@ -198,8 +198,11 @@ void GCS_MAVLINK::reset_cli_timeout() {
void GCS_MAVLINK::send_meminfo(void) void GCS_MAVLINK::send_meminfo(void)
{ {
unsigned __brkval = 0; unsigned __brkval = 0;
uint32_t memory = hal.util->available_memory();
mavlink_msg_meminfo_send(chan, __brkval, hal.util->available_memory()); if (memory > 0xffff) {
memory = 0xffff;
}
mavlink_msg_meminfo_send(chan, __brkval, memory);
} }
// report power supply status // report power supply status