YARP
Yet Another Robot Platform
ControlBoardWrapperPWMControl.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
3  * All rights reserved.
4  *
5  * This software may be modified and distributed under the terms of the
6  * BSD-3-Clause license. See the accompanying LICENSE file for details.
7  */
8 
9 #ifndef YARP_DEV_CONTROLBOARDWRAPPER_CONTROLBOARDWRAPPERPWMCONTROL_H
10 #define YARP_DEV_CONTROLBOARDWRAPPER_CONTROLBOARDWRAPPERPWMCONTROL_H
11 
12 #include <yarp/dev/IPWMControl.h>
13 
15 
16 
18  virtual public ControlBoardWrapperCommon,
20 {
21 public:
22  inline bool getNumberOfMotors(int* num) override { return ControlBoardWrapperCommon::getNumberOfMotors(num); }
23  bool setRefDutyCycle(int j, double v) override;
24  bool setRefDutyCycles(const double* v) override;
25  bool getRefDutyCycle(int j, double* v) override;
26  bool getRefDutyCycles(double* v) override;
27  bool getDutyCycle(int j, double* v) override;
28  bool getDutyCycles(double* v) override;
29 };
30 
31 #endif // YARP_DEV_CONTROLBOARDWRAPPER_CONTROLBOARDWRAPPERPWMCONTROL_H
ControlBoardWrapperPWMControl::getDutyCycle
bool getDutyCycle(int j, double *v) override
Gets the current dutycycle of the output of the amplifier (i.e.
Definition: ControlBoardWrapperPWMControl.cpp:106
ControlBoardWrapperPWMControl::getRefDutyCycles
bool getRefDutyCycles(double *v) override
Gets the last reference sent using the setRefDutyCycles function.
Definition: ControlBoardWrapperPWMControl.cpp:80
ControlBoardWrapperPWMControl::getDutyCycles
bool getDutyCycles(double *v) override
Gets the current dutycycle of the output of the amplifier (i.e.
Definition: ControlBoardWrapperPWMControl.cpp:128
ControlBoardWrapperCommon.h
yarp::dev::IPWMControl
Interface for controlling an axis, by sending directly a PWM reference signal to a motor.
Definition: IPWMControl.h:28
ControlBoardWrapperCommon
Definition: ControlBoardWrapperCommon.h:19
ControlBoardWrapperPWMControl::getRefDutyCycle
bool getRefDutyCycle(int j, double *v) override
Gets the last reference sent using the setRefDutyCycle function.
Definition: ControlBoardWrapperPWMControl.cpp:58
ControlBoardWrapperPWMControl::setRefDutyCycles
bool setRefDutyCycles(const double *v) override
Sets the reference dutycycle for all the motors.
Definition: ControlBoardWrapperPWMControl.cpp:36
ControlBoardWrapperCommon::getNumberOfMotors
bool getNumberOfMotors(int *num)
Definition: ControlBoardWrapperCommon.cpp:289
ControlBoardWrapperPWMControl
Definition: ControlBoardWrapperPWMControl.h:20
ControlBoardWrapperPWMControl::getNumberOfMotors
bool getNumberOfMotors(int *num) override
Retrieves the number of controlled motors from the current physical interface.
Definition: ControlBoardWrapperPWMControl.h:22
ControlBoardWrapperPWMControl::setRefDutyCycle
bool setRefDutyCycle(int j, double v) override
Sets the reference dutycycle to a single motor.
Definition: ControlBoardWrapperPWMControl.cpp:14
IPWMControl.h