17 #include <QtCore/QObject> 18 #include <QtCore/QString> 19 #include <QtCore/QReadWriteLock> 20 #include <QtCore/QVector> 48 void init(
bool showOnDisplay);
53 QVector<int>
read(
int m,
int n);
56 QString sensorName()
const override;
58 void onNewData(
const QString &dataLine)
override;
62 QVector<QVector<QVector<int>>> mReading;
65 QVector<QVector<QVector<int>>> mReadingBuffer;
68 bool mShowOnDisplay =
true;
Helper class to track device state (off, starting, ready, stopping, fail).
Definition: deviceState.h:26
Worker object that processes color sensor output and updates stored reading.
Definition: colorSensorWorker.h:28
QVector< int > read(int m, int n)
Returns dominant color in given cell of a grid as a vector [R; G; B] in RGB color scale...
Definition: colorSensorWorker.cpp:61
Definition: trikCommunicator.h:27
~ColorSensorWorker() override
Definition: colorSensorWorker.cpp:51
void init()
Launch sensor.
Definition: abstractVirtualSensorWorker.cpp:61
ColorSensorWorker(const QString &script, const QString &inputFile, const QString &outputFile, int m, int n, DeviceState &state, trikHal::HardwareAbstractionInterface &hardwareAbstraction)
Constructor.
Definition: colorSensorWorker.cpp:23
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