[-]
[+]
|
Changed |
_service:tar_git:sensorfw.changes
|
|
[-]
[+]
|
Changed |
_service:tar_git:sensorfw-qt5-hybris.spec
^
|
|
[-]
[+]
|
Changed |
_service
^
|
@@ -2,7 +2,7 @@
<service name="tar_git">
<param name="url">https://git.merproject.org/mer-core/sensorfw.git</param>
<param name="branch">master</param>
- <param name="revision"/>
+ <param name="revision">47f52bf83127bf213cd8002177e1db459f322b27</param>
<param name="token"/>
<param name="debian">N</param>
<param name="dumb">N</param>
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.3.tar.bz2/adaptors/adaptors.pro
^
|
@@ -7,6 +7,7 @@
SUBDIRS += hybrisalsadaptor
SUBDIRS += hybrisgyroscopeadaptor
SUBDIRS += hybrismagnetometeradaptor
+ SUBDIRS += hybrispressureadaptor
SUBDIRS += hybrisproximityadaptor
SUBDIRS += hybrisorientationadaptor
SUBDIRS += hybrisstepcounteradaptor
@@ -51,6 +52,7 @@
SUBDIRS += hybrisalsadaptor
SUBDIRS += hybrisgyroscopeadaptor
SUBDIRS += hybrismagnetometeradaptor
+ SUBDIRS += hybrispressureadaptor
SUBDIRS += hybrisproximityadaptor
SUBDIRS += hybrisorientationadaptor
SUBDIRS += hybrisstepcounteradaptor
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.3.tar.bz2/adaptors/humidityadaptor/humidityadaptor.cpp
^
|
@@ -1,6 +1,6 @@
/**
- @file alsevdevadaptor.cpp
- @brief Plugin for HumidityAdaptor
+ @file humidityadaptor.cpp
+ @brief Contains HumidityAdaptor
<p>
Copyright (C) 2016 Canonical LTD.
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.3.tar.bz2/adaptors/humidityadaptor/humidityadaptor.h
^
|
@@ -1,6 +1,6 @@
/**
@file humidityadaptor.h
- @brief Contains HumidityAdaptorPlugin.
+ @brief Contains HumidityAdaptor
<p>
Copyright (C) 2016 Canonical LTD.
@@ -22,8 +22,8 @@
License along with Sensord. If not, see <http://www.gnu.org/licenses/>.
</p>
*/
-#ifndef HUMIDITYEVDEVADAPTOR_H
-#define HUMIDITYEVDEVADAPTOR_H
+#ifndef HUMIDITYADAPTOR_H
+#define HUMIDITYADAPTOR_H
#include "inputdevadaptor.h"
#include "deviceadaptorringbuffer.h"
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.3.tar.bz2/adaptors/humidityadaptor/humidityadaptorplugin.cpp
^
|
@@ -1,6 +1,6 @@
/**
- @file humidityadaptor.cpp
- @brief Plugin for HumidityAdaptorPlugin
+ @file humidityadaptorplugin.cpp
+ @brief Plugin for HumidityAdaptor
<p>
Copyright (C) 2016 Canonical LTD.
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.3.tar.bz2/adaptors/humidityadaptor/humidityadaptorplugin.h
^
|
@@ -1,6 +1,6 @@
/**
- @file alsadaptor-evdevplugin.h
- @brief Plugin for HumidityAdaptorPlugin
+ @file humidityadaptorplugin.h
+ @brief Plugin for HumidityAdaptor
<p>
Copyright (C) 2016 Canonical LTD.
|
[-]
[+]
|
Added |
_service:tar_git:hybris-libsensorfw-qt5-0.9.3.tar.bz2/adaptors/hybrispressureadaptor/hybrispressureadaptor.cpp
^
|
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Jolla Ltd
+** Contact: lorn.potter@jollamobile.com
+**
+** Copyright (C) 2017 Matti Lehtimäki
+** Contact: matti.lehtimaki@gmail.com
+**
+** $QT_BEGIN_LICENSE:LGPL$
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QFile>
+#include <QTextStream>
+
+#include "hybrispressureadaptor.h"
+#include "logging.h"
+#include "datatypes/utils.h"
+#include <hardware/sensors.h>
+#include "config.h"
+
+HybrisPressureAdaptor::HybrisPressureAdaptor(const QString& id) :
+ HybrisAdaptor(id,SENSOR_TYPE_PRESSURE)
+{
+ buffer = new DeviceAdaptorRingBuffer<TimedUnsigned>(1);
+ setAdaptedSensor("pressure", "Internal ambient pressure sensor values", buffer);
+ setDescription("Hybris pressure");
+ powerStatePath = Config::configuration()->value("pressure/powerstate_path").toByteArray();
+ if (!powerStatePath.isEmpty() && !QFile::exists(powerStatePath))
+ {
+ sensordLogW() << "Path does not exists: " << powerStatePath;
+ powerStatePath.clear();
+ }
+}
+
+HybrisPressureAdaptor::~HybrisPressureAdaptor()
+{
+ delete buffer;
+}
+
+bool HybrisPressureAdaptor::startSensor()
+{
+ if(!powerStatePath.isEmpty())
+ writeToFile(powerStatePath, "1");
+ if (!(HybrisAdaptor::startSensor()))
+ return false;
+
+ sensordLogD() << "Hybris HybrisPressureAdaptor start\n";
+ return true;
+}
+
+void HybrisPressureAdaptor::stopSensor()
+{
+ if(!powerStatePath.isEmpty())
+ writeToFile(powerStatePath, "0");
+ HybrisAdaptor::stopSensor();
+ sensordLogD() << "Hybris HybrisPressureAdaptor stop\n";
+}
+
+void HybrisPressureAdaptor::processSample(const sensors_event_t& data)
+{
+ TimedUnsigned *d = buffer->nextSlot();
+ d->timestamp_ = quint64(data.timestamp * .001);
+ d->value_ = data.pressure * 100;//From hPa to Pa
+ buffer->commit();
+ buffer->wakeUpReaders();
+}
+
+void HybrisPressureAdaptor::init()
+{
+}
|
[-]
[+]
|
Added |
_service:tar_git:hybris-libsensorfw-qt5-0.9.3.tar.bz2/adaptors/hybrispressureadaptor/hybrispressureadaptor.h
^
|
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Jolla Ltd
+** Contact: lorn.potter@jollamobile.com
+**
+** Copyright (C) 2017 Matti Lehtimäki
+** Contact: matti.lehtimaki@gmail.com
+**
+** $QT_BEGIN_LICENSE:LGPL$
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef HYBRISPRESSUREADAPTOR_H
+#define HYBRISPRESSUREADAPTOR_H
+#include "hybrisadaptor.h"
+
+#include <QString>
+#include <QStringList>
+#include <linux/input.h>
+#include "datatypes/timedunsigned.h"
+#include "deviceadaptorringbuffer.h"
+#include <QTime>
+
+/**
+ * @brief Adaptor for hybris pressure sensor.
+ *
+ * Adaptor for internal pressure sensor. Provides the amount of ambient
+ * pressure detected by the device. Uses hybris sensor daemon driver interface.
+ *
+ * Value output frequency depends on driver decision - only changed values
+ * are pushed out of driver.
+ *
+ */
+class HybrisPressureAdaptor : public HybrisAdaptor
+{
+ Q_OBJECT
+
+public:
+ static DeviceAdaptor* factoryMethod(const QString& id) {
+ return new HybrisPressureAdaptor(id);
+ }
+ HybrisPressureAdaptor(const QString& id);
+ ~HybrisPressureAdaptor();
+
+ bool startSensor();
+ void stopSensor();
+
+protected:
+ void processSample(const sensors_event_t& data);
+ void init();
+
+private:
+ DeviceAdaptorRingBuffer<TimedUnsigned>* buffer;
+ QByteArray powerStatePath;
+
+};
+#endif
|
[-]
[+]
|
Added |
_service:tar_git:hybris-libsensorfw-qt5-0.9.3.tar.bz2/adaptors/hybrispressureadaptor/hybrispressureadaptor.pro
^
|
@@ -0,0 +1,13 @@
+TARGET = hybrispressureadaptor
+
+HEADERS += hybrispressureadaptor.h \
+ hybrispressureadaptorplugin.h
+
+SOURCES += hybrispressureadaptor.cpp \
+ hybrispressureadaptorplugin.cpp
+LIBS+= -L../../core -lhybrissensorfw-qt5
+
+include(../adaptor-config.pri )
+config_hybris {
+ INCLUDEPATH+=/usr/include/android
+}
|
[-]
[+]
|
Added |
_service:tar_git:hybris-libsensorfw-qt5-0.9.3.tar.bz2/adaptors/hybrispressureadaptor/hybrispressureadaptorplugin.cpp
^
|
@@ -0,0 +1,37 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Jolla Ltd
+** Contact: lorn.potter@jollamobile.com
+**
+** Copyright (C) 2017 Matti Lehtimäki
+** Contact: matti.lehtimaki@gmail.com
+**
+** $QT_BEGIN_LICENSE:LGPL$
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "hybrispressureadaptorplugin.h"
+#include "hybrispressureadaptor.h"
+#include "sensormanager.h"
+#include "logging.h"
+
+void HybrisPressureAdaptorPlugin::Register(class Loader&)
+{
+ sensordLogD() << "registering hybrispressureadaptor";
+ SensorManager& sm = SensorManager::instance();
+ sm.registerDeviceAdaptor<HybrisPressureAdaptor>("pressureadaptor");
+}
+
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
+Q_EXPORT_PLUGIN2(hybrispressureadaptor, HybrisPressureAdaptorPlugin)
+#endif
|
[-]
[+]
|
Added |
_service:tar_git:hybris-libsensorfw-qt5-0.9.3.tar.bz2/adaptors/hybrispressureadaptor/hybrispressureadaptorplugin.h
^
|
@@ -0,0 +1,39 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Jolla Ltd
+** Contact: lorn.potter@jollamobile.com
+**
+** Copyright (C) 2017 Matti Lehtimäki
+** Contact: matti.lehtimaki@gmail.com
+**
+** $QT_BEGIN_LICENSE:LGPL$
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef HYBRISPRESSUREADAPTORPLUGIN_H
+#define HYBRISPRESSUREADAPTORPLUGIN_H
+
+#include "plugin.h"
+
+class HybrisPressureAdaptorPlugin : public Plugin
+{
+ Q_OBJECT
+#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
+ Q_PLUGIN_METADATA(IID "com.nokia.SensorService.Plugin/1.0")
+#endif
+
+private:
+ void Register(class Loader& l);
+};
+
+#endif
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.3.tar.bz2/adaptors/pressureadaptor/pressureadaptor.cpp
^
|
@@ -1,6 +1,6 @@
/**
@file pressureadaptor.cpp
- @brief Plugin for PressureAdaptor
+ @brief Contains PressureAdaptor
<p>
Copyright (C) 2016 Canonical, Ltd.
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.3.tar.bz2/adaptors/pressureadaptor/pressureadaptor.h
^
|
@@ -22,8 +22,8 @@
License along with Sensord. If not, see <http://www.gnu.org/licenses/>.
</p>
*/
-#ifndef PRESSUREEVDEVADAPTOR_H
-#define PRESSUREEVDEVADAPTOR_H
+#ifndef PRESSUREADAPTOR_H
+#define PRESSUREADAPTOR_H
#include "inputdevadaptor.h"
#include "deviceadaptorringbuffer.h"
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.3.tar.bz2/adaptors/pressureadaptor/pressureadaptorplugin.cpp
^
|
@@ -1,6 +1,6 @@
/**
- @file alsadaptorplugin-sysfs.cpp
- @brief Plugin for ALSAdaptorSysfs
+ @file pressureadaptorplugin.cpp
+ @brief Plugin for PressureAdaptor
<p>
Copyright (C) 2009-2010 Nokia Corporation
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.3.tar.bz2/adaptors/pressureadaptor/pressureadaptorplugin.h
^
|
@@ -1,6 +1,6 @@
/**
- @file pressureadaptor.h
- @brief Plugin for PressureAdaptorPlugin
+ @file pressureadaptorplugin.h
+ @brief Plugin for PressureAdaptor
<p>
Copyright (C) 2016 Canonical, Ltd.
@@ -23,8 +23,8 @@
</p>
*/
-#ifndef ALSADAPTOR_EVDEVPLUGIN_H
-#define ALSADAPTOR_EVDEVPLUGIN_H
+#ifndef PRESSUREADAPTOR_PLUGIN_H
+#define PRESSUREADAPTOR_PLUGIN_H
#include "plugin.h"
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.3.tar.bz2/adaptors/temperatureadaptor/temperatureadaptor.cpp
^
|
@@ -1,6 +1,6 @@
/**
@file temperatureadaptor.cpp
- @brief Plugin for TemperatureAdaptor
+ @brief Contains TemperatureAdaptor
<p>
Copyright (C) 2016 Canonical, Ltd.
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.3.tar.bz2/adaptors/temperatureadaptor/temperatureadaptor.h
^
|
@@ -1,6 +1,6 @@
/**
@file temperatureadaptor.h
- @brief Contains TemperatureAdaptor.
+ @brief Contains TemperatureAdaptor
<p>
Copyright (C) 2016 Canonical, Ltd.
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.3.tar.bz2/adaptors/temperatureadaptor/temperatureadaptorplugin.cpp
^
|
@@ -1,6 +1,6 @@
/**
@file temperatureadaptorplugin.cpp
- @brief Plugin for TemperatureAdaptorPlugin
+ @brief Plugin for TemperatureAdaptor
<p>
Copyright (C) 2016 Canonical, Ltd.
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.3.tar.bz2/adaptors/temperatureadaptor/temperatureadaptorplugin.h
^
|
@@ -1,6 +1,6 @@
/**
- @file alsadaptor-evdevplugin.h
- @brief Plugin for TemperatureAdaptorPlugin
+ @file temperatureadaptorplugin.h
+ @brief Plugin for TemperatureAdaptor
<p>
Copyright (C) 2009-2010 Nokia Corporation
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.3.tar.bz2/config/sensord-hybris.conf
^
|
@@ -6,6 +6,7 @@
gyroscopeadaptor = hybrisgyroscopeadaptor
orientationadaptor = hybrisorientationadaptor
stepcounteradaptor = hybrisstepcounteradaptor
+pressureadaptor = hybrispressureadaptor
[magnetometer]
scale_coefficient = 1
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.3.tar.bz2/sensors/humiditysensor/humiditysensor_a.h
^
|
@@ -1,6 +1,6 @@
/**
@file humiditysensor_a.h
- @brief D-Bus adaptor for ALSSensor
+ @brief D-Bus adaptor for HumiditySensor
<p>
Copyright (C) 2016 Canonical LTD.
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.3.tar.bz2/sensors/lidsensor/lidplugin.cpp
^
|
@@ -1,6 +1,6 @@
/**
@file LidPlugin.cpp
- @brief Plugin for ALSSensor
+ @brief Plugin for LidSensor
<p>
Copyright (C) 2016 Canonical, Ltd.
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.3.tar.bz2/sensors/pressuresensor/pressureplugin.cpp
^
|
@@ -1,6 +1,6 @@
/**
@file PressurePlugin.cpp
- @brief Plugin for ALSSensor
+ @brief Plugin for PressureSensor
<p>
Copyright (C) 2016 Canonical LTD.
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.3.tar.bz2/sensors/pressuresensor/pressureplugin.h
^
|
@@ -1,6 +1,6 @@
/**
- @file alsplugin.h
- @brief Plugin for ALSSensor
+ @file pressureplugin.h
+ @brief Plugin for PressureSensor
<p>
Copyright (C) 2016 Canonical LTD.
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.3.tar.bz2/sensors/pressuresensor/pressuresensor.cpp
^
|
@@ -36,7 +36,7 @@
{
SensorManager& sm = SensorManager::instance();
- pressureAdaptor_ = sm.requestDeviceAdaptor("alsadaptor");
+ pressureAdaptor_ = sm.requestDeviceAdaptor("pressureadaptor");
if (!pressureAdaptor_) {
setValid(false);
return;
@@ -49,20 +49,20 @@
// Create buffers for filter chain
filterBin_ = new Bin;
- filterBin_->add(pressureReader_, "als");
+ filterBin_->add(pressureReader_, "pressure");
filterBin_->add(outputBuffer_, "buffer");
- filterBin_->join("als", "source", "buffer", "sink");
+ filterBin_->join("pressure", "source", "buffer", "sink");
// Join datasources to the chain
- connectToSource(pressureAdaptor_, "als", pressureReader_);
+ connectToSource(pressureAdaptor_, "pressure", pressureReader_);
marshallingBin_ = new Bin;
marshallingBin_->add(this, "sensorchannel");
outputBuffer_->join(this);
- setDescription("ambient light intensity in lux");
+ setDescription("ambient pressure in pascals");
setRangeSource(pressureAdaptor_);
addStandbyOverrideSource(pressureAdaptor_);
setIntervalSource(pressureAdaptor_);
@@ -77,7 +77,7 @@
disconnectFromSource(pressureAdaptor_, "pressure", pressureReader_);
- sm.releaseDeviceAdaptor("alsadaptor");
+ sm.releaseDeviceAdaptor("pressureadaptor");
delete pressureReader_;
delete outputBuffer_;
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.3.tar.bz2/sensors/pressuresensor/pressuresensor_a.h
^
|
@@ -23,8 +23,8 @@
</p>
*/
-#ifndef ALS_SENSOR_H
-#define ALS_SENSOR_H
+#ifndef PRESSURE_SENSOR_H
+#define PRESSURE_SENSOR_H
#include <QtDBus/QtDBus>
#include <QObject>
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.3.tar.bz2/sensors/temperaturesensor/temperaturesensor.cpp
^
|
@@ -53,7 +53,7 @@
filterBin_->add(temperatureReader_, "temperature");
filterBin_->add(outputBuffer_, "buffer");
- filterBin_->join("als", "source", "buffer", "sink");
+ filterBin_->join("temperature", "source", "buffer", "sink");
// Join datasources to the chain
connectToSource(temperatureAdaptor_, "temperature", temperatureReader_);
@@ -63,7 +63,7 @@
outputBuffer_->join(this);
- setDescription("ambient temperature in celcious");
+ setDescription("ambient temperature in celsius");
setRangeSource(temperatureAdaptor_);
addStandbyOverrideSource(temperatureAdaptor_);
setIntervalSource(temperatureAdaptor_);
@@ -78,7 +78,7 @@
disconnectFromSource(temperatureAdaptor_, "temperature", temperatureReader_);
- sm.releaseDeviceAdaptor("alsadaptor");
+ sm.releaseDeviceAdaptor("temperatureadaptor");
delete temperatureReader_;
delete outputBuffer_;
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.3.tar.bz2/sensors/temperaturesensor/temperaturesensor_a.h
^
|
@@ -23,8 +23,8 @@
</p>
*/
-#ifndef ALS_SENSOR_H
-#define ALS_SENSOR_H
+#ifndef TEMPERATURE_SENSOR_H
+#define TEMPERATURE_SENSOR_H
#include <QtDBus/QtDBus>
#include <QObject>
|