From a048538684f65005fa707206793df10bb0d140cf Mon Sep 17 00:00:00 2001 From: Gregory LeMasurier Date: Fri, 12 Apr 2024 11:59:21 -0400 Subject: [PATCH] Revert cout logger to print node names --- src/controls/sequence_node.cpp | 1 - src/loggers/bt_cout_logger.cpp | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/controls/sequence_node.cpp b/src/controls/sequence_node.cpp index 9530fd8c4..ef3d05243 100644 --- a/src/controls/sequence_node.cpp +++ b/src/controls/sequence_node.cpp @@ -99,7 +99,6 @@ NodeStatus SequenceNode::tick() } while((current_child_node = getNextSibling(current_child_node)) != nullptr); // The entire while loop completed. This means that all the children returned SUCCESS. - //haltChildren(0); resetChildren(); current_child_idx_ = 0; // Skip if ALL the nodes have been skipped diff --git a/src/loggers/bt_cout_logger.cpp b/src/loggers/bt_cout_logger.cpp index c391b3488..d896aa5a8 100644 --- a/src/loggers/bt_cout_logger.cpp +++ b/src/loggers/bt_cout_logger.cpp @@ -26,8 +26,8 @@ void StdCoutLogger::callback(Duration timestamp, const TreeNode& node, constexpr const size_t ws_count = 25; double since_epoch = duration(timestamp).count(); - printf("[%.3f]: %s%s %s -> %s", since_epoch, node.getShortDescription().c_str(), - &whitespaces[std::min(ws_count, node.getShortDescription().size())], + printf("[%.3f]: %s%s %s -> %s", since_epoch, node.name().c_str(), + &whitespaces[std::min(ws_count, node.name().size())], toStr(prev_status, true).c_str(), toStr(status, true).c_str()); std::cout << std::endl; }