sensorfw
hybrisgyroscopeadaptor.h
Go to the documentation of this file.
1/****************************************************************************
2**
3** Copyright (C) 2013 Jolla Ltd
4** Contact: lorn.potter@jollamobile.com
5**
6**
7** $QT_BEGIN_LICENSE:LGPL$
8**
9** GNU Lesser General Public License Usage
10** Alternatively, this file may be used under the terms of the GNU Lesser
11** General Public License version 2.1 as published by the Free Software
12** Foundation and appearing in the file LICENSE.LGPL included in the
13** packaging of this file. Please review the following information to
14** ensure the GNU Lesser General Public License version 2.1 requirements
15** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
16**
17** $QT_END_LICENSE$
18**
19****************************************************************************/
20
21#ifndef HYBRISGYROSCOPEADAPTOR_H
22#define HYBRISGYROSCOPEADAPTOR_H
23#include "hybrisadaptor.h"
24
25#include <QString>
26#include <QStringList>
27#include <linux/input.h>
28#include "deviceadaptorringbuffer.h"
30#include <QTime>
31
39class HybrisGyroscopeAdaptor : public HybrisAdaptor
40{
41 Q_OBJECT
42
43public:
44 static DeviceAdaptor* factoryMethod(const QString& id) {
45 return new HybrisGyroscopeAdaptor(id);
46 }
47 HybrisGyroscopeAdaptor(const QString& id);
49
51 void stopSensor();
52
53protected:
54 void processSample(const sensors_event_t& data);
55 void init();
56
57private:
58 DeviceAdaptorRingBuffer<TimedXyzData>* buffer;
59 int sensorType;
60 QByteArray powerStatePath;
61
62};
63#endif
Adaptor for hybris gyroscope.
HybrisGyroscopeAdaptor(const QString &id)
static DeviceAdaptor * factoryMethod(const QString &id)
void processSample(const sensors_event_t &data)
Datatypes for different filters.