[-]
[+]
|
Changed |
_service:tar_git:sensorfw.changes
|
|
[-]
[+]
|
Changed |
_service:tar_git:sensorfw-qt5-hybris.spec
^
|
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.4.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.4.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.4.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.4.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.4.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.4.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.4.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.4.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.4.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.4.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.4.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.4.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.4.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.4.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.4.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.4.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.4.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.4.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.4.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.4.tar.bz2/core/hybrisadaptor.cpp
^
|
@@ -28,6 +28,10 @@
#include <hardware/hardware.h>
#include <hardware/sensors.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <errno.h>
+
#ifndef SENSOR_TYPE_ACCELEROMETER
#define SENSOR_TYPE_ACCELEROMETER (1)
#endif
@@ -119,11 +123,29 @@
sensorsCount = module->get_sensors_list(module, &sensorList);
for (int i = 0 ; i < sensorsCount ; i++) {
+ bool use = true;
+ // Assumption: The primary sensor variants that we want to
+ // use are listed before the secondary ones that we want
+ // to ignore -> Use the 1st entry found for each sensor type.
+ if( sensorMap.contains(sensorList[i].type) ) {
+ use = false;
+ }
+
// some devices have compass and compass raw,
// ignore compass raw. compass has range 360
- if (sensorList[i].type != SENSOR_TYPE_ORIENTATION
- || sensorList[i].maxRange == 360)
- sensorMap.insert(sensorList[i].type, i);
+ if (sensorList[i].type == SENSOR_TYPE_ORIENTATION &&
+ sensorList[i].maxRange != 360) {
+ use = false;
+ }
+
+ sensordLogW() << Q_FUNC_INFO
+ << (use ? "SELECT" : "IGNORE")
+ << "type:" << sensorList[i].type
+ << "name:" << (sensorList[i].name ?: "n/a");
+
+ if (use) {
+ sensorMap.insert(sensorList[i].type, i);
+ }
}
}
@@ -599,6 +621,29 @@
start();
}
+static void ObtainTemporaryWakeLock()
+{
+ static bool triedToOpen = false;
+ static int wakeLockFd = -1;
+
+ if (!triedToOpen) {
+ triedToOpen = true;
+ wakeLockFd = ::open("/sys/power/wake_lock", O_RDWR);
+ if (wakeLockFd == -1) {
+ sensordLogW() << "wake locks not available:" << ::strerror(errno);
+ }
+ }
+
+ if (wakeLockFd != -1) {
+ sensordLogD() << "wake lock to guard sensor data io";
+ static const char m[] = "sensorfwd_pass_data 1000000000\n";
+ if( ::write(wakeLockFd, m, sizeof m - 1) == -1 ) {
+ sensordLogW() << "wake locking failed:" << ::strerror(errno);
+ ::close(wakeLockFd), wakeLockFd = -1;
+ }
+ }
+}
+
void HybrisAdaptorReader::run()
{
int err = 0;
@@ -610,6 +655,7 @@
sensordLogW() << "poll() failed" << strerror(-err);
QThread::msleep(1000);
} else {
+ bool blockSuspend = false;
bool errorInInput = false;
for (int i = 0; i < numberOfEvents; i++) {
@@ -619,9 +665,17 @@
sensordLogW()<< QString("incorrect event version (version=%1, expected=%2").arg(data.version).arg(sizeof(sensors_event_t));
errorInInput = true;
}
+ if (data.type == SENSOR_TYPE_PROXIMITY) {
+ blockSuspend = true;
+ }
hybrisManager()->processSample(data);
}
+
+ if (blockSuspend) {
+ ObtainTemporaryWakeLock();
+ }
+
if (errorInInput)
QThread::msleep(50);
}
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.4.tar.bz2/sensord/main.cpp
^
|
@@ -33,6 +33,8 @@
#include <QtCore/QCoreApplication>
#include <QtCore/QDebug>
+#include <systemd/sd-daemon.h>
+
#include <signal.h>
#include <iostream>
#include <errno.h>
@@ -146,7 +148,7 @@
sensordLogC() << "Failed to create a daemon: " << strerror(errno);
exit(EXIT_FAILURE);
} else if (pid > 0) {
- sensordLogW() << "Created a daemon";
+ sensordLogD() << "Created a daemon";
_exit(EXIT_SUCCESS);
}
}
@@ -175,6 +177,11 @@
exit(EXIT_FAILURE);
}
+ if (parser.notifySystemd())
+ {
+ sd_notify(0, "READY=1");
+ }
+
int ret = app.exec();
sensordLogD() << "Exiting...";
Config::close();
@@ -185,6 +192,7 @@
{
qDebug() << "Usage: sensord [OPTIONS]";
qDebug() << " -d, --daemon Detach from terminal and run as daemon.\n";
+ qDebug() << " -s, --systemd Notify systemd when ready.\n";
qDebug() << " -l=N, --log-level=<level> Use given logging level. Messages are logged for";
qDebug() << " the given and higher priority levels. Level";
qDebug() << " can also be notched up by sending SIGUSR1 to";
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.4.tar.bz2/sensord/parser.cpp
^
|
@@ -33,6 +33,7 @@
configFile_(false),
configDir_(false),
daemon_(false),
+ systemd_(false),
magnetometerCalibration_(true),
configFilePath_(""),
logLevel_(QtWarningMsg)
@@ -81,7 +82,9 @@
else if (opt.startsWith("--no-magnetometer-bg-calibration"))
magnetometerCalibration_ = false;
else if (opt.startsWith("-d") || opt.startsWith("--daemon"))
- daemon_ = true;
+ daemon_ = true, systemd_ = false;
+ else if (opt.startsWith("-s") || opt.startsWith("--systemd"))
+ systemd_ = true, daemon_ = false;
else if (opt.startsWith("-h") || opt.startsWith("--help"))
printHelp_ = true;
else if (opt.startsWith("-"))
@@ -134,3 +137,8 @@
return daemon_;
}
+bool Parser::notifySystemd() const
+{
+ return systemd_;
+}
+
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.4.tar.bz2/sensord/parser.h
^
|
@@ -48,6 +48,7 @@
bool contextInfo() const;
bool magnetometerCalibration() const;
bool createDaemon() const;
+ bool notifySystemd() const;
private:
void parsingCommandLine(QStringList arguments);
@@ -57,6 +58,7 @@
bool configFile_;
bool configDir_;
bool daemon_;
+ bool systemd_;
bool magnetometerCalibration_;
QString configFilePath_;
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.4.tar.bz2/sensord/sensord.pro
^
|
@@ -8,6 +8,8 @@
CONFIG += console \
link_pkgconfig
+PKGCONFIG += libsystemd
+
SENSORFW_INCLUDEPATHS = .. \
../include \
../filters \
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.9.4.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.4.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.4.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.4.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.4.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.4.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.4.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.4.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>
|
[-]
[+]
|
Changed |
_service:tar_git:sensorfwd.service
^
|
@@ -5,9 +5,8 @@
Conflicts=actdead.target
[Service]
-Type=forking
-BusName=com.nokia.SensorService
-ExecStart=/usr/sbin/sensorfwd -c=/etc/sensorfw/primaryuse.conf -d --log-level=warning --no-magnetometer-bg-calibration
+Type=notify
+ExecStart=/usr/sbin/sensorfwd -c=/etc/sensorfw/primaryuse.conf --systemd --log-level=warning --no-magnetometer-bg-calibration
ExecReload=/bin/kill -HUP $MAINPID
Restart=always
RestartSec=1
|