|
trikRuntime
|
TRIK power motor. More...
#include <powerMotor.h>


Public Slots | |
| void | setPower (int power, bool constrain=true) override |
| int | power () const override |
| void | powerOff () override |
| int | period () const |
| Returns currently set period of a motor. More... | |
| void | setPeriod (int period) override |
| Sets current motor period. More... | |
| void | brake (int durationMs=500) override |
| Force brake for a short period of time followed by power off. More... | |
Public Slots inherited from trikControl::MotorInterface | |
| virtual void | setPower (int power, bool constrain=true)=0 |
| Sets current motor power to specified value, 0 to stop motor. More... | |
| virtual int | power () const =0 |
| Returns currently set power of a motor. More... | |
| virtual void | powerOff ()=0 |
| Turns off motor. More... | |
| virtual void | brake (int durationMs=500)=0 |
| Force brake state for durationMs and then powerOff() More... | |
| virtual void | setPeriod (int uSec=20000)=0 |
| Set period for PWM generator. More... | |
Public Member Functions | |
| PowerMotor (const QString &port, const trikKernel::Configurer &configurer, MspCommunicatorInterface &communicator) | |
| Constructor. More... | |
| ~PowerMotor () override | |
| Status | status () const override |
| Returns current status of the device. More... | |
| int | minControl () const override |
| Returns minimal value of control accepted by a motor (-90..90, 0..100, for example). More... | |
| int | maxControl () const override |
| Returns maximal value of control accepted by a motor (-90..90, 0..100, for example). More... | |
Public Member Functions inherited from trikControl::DeviceInterface | |
| DeviceInterface ()=default | |
| virtual | ~DeviceInterface ()=default |
Additional Inherited Members | |
Public Types inherited from trikControl::MotorInterface | |
| enum | Type { Type::powerMotor, Type::servoMotor } |
Public Types inherited from trikControl::DeviceInterface | |
| enum | Status { Status::permanentFailure, Status::temporaryFailure, Status::off, Status::starting, Status::ready, Status::stopping } |
| Device status. More... | |
Static Public Member Functions inherited from trikControl::DeviceInterface | |
| static Status | combine (const DeviceInterface &underlying, const DeviceInterface::Status &dependent) |
| Helper method to return status of a device relying on other device to work. More... | |
TRIK power motor.
| PowerMotor::PowerMotor | ( | const QString & | port, |
| const trikKernel::Configurer & | configurer, | ||
| MspCommunicatorInterface & | communicator | ||
| ) |
Constructor.
| port | - port on which this motor is configured. |
| configurer | - configurer object containing preparsed XML files with motor parameters. |
| communicator | - I2C communicator to use to query sensor. |
|
override |
|
overrideslot |
Force brake for a short period of time followed by power off.
|
overridevirtual |
Returns maximal value of control accepted by a motor (-90..90, 0..100, for example).
Implements trikControl::MotorInterface.
|
overridevirtual |
Returns minimal value of control accepted by a motor (-90..90, 0..100, for example).
Implements trikControl::MotorInterface.
|
slot |
Returns currently set period of a motor.
|
overrideslot |
|
overrideslot |
|
overrideslot |
Sets current motor period.
Period of pulses is a time interval between two characteristic points of two adjacent pulses.
|
overrideslot |
|
overridevirtual |
Returns current status of the device.
Implements trikControl::DeviceInterface.