From 198fdb58635f5db1fe5115ca2de7bd913a229cd2 Mon Sep 17 00:00:00 2001 From: Jakob Olesen Date: Thu, 26 Jan 2023 10:48:22 +0000 Subject: [PATCH] Pull request #521: NoJira Fix epmap printing uint8 as char Merge in WMN_TOOLS/matter from bugfix/unify_matter_bridge_epmap to silabs Squashed commit of the following: commit ac48b79f96dbd5d1800c3193c88856a13b8250d8 Author: Jakob Olesen Date: Tue Jan 24 09:34:14 2023 +0100 NoJira Fix epmap printing uint8 as char --- .../matter_node_state_monitor.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/silabs_examples/unify-matter-bridge/linux/src/matter_node_state_monitor/matter_node_state_monitor.cpp b/silabs_examples/unify-matter-bridge/linux/src/matter_node_state_monitor/matter_node_state_monitor.cpp index 6c3e09dec6ae5c..8d9f2a043cc925 100644 --- a/silabs_examples/unify-matter-bridge/linux/src/matter_node_state_monitor/matter_node_state_monitor.cpp +++ b/silabs_examples/unify-matter-bridge/linux/src/matter_node_state_monitor/matter_node_state_monitor.cpp @@ -196,11 +196,12 @@ void matter_node_state_monitor::erase_mapper_endpoint(const std::string unid, ch void matter_node_state_monitor::display_map(std::ostream & os) { - os << std::setw(10) << "Unify Unid |" << std::setw(10) << "Unify Endpoint |" << std::setw(10) << "Matter Endpoint\n"; + const unsigned int columnWidth = 20; + os << std::setw(columnWidth) << "Unify Unid" << "|" << std::setw(columnWidth) << "Unify Endpoint" << "|" << std::setw(columnWidth) << "Matter Endpoint\n"; for (auto ep = bridged_endpoints.begin(); ep != bridged_endpoints.end(); ep++) { - os << std::setw(10) << ep->second.unify_unid.c_str() << "|" << std::setw(10) << ep->second.unify_endpoint << "|" - << std::setw(10) << ep->second.matter_endpoint << "\n"; + os << std::setw(columnWidth) << ep->second.unify_unid.c_str() << "|" << std::setw(columnWidth) << unsigned(ep->second.unify_endpoint) << "|" + << std::setw(columnWidth) << ep->second.matter_endpoint << "\n"; } }