sensorfw
hybrisorientationadaptor.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 HYBRISORIENTATIONADAPTOR_H
22#define HYBRISORIENTATIONADAPTOR_H
23#include "hybrisadaptor.h"
24
25#include <QString>
26#include <QStringList>
27#include "deviceadaptorringbuffer.h"
29
37class HybrisOrientationAdaptor : public HybrisAdaptor
38{
39 Q_OBJECT
40
41public:
42 static DeviceAdaptor* factoryMethod(const QString& id) {
43 return new HybrisOrientationAdaptor(id);
44 }
45 HybrisOrientationAdaptor(const QString& id);
47
49 void stopSensor();
50
51protected:
52 void processSample(const sensors_event_t& data);
53 void init();
54
55private:
56 DeviceAdaptorRingBuffer<CompassData>* buffer;
57 int sensorType;
58 QByteArray powerStatePath;
59
60};
61#endif
Adaptor for hybris compass.
HybrisOrientationAdaptor(const QString &id)
static DeviceAdaptor * factoryMethod(const QString &id)
void processSample(const sensors_event_t &data)
Datatypes for different filters.