17 #include <QtCore/QObject> 18 #include <QtCore/QString> 19 #include <QtCore/QReadWriteLock> 20 #include <QtCore/QVector> 47 void init(
bool showOnDisplay);
61 QString sensorName()
const override;
63 void onNewData(
const QString &dataLine)
override;
66 QVector<int> mReading;
69 QVector<int> mReadingBuffer{0, 0, 0};
72 qreal mToleranceFactor = 1.0;
75 bool mShowOnDisplay =
true;
78 QVector<int> mDetectParametersBuffer{0, 0, 0, 0, 0, 0};
81 QVector<int> mDetectParameters{0, 0, 0, 0, 0, 0};
void detect()
Detects the color of an object in center of current frame and memorizes it.
Definition: objectSensorWorker.cpp:36
QVector< int > read()
Returns current raw x coordinate of detected object.
Definition: objectSensorWorker.cpp:41
Helper class to track device state (off, starting, ready, stopping, fail).
Definition: deviceState.h:26
Worker object that processes object sensor output and updates stored reading.
Definition: objectSensorWorker.h:28
ObjectSensorWorker(const QString &script, const QString &inputFile, const QString &outputFile, qreal toleranceFactor, DeviceState &state, trikHal::HardwareAbstractionInterface &hardwareAbstraction)
Constructor.
Definition: objectSensorWorker.cpp:19
QVector< int > getDetectParameters() const
Get values returned by last "detect" operation.
Definition: objectSensorWorker.cpp:46
~ObjectSensorWorker() override
Definition: objectSensorWorker.cpp:26
Definition: trikCommunicator.h:27
void init()
Launch sensor.
Definition: abstractVirtualSensorWorker.cpp:61
Base class for all virtual sensor workers.
Definition: abstractVirtualSensorWorker.h:38
script
Definition: system.py:83
Hardware abstraction, provides devices that are used to communicate with robot hardware or emulate it...
Definition: hardwareAbstractionInterface.h:29