File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -93,8 +93,13 @@ class ControlBoardPositionFixture : public testing::Test
9393 ASSERT_TRUE (iControlMode->setControlMode (0 , VOCAB_CM_POSITION ));
9494
9595 // Print number of joint configured
96+ #if (YARP_VERSION_MAJOR > 3)
97+ size_t nJointsConfigured{};
98+ ASSERT_TRUE (iPositionControl->getAxes (nJointsConfigured));
99+ #else
96100 int nJointsConfigured{};
97101 ASSERT_TRUE (iPositionControl->getAxes (&nJointsConfigured));
102+ #endif
98103 std::cerr << " Number of joints configured: " << nJointsConfigured << std::endl;
99104
100105 configured = true ;
@@ -179,8 +184,13 @@ class ControlBoardPositionCoupledPendulumFixture : public ::testing::Test
179184 ASSERT_TRUE (iControlMode->setControlMode (1 , VOCAB_CM_POSITION ));
180185
181186 // Print number of joint configured
187+ #if (YARP_VERSION_MAJOR > 3)
188+ size_t nJointsConfigured{};
189+ ASSERT_TRUE (iPositionControl->getAxes (nJointsConfigured));
190+ #else
182191 int nJointsConfigured{};
183192 ASSERT_TRUE (iPositionControl->getAxes (&nJointsConfigured));
193+ #endif
184194 std::cerr << " Number of joints configured: " << nJointsConfigured << std::endl;
185195
186196 configured = true ;
Original file line number Diff line number Diff line change @@ -93,8 +93,13 @@ class ControlBoardPositionDirectFixture : public ::testing::Test
9393 ASSERT_TRUE (iControlMode->setControlMode (0 , VOCAB_CM_POSITION_DIRECT ));
9494
9595 // Print number of joint configured
96+ #if (YARP_VERSION_MAJOR > 3)
97+ size_t nJointsConfigured{};
98+ ASSERT_TRUE (iPositionDirectControl->getAxes (nJointsConfigured));
99+ #else
96100 int nJointsConfigured{};
97101 ASSERT_TRUE (iPositionDirectControl->getAxes (&nJointsConfigured));
102+ #endif
98103 std::cerr << " Number of joints configured: " << nJointsConfigured << std::endl;
99104
100105 configured = true ;
@@ -195,8 +200,13 @@ class ControlBoardPositionDirectCoupledPendulumFixture : public ::testing::Test
195200 ASSERT_TRUE (iControlMode->setControlMode (2 , VOCAB_CM_POSITION_DIRECT ));
196201
197202 // Print number of joint configured
203+ #if (YARP_VERSION_MAJOR > 3)
204+ size_t nJointsConfigured{};
205+ ASSERT_TRUE (iPositionDirectControl->getAxes (nJointsConfigured));
206+ #else
198207 int nJointsConfigured{};
199208 ASSERT_TRUE (iPositionDirectControl->getAxes (&nJointsConfigured));
209+ #endif
200210 std::cerr << " Number of joints configured: " << nJointsConfigured << std::endl;
201211
202212 configured = true ;
You can’t perform that action at this time.
0 commit comments