From 1d4f12645e895c2974df21fb39a9c7b15a07dc61 Mon Sep 17 00:00:00 2001 From: armar-user <armar6@kit.edu> Date: Thu, 10 Mar 2022 15:46:02 +0100 Subject: [PATCH] Fix error message for absolute encoder error in imagine board (untested) --- source/devices/ethercat/common/imagine_board/Data.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/devices/ethercat/common/imagine_board/Data.cpp b/source/devices/ethercat/common/imagine_board/Data.cpp index d00db052..3c34bd44 100644 --- a/source/devices/ethercat/common/imagine_board/Data.cpp +++ b/source/devices/ethercat/common/imagine_board/Data.cpp @@ -31,7 +31,7 @@ // armarx #include <RobotAPI/libraries/core/math/MathUtils.h> - +#include <bitset> namespace devices::ethercat::common::imagine_board { @@ -143,7 +143,7 @@ namespace devices::ethercat::common::imagine_board // Error or Warning bit is set std::uint8_t error_and_warnings = static_cast<std::uint8_t>((raw_abs_encoder_value_bytes[2] & 0b00000011) << 6u) | static_cast<std::uint8_t>((raw_abs_encoder_value_bytes[3] & ~0b00000011) >> 2u); - ARMARX_RT_LOGF_ERROR("%s: Absolute Encoder Error and Warning bits: %b", d.robotNode->getName().c_str(), error_and_warnings); +ARMARX_ERROR << deactivateSpam(1) << d.robotNode->getName() << "Absolute Encoder der Error and Warning bits" << std::bitset<8>(error_and_warnings); } } -- GitLab