From ed30a2cc57762bc796149b3a11126a8669755c8f Mon Sep 17 00:00:00 2001 From: Valentina Gaggero Date: Fri, 4 Oct 2024 23:31:22 +0200 Subject: [PATCH] Fix the use of logControlBoardQuantities flag --- .../TelemetryDeviceDumper.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/telemetryDeviceDumper/TelemetryDeviceDumper.cpp b/src/telemetryDeviceDumper/TelemetryDeviceDumper.cpp index 992c23f..3d4846b 100644 --- a/src/telemetryDeviceDumper/TelemetryDeviceDumper.cpp +++ b/src/telemetryDeviceDumper/TelemetryDeviceDumper.cpp @@ -332,13 +332,15 @@ bool TelemetryDeviceDumper::openRemapperControlBoard(yarp::os::Searchable& confi } int axes = 0; - ok = ok && remappedControlBoardInterfaces.encs->getAxes(&axes); - if (ok) { - this->resizeBuffers(axes); - } - else { - yError() << "telemetryDeviceDumper: open impossible to use the necessary interfaces in remappedControlBoard"; - return ok; + if (settings.logControlBoardQuantities){ + ok = ok && remappedControlBoardInterfaces.encs->getAxes(&axes); + if (ok) { + this->resizeBuffers(axes); + } + else { + yError() << "telemetryDeviceDumper: open impossible to use the necessary interfaces in remappedControlBoard"; + return ok; + } } return true;