From 4bcf2cdb521043c7e33a9b2c6a3c7dae58e35e19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Fri, 4 Nov 2016 10:58:44 +0100 Subject: [PATCH] uavcan: fix initialization of std::array in C++11, double braces are needed for std::array aggregate initialization, or assignment with =. see: http://en.cppreference.com/w/cpp/container/array --- src/modules/uavcan/uavcan_main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/uavcan/uavcan_main.cpp b/src/modules/uavcan/uavcan_main.cpp index d2f4a00e7a..97999e975e 100644 --- a/src/modules/uavcan/uavcan_main.cpp +++ b/src/modules/uavcan/uavcan_main.cpp @@ -1258,10 +1258,10 @@ UavcanNode::print_info() // Printing all nodes that are online std::printf("Online nodes (Node ID, Health, Mode):\n"); _node_status_monitor.forEachNode([](uavcan::NodeID nid, uavcan::NodeStatusMonitor::NodeStatus ns) { - static constexpr std::array HEALTH { + static constexpr std::array HEALTH = { "OK", "WARN", "ERR", "CRIT" }; - static constexpr std::array MODES { + static constexpr std::array MODES = { "OPERAT", "INIT", "MAINT", "SW_UPD", "?", "?", "?", "OFFLN" }; std::printf("\t% 3d %-10s %-10s\n", int(nid.get()), HEALTH.at(ns.health), MODES.at(ns.mode));