From 79d682e74063e51db417d61dded0039e422c95ef Mon Sep 17 00:00:00 2001 From: David Sidrane Date: Thu, 12 Jan 2017 13:28:38 -1000 Subject: [PATCH] Master uavcan mainline (#6313) * Update libuavcan to upstream master with PX4 contrib for NuttX 7.16+ * Release any 64B blocks not needed by usavcan after FW server is stopped. We simply call the srrink methode after the server stop. See https://github.com/PX4/Firmware/pull/3005#issue-111885687 for backgound --- src/modules/uavcan/libuavcan | 2 +- src/modules/uavcan/uavcan_main.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/modules/uavcan/libuavcan b/src/modules/uavcan/libuavcan index ed47da5b2a..dcbb573972 160000 --- a/src/modules/uavcan/libuavcan +++ b/src/modules/uavcan/libuavcan @@ -1 +1 @@ -Subproject commit ed47da5b2af550fd353680c3a9c03b774d0017fd +Subproject commit dcbb573972f80343ee68eed743506ac09605de3b diff --git a/src/modules/uavcan/uavcan_main.cpp b/src/modules/uavcan/uavcan_main.cpp index 926e7e285f..2655328598 100644 --- a/src/modules/uavcan/uavcan_main.cpp +++ b/src/modules/uavcan/uavcan_main.cpp @@ -1458,11 +1458,13 @@ int uavcan_main(int argc, char *argv[]) int rv = inst->fw_server(UavcanNode::Stop); + /* Let's recover any memory we can */ + + inst->shrink(); if (rv < 0) { warnx("Firmware Server Failed to Stop %d", rv); ::exit(rv); } - ::exit(0); } else {