YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
IPWMControlTest.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2023-2023 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
6#ifndef IPWMCONTROLTEST_H
7#define IPWMCONTROLTEST_H
8
11#include <catch2/catch_amalgamated.hpp>
12
13using namespace yarp::dev;
14using namespace yarp::os;
15
16namespace yarp::dev::tests
17{
19 {
20 REQUIRE(ipwm != nullptr);
21 REQUIRE(icmd != nullptr);
22
23 bool b = false;
24 int axis = 0;
25 double val = 0;
26
27 b = ipwm->getNumberOfMotors(&axis);
28 CHECK(b);
29
30 b = ipwm->getDutyCycle(0, &val);
31 CHECK(b);
32
33 b = ipwm->getRefDutyCycle(0, &val);
34 CHECK(b);
35
36 b = ipwm->setRefDutyCycle(0,100);
37 CHECK(b);
38 }
39}
40
41#endif
Interface for setting control mode in control board.
Interface for controlling an axis, by sending directly a PWM reference signal to a motor.
Definition IPWMControl.h:23
A mini-server for performing network communication in the background.
void exec_iPwmControl_test_1(IPWMControl *ipwm, IControlMode *icmd)
For streams capable of holding different kinds of content, check what they actually have.
An interface to the operating system, including Port based communication.