1// Copyright (C) 2016 Alexander Volkov <a.volkov@rusbitech.ru>
2// Copyright (C) 2016 The Qt Company Ltd.
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
5#ifndef IIOSENSORPROXY_COMPASS_H
6#define IIOSENSORPROXY_COMPASS_H
7
8#include "iiosensorproxysensorbase.h"
9
10#include <qcompass.h>
11
12class NetHadessSensorProxyCompassInterface;
13
14class IIOSensorProxyCompass : public IIOSensorProxySensorBase
15{
16 Q_OBJECT
17public:
18 static char const * const id;
19
20 IIOSensorProxyCompass(QSensor *sensor);
21 ~IIOSensorProxyCompass();
22
23 void start() override;
24 void stop() override;
25
26protected:
27 void updateProperties(const QVariantMap &changedProperties) override;
28
29private:
30 void updateAzimuth(double azimuth);
31
32 QCompassReading m_reading;
33 NetHadessSensorProxyCompassInterface *m_sensorProxyInterface;
34};
35
36#endif // IIOSENSORPROXY_COMPASS_H
37

source code of qtsensors/src/plugins/sensors/iio-sensor-proxy/iiosensorproxycompass.h