17 #include <QtCore/QObject> 18 #include <QtCore/QString> 19 #include <QtCore/QScopedPointer> 30 class HardwareAbstractionInterface;
31 class OutputDeviceFileInterface;
50 Status status()
const override;
52 int minControl()
const override;
54 int maxControl()
const override;
57 int power()
const override;
60 int frequency()
const;
65 void powerOff()
override;
73 void setPower(
int power,
bool constrain =
true)
override;
75 void brake(
int = 0)
override { }
77 void setPeriod(
int uSec = 20000)
override;
79 QScopedPointer<trikHal::OutputDeviceFileInterface> mDutyFile;
80 QScopedPointer<trikHal::OutputDeviceFileInterface> mPeriodFile;
81 QScopedPointer<trikHal::OutputDeviceFileInterface> mRunFile;
83 int mCurrentDutyPercent;
Definition: analogSensor.h:23
static const int port
Definition: trikCommunicatorTest.cpp:24
T constrain(T value, T max, T min)
Definition: gyroscopeIndicator.cpp:72
Helper class to track device state (off, starting, ready, stopping, fail).
Definition: deviceState.h:26
Abstract motor. It is differently implemented by different motor types (like servo and power motors)...
Definition: motorInterface.h:26
TRIK servomotor.
Definition: servoMotor.h:37
Status
Device status.
Definition: deviceInterface.h:33
Definition: trikCommunicator.h:27
void brake(int=0) override
Definition: servoMotor.h:75
Definition: brickFactory.h:21
Hardware abstraction, provides devices that are used to communicate with robot hardware or emulate it...
Definition: hardwareAbstractionInterface.h:29