From 8c4297b7b850ff7f6ffef354ccb0cc8adad1ea61 Mon Sep 17 00:00:00 2001 From: Gabriele Sisinna Date: Mon, 23 May 2022 11:42:31 +0200 Subject: [PATCH] Fix plot_enabled parameter check --- src/opticalEncoders-drift/opticalEncodersDrift.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/opticalEncoders-drift/opticalEncodersDrift.cpp b/src/opticalEncoders-drift/opticalEncodersDrift.cpp index 08c73251..b9a59a9d 100644 --- a/src/opticalEncoders-drift/opticalEncodersDrift.cpp +++ b/src/opticalEncoders-drift/opticalEncodersDrift.cpp @@ -99,10 +99,7 @@ bool OpticalEncodersDrift::setup(yarp::os::Property& property) { cycles = property.find("cycles").asInt32(); ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(cycles>=0,"invalid cycles"); - if(property.check("plot_enabled")) - plot = property.find("plot").asBool(); - else - plot = true; + plot = property.find("plot_enabled").asBool(); if(plot) ROBOTTESTINGFRAMEWORK_TEST_REPORT("This test will run gnuplot utility at the end.");