Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[config] Rename Config class to SensorFrameworkConfig. Fixes JB#43217
Sensorfwd crashes on exit in h3113 devices (Xperia XA2). This happens
because of Config class related symbol name clash between sensorfwd
and android dynamic loader / libhybris: Destructor from sensorfwd
code base ends up used for cleaning up libhybris objects - which then
leads to segfault.

As runtime loader is what it is, rename "Config" class in sensorfwd
to less generic "SensorFrameworkConfig".

Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com>
  • Loading branch information
spiiroin committed Nov 7, 2018
1 parent 7af22d7 commit 5ee46d8
Show file tree
Hide file tree
Showing 55 changed files with 130 additions and 130 deletions.
4 changes: 2 additions & 2 deletions adaptors/accelerometeradaptor/accelerometeradaptor.cpp
Expand Up @@ -44,8 +44,8 @@ AccelerometerAdaptor::AccelerometerAdaptor(const QString& id) :
accelerometerBuffer_ = new DeviceAdaptorRingBuffer<OrientationData>(1);
setAdaptedSensor("accelerometer", "Internal accelerometer coordinates", accelerometerBuffer_);
setDescription("Input device accelerometer adaptor");
powerStatePath_ = Config::configuration()->value("accelerometer/powerstate_path").toByteArray();
accelMultiplier = Config::configuration()->value("accelerometer/multiplier", QVariant(1)).toReal();
powerStatePath_ = SensorFrameworkConfig::configuration()->value("accelerometer/powerstate_path").toByteArray();
accelMultiplier = SensorFrameworkConfig::configuration()->value("accelerometer/multiplier", QVariant(1)).toReal();
}

AccelerometerAdaptor::~AccelerometerAdaptor()
Expand Down
6 changes: 3 additions & 3 deletions adaptors/alsadaptor-ascii/alsadaptor-ascii.cpp
Expand Up @@ -52,7 +52,7 @@ ALSAdaptorAscii::ALSAdaptorAscii(const QString& id) : SysfsAdaptor(id, SysfsAdap
setDescription("Ambient light");

// Get range from a file, if the path is found in configuration
QString rangeFilePath_ = Config::configuration()->value("als/range_file_path",QVariant("")).toString();
QString rangeFilePath_ = SensorFrameworkConfig::configuration()->value("als/range_file_path",QVariant("")).toString();
if (rangeFilePath_ != "") {
QFile sysFile(rangeFilePath_);

Expand All @@ -66,8 +66,8 @@ ALSAdaptorAscii::ALSAdaptorAscii(const QString& id) : SysfsAdaptor(id, SysfsAdap
sensordLogT() << "Ambient light range: " << range;
}
}
powerStatePath = Config::configuration()->value("als/powerstate_path").toByteArray();
powerMode = Config::configuration()->value("als/mode").toByteArray();
powerStatePath = SensorFrameworkConfig::configuration()->value("als/powerstate_path").toByteArray();
powerMode = SensorFrameworkConfig::configuration()->value("als/mode").toByteArray();
}

ALSAdaptorAscii::~ALSAdaptorAscii()
Expand Down
2 changes: 1 addition & 1 deletion adaptors/alsadaptor-evdev/alsevdevadaptor.cpp
Expand Up @@ -43,7 +43,7 @@ ALSAdaptorEvdev::ALSAdaptorEvdev(const QString& id) :
alsBuffer_ = new DeviceAdaptorRingBuffer<TimedUnsigned>(1);
setAdaptedSensor("als", "Internal ambient light sensor lux values", alsBuffer_);
setDescription("Input device als adaptor");
powerStatePath_ = Config::configuration()->value("als/powerstate_path").toByteArray();
powerStatePath_ = SensorFrameworkConfig::configuration()->value("als/powerstate_path").toByteArray();
introduceAvailableDataRange(DataRange(0, 4095, 1));
setDefaultInterval(10);
}
Expand Down
4 changes: 2 additions & 2 deletions adaptors/alsadaptor/alsadaptor.cpp
Expand Up @@ -62,8 +62,8 @@ ALSAdaptor::ALSAdaptor(const QString& id):
alsBuffer_ = new DeviceAdaptorRingBuffer<TimedUnsigned>(1);
setAdaptedSensor("als", "Internal ambient light sensor lux values", alsBuffer_);
setDescription("Ambient light");
deviceType_ = (DeviceType)Config::configuration()->value<int>("als/driver_type", DeviceUnknown);
powerStatePath_ = Config::configuration()->value("als/powerstate_path").toByteArray();
deviceType_ = (DeviceType)SensorFrameworkConfig::configuration()->value<int>("als/driver_type", DeviceUnknown);
powerStatePath_ = SensorFrameworkConfig::configuration()->value("als/powerstate_path").toByteArray();

#ifdef SENSORFW_MCE_WATCHER
dbusIfc = new QDBusInterface(MCE_SERVICE, MCE_REQUEST_PATH, MCE_REQUEST_IF,
Expand Down
2 changes: 1 addition & 1 deletion adaptors/gyroscopeadaptor-evdev/gyroevdevadaptor.cpp
Expand Up @@ -43,7 +43,7 @@ GyroAdaptorEvdev::GyroAdaptorEvdev(const QString& id) :
gyroscopeBuffer_ = new DeviceAdaptorRingBuffer<TimedXyzData>(1);
setAdaptedSensor("gyroscope", "Internal gyroscope values", gyroscopeBuffer_);
setDescription("Input device gyroscope adaptor");
powerStatePath_ = Config::configuration()->value("gyroscope/powerstate_path").toByteArray();
powerStatePath_ = SensorFrameworkConfig::configuration()->value("gyroscope/powerstate_path").toByteArray();
// introduceAvailableDataRange(DataRange(0, 4095, 1));
setDefaultInterval(10);
}
Expand Down
2 changes: 1 addition & 1 deletion adaptors/gyroscopeadaptor/gyroscopeadaptor.cpp
Expand Up @@ -41,7 +41,7 @@ GyroscopeAdaptor::GyroscopeAdaptor(const QString& id) :
gyroscopeBuffer_ = new DeviceAdaptorRingBuffer<TimedXyzData>(1);
setAdaptedSensor("gyroscope", "l3g4200dh", gyroscopeBuffer_);
setDescription("Sysfs Gyroscope adaptor (l3g4200dh)");
dataRatePath_ = Config::configuration()->value("gyroscope/path_datarate").toByteArray();
dataRatePath_ = SensorFrameworkConfig::configuration()->value("gyroscope/path_datarate").toByteArray();
}

GyroscopeAdaptor::~GyroscopeAdaptor()
Expand Down
2 changes: 1 addition & 1 deletion adaptors/humidityadaptor/humidityadaptor.cpp
Expand Up @@ -40,7 +40,7 @@ HumidityAdaptor::HumidityAdaptor(const QString& id) :
humidityBuffer_ = new DeviceAdaptorRingBuffer<TimedUnsigned>(1);
setAdaptedSensor("humidity", "Relative Humidity values", humidityBuffer_);
setDescription("Input device humidity adaptor");
powerStatePath_ = Config::configuration()->value("humidity/powerstate_path").toByteArray();
powerStatePath_ = SensorFrameworkConfig::configuration()->value("humidity/powerstate_path").toByteArray();
introduceAvailableDataRange(DataRange(0, 4095, 1));
setDefaultInterval(10);
}
Expand Down
Expand Up @@ -33,7 +33,7 @@ HybrisAccelerometerAdaptor::HybrisAccelerometerAdaptor(const QString& id) :
setAdaptedSensor("accelerometer", "Internal accelerometer coordinates", buffer);

setDescription("Hybris accelerometer");
powerStatePath = Config::configuration()->value("accelerometer/powerstate_path").toByteArray();
powerStatePath = SensorFrameworkConfig::configuration()->value("accelerometer/powerstate_path").toByteArray();
// setDefaultInterval(50);
}

Expand Down
2 changes: 1 addition & 1 deletion adaptors/hybrisalsadaptor/hybrisalsadaptor.cpp
Expand Up @@ -37,7 +37,7 @@ HybrisAlsAdaptor::HybrisAlsAdaptor(const QString& id) :
buffer = new DeviceAdaptorRingBuffer<TimedUnsigned>(1);
setAdaptedSensor("als", "Internal ambient light sensor lux values", buffer);
setDescription("Hybris als");
powerStatePath = Config::configuration()->value("als/powerstate_path").toByteArray();
powerStatePath = SensorFrameworkConfig::configuration()->value("als/powerstate_path").toByteArray();
if (!powerStatePath.isEmpty() && !QFile::exists(powerStatePath))
{
sensordLogW() << "Path does not exists: " << powerStatePath;
Expand Down
2 changes: 1 addition & 1 deletion adaptors/hybrisgyroscopeadaptor/hybrisgyroscopeadaptor.cpp
Expand Up @@ -35,7 +35,7 @@ HybrisGyroscopeAdaptor::HybrisGyroscopeAdaptor(const QString& id) :
setAdaptedSensor("gyroscopeadaptor", "Internal gyroscope coordinates", buffer);

setDescription("Hybris gyroscope");
powerStatePath = Config::configuration()->value("gyroscope/powerstate_path").toByteArray();
powerStatePath = SensorFrameworkConfig::configuration()->value("gyroscope/powerstate_path").toByteArray();
if (!powerStatePath.isEmpty() && !QFile::exists(powerStatePath))
{
sensordLogW() << "Path does not exists: " << powerStatePath;
Expand Down
Expand Up @@ -31,7 +31,7 @@ HybrisMagnetometerAdaptor::HybrisMagnetometerAdaptor(const QString& id) :
setAdaptedSensor("magnetometer", "Internal magnetometer coordinates", buffer);

setDescription("Hybris magnetometer");
powerStatePath = Config::configuration()->value("magnetometer/powerstate_path").toByteArray();
powerStatePath = SensorFrameworkConfig::configuration()->value("magnetometer/powerstate_path").toByteArray();
if (!powerStatePath.isEmpty() && !QFile::exists(powerStatePath))
{
sensordLogW() << "Path does not exists: " << powerStatePath;
Expand Down
Expand Up @@ -48,7 +48,7 @@ HybrisOrientationAdaptor::HybrisOrientationAdaptor(const QString& id) :
setAdaptedSensor("hybrisorientation", "Internal orientation coordinates", buffer);

setDescription("Hybris orientation");
powerStatePath = Config::configuration()->value("orientation/powerstate_path").toByteArray();
powerStatePath = SensorFrameworkConfig::configuration()->value("orientation/powerstate_path").toByteArray();
if (!powerStatePath.isEmpty() && !QFile::exists(powerStatePath))
{
sensordLogW() << "Path does not exists: " << powerStatePath;
Expand Down
2 changes: 1 addition & 1 deletion adaptors/hybrispressureadaptor/hybrispressureadaptor.cpp
Expand Up @@ -35,7 +35,7 @@ HybrisPressureAdaptor::HybrisPressureAdaptor(const QString& id) :
buffer = new DeviceAdaptorRingBuffer<TimedUnsigned>(1);
setAdaptedSensor("pressure", "Internal ambient pressure sensor values", buffer);
setDescription("Hybris pressure");
powerStatePath = Config::configuration()->value("pressure/powerstate_path").toByteArray();
powerStatePath = SensorFrameworkConfig::configuration()->value("pressure/powerstate_path").toByteArray();
if (!powerStatePath.isEmpty() && !QFile::exists(powerStatePath))
{
sensordLogW() << "Path does not exists: " << powerStatePath;
Expand Down
2 changes: 1 addition & 1 deletion adaptors/hybrisproximityadaptor/hybrisproximityadaptor.cpp
Expand Up @@ -39,7 +39,7 @@ HybrisProximityAdaptor::HybrisProximityAdaptor(const QString& id) :
setAdaptedSensor("proximity", "Internal proximity coordinates", buffer);

setDescription("Hybris proximity");
powerStatePath = Config::configuration()->value("proximity/powerstate_path").toByteArray();
powerStatePath = SensorFrameworkConfig::configuration()->value("proximity/powerstate_path").toByteArray();
if (!powerStatePath.isEmpty() && !QFile::exists(powerStatePath))
{
sensordLogW() << "Path does not exists: " << powerStatePath;
Expand Down
Expand Up @@ -41,7 +41,7 @@ HybrisStepCounterAdaptor::HybrisStepCounterAdaptor(const QString& id) :
buffer = new DeviceAdaptorRingBuffer<TimedUnsigned>(1);
setAdaptedSensor("stepcounter", "Internal step counter steps since reboot", buffer);
setDescription("Hybris step counter");
powerStatePath = Config::configuration()->value("stepcounter/powerstate_path").toByteArray();
powerStatePath = SensorFrameworkConfig::configuration()->value("stepcounter/powerstate_path").toByteArray();
if (!powerStatePath.isEmpty() && !QFile::exists(powerStatePath))
{
sensordLogW() << "Path does not exists: " << powerStatePath;
Expand Down
8 changes: 4 additions & 4 deletions adaptors/iioadaptor/iioadaptor.cpp
Expand Up @@ -81,7 +81,7 @@ void IioAdaptor::setup()

if (deviceId.startsWith("accel")) {
const QString name = "accelerometer";
const QString inputMatch = Config::configuration()->value<QString>(name + "/input_match");
const QString inputMatch = SensorFrameworkConfig::configuration()->value<QString>(name + "/input_match");
qDebug() << "input_match" << inputMatch;

devNodeNumber = findSensor(inputMatch);
Expand All @@ -96,7 +96,7 @@ void IioAdaptor::setup()
}
else if (deviceId.startsWith("gyro")) {
const QString name = "gyroscope";
const QString inputMatch = Config::configuration()->value<QString>(name + "/input_match");
const QString inputMatch = SensorFrameworkConfig::configuration()->value<QString>(name + "/input_match");
qDebug() << "input_match" << inputMatch;

devNodeNumber = findSensor(inputMatch);
Expand All @@ -110,7 +110,7 @@ void IioAdaptor::setup()
}
else if (deviceId.startsWith("mag")) {
const QString name = "magnetometer";
const QString inputMatch = Config::configuration()->value<QString>(name + "/input_match");
const QString inputMatch = SensorFrameworkConfig::configuration()->value<QString>(name + "/input_match");
qDebug() << "input_match" << inputMatch;

devNodeNumber = findSensor(inputMatch);
Expand All @@ -125,7 +125,7 @@ void IioAdaptor::setup()
}
else if (deviceId.startsWith("als")) {
const QString name = "als";
const QString inputMatch = Config::configuration()->value<QString>(name + "/input_match");
const QString inputMatch = SensorFrameworkConfig::configuration()->value<QString>(name + "/input_match");

devNodeNumber = findSensor(inputMatch);
if (devNodeNumber!= -1) {
Expand Down
4 changes: 2 additions & 2 deletions adaptors/lidsensoradaptor-evdev/lidsensoradaptor-evdev.cpp
Expand Up @@ -47,7 +47,7 @@ LidSensorAdaptorEvdev::LidSensorAdaptorEvdev(const QString& id) :
{
lidBuffer_ = new DeviceAdaptorRingBuffer<LidData>(1);
setAdaptedSensor("lidsensor", "Lid state", lidBuffer_);
powerStatePath_ = Config::configuration()->value("lidsensor/powerstate_path").toByteArray();
powerStatePath_ = SensorFrameworkConfig::configuration()->value("lidsensor/powerstate_path").toByteArray();

}

Expand Down Expand Up @@ -76,7 +76,7 @@ LidSensorAdaptorEvdev::~LidSensorAdaptorEvdev()
void LidSensorAdaptorEvdev::init()
{
qDebug() << Q_FUNC_INFO << name();
QStringList strList = Config::configuration()->value<QStringList>(name() + "/input_match");
QStringList strList = SensorFrameworkConfig::configuration()->value<QStringList>(name() + "/input_match");
qDebug() << strList;
foreach (const QString str, strList) {
if (!getInputDevices(str)) {
Expand Down
Expand Up @@ -42,7 +42,7 @@ MagAdaptorEvdev::MagAdaptorEvdev(const QString& id) :
magnetometerBuffer_ = new DeviceAdaptorRingBuffer<CalibratedMagneticFieldData>(1);
setAdaptedSensor("magnetometer", "Internal magnetometer coordinates", magnetometerBuffer_);
setDescription("Input device magnetometer adaptor");
powerStatePath_ = Config::configuration()->value("magnetometer/powerstate_path").toByteArray();
powerStatePath_ = SensorFrameworkConfig::configuration()->value("magnetometer/powerstate_path").toByteArray();
// introduceAvailableDataRange(DataRange(0, 4095, 1));
setDefaultInterval(10);
}
Expand Down
Expand Up @@ -34,17 +34,17 @@ MagnetometerAdaptorNCDK::MagnetometerAdaptorNCDK(const QString& id) :
SysfsAdaptor(id, SysfsAdaptor::IntervalMode),
powerState_(false)
{
intervalCompensation_ = Config::configuration()->value<int>("magnetometer/interval_compensation", 0);
powerStateFilePath_ = Config::configuration()->value<QByteArray>("magnetometer/path_power_state", "");
sensAdjFilePath_ = Config::configuration()->value<QByteArray>("magnetometer/path_sens_adjust", "");
intervalCompensation_ = SensorFrameworkConfig::configuration()->value<int>("magnetometer/interval_compensation", 0);
powerStateFilePath_ = SensorFrameworkConfig::configuration()->value<QByteArray>("magnetometer/path_power_state", "");
sensAdjFilePath_ = SensorFrameworkConfig::configuration()->value<QByteArray>("magnetometer/path_sens_adjust", "");
magnetometerBuffer_ = new DeviceAdaptorRingBuffer<CalibratedMagneticFieldData>(128);
setAdaptedSensor("magnetometer", "Internal magnetometer coordinates", magnetometerBuffer_);
setDescription("Magnetometer adaptor (ak8975) for NCDK");

//get sensitivity adjustment
getSensitivityAdjustment(x_adj, y_adj, z_adj);

overflowLimit_ = Config::configuration()->value<int>("magnetometer/overflow_limit", 8000);
overflowLimit_ = SensorFrameworkConfig::configuration()->value<int>("magnetometer/overflow_limit", 8000);
}

MagnetometerAdaptorNCDK::~MagnetometerAdaptorNCDK()
Expand Down
4 changes: 2 additions & 2 deletions adaptors/magnetometeradaptor/magnetometeradaptor.cpp
Expand Up @@ -46,10 +46,10 @@ struct ak8974_data {
MagnetometerAdaptor::MagnetometerAdaptor(const QString& id) :
SysfsAdaptor(id, SysfsAdaptor::IntervalMode, false)
{
intervalCompensation_ = Config::configuration()->value<int>("magnetometer/interval_compensation", 0);
intervalCompensation_ = SensorFrameworkConfig::configuration()->value<int>("magnetometer/interval_compensation", 0);
magnetometerBuffer_ = new DeviceAdaptorRingBuffer<CalibratedMagneticFieldData>(1);
setAdaptedSensor("magnetometer", "Internal magnetometer coordinates", magnetometerBuffer_);
overflowLimit_ = Config::configuration()->value<int>("magnetometer/overflow_limit", 8000);
overflowLimit_ = SensorFrameworkConfig::configuration()->value<int>("magnetometer/overflow_limit", 8000);
setDescription("Input device Magnetometer adaptor (ak897x)");
}

Expand Down
6 changes: 3 additions & 3 deletions adaptors/mpu6050accelerometer/mpu6050accelerometeradaptor.cpp
Expand Up @@ -40,21 +40,21 @@ Mpu6050AccelAdaptor::Mpu6050AccelAdaptor (const QString& id) :
{
struct stat st;

QString xAxisPath = Config::configuration()->value("accelerometer/x_axis_path").toString ();
QString xAxisPath = SensorFrameworkConfig::configuration()->value("accelerometer/x_axis_path").toString ();
if ( lstat (xAxisPath.toLatin1().constData(), &st) < 0 ) {
sensordLogW () << "x_axis_path: " << xAxisPath << " not found";
return;
}
addPath(xAxisPath, X_AXIS);

QString yAxisPath = Config::configuration()->value("accelerometer/y_axis_path").toString ();
QString yAxisPath = SensorFrameworkConfig::configuration()->value("accelerometer/y_axis_path").toString ();
if ( lstat (yAxisPath.toLatin1().constData(), &st) < 0 ) {
sensordLogW () << "y_axis_path: " << yAxisPath << " not found";
return;
}
addPath(yAxisPath, Y_AXIS);

QString zAxisPath = Config::configuration()->value("accelerometer/z_axis_path").toString ();
QString zAxisPath = SensorFrameworkConfig::configuration()->value("accelerometer/z_axis_path").toString ();
if ( lstat (zAxisPath.toLatin1().constData(), &st) < 0 ) {
sensordLogW () << "z_axis_path: " << zAxisPath << " not found";
return;
Expand Down
Expand Up @@ -13,7 +13,7 @@ OaktrailAccelAdaptor::OaktrailAccelAdaptor (const QString& id) :
{
struct stat st;

devPath = Config::configuration ()->value ("oaktrail_acc_sys_path").toString ();
devPath = SensorFrameworkConfig::configuration ()->value ("oaktrail_acc_sys_path").toString ();
if ( lstat (devPath.toLatin1().constData(), &st) < 0 ) {
sensordLogW () << devPath << "no found";
return;
Expand Down
Expand Up @@ -13,7 +13,7 @@ OemtabletAccelAdaptor::OemtabletAccelAdaptor (const QString& id) :
{
struct stat st;

devPath = Config::configuration ()->value ("oem_tablet_acc_sys_path").toString ();
devPath = SensorFrameworkConfig::configuration ()->value ("oem_tablet_acc_sys_path").toString ();
if ( lstat (devPath.toLatin1().constData(), &st) < 0 ) {
sensordLogW () << devPath << "no found";
return;
Expand Down
Expand Up @@ -16,7 +16,7 @@ OEMTabletALSAdaptorAscii::OEMTabletALSAdaptorAscii(const QString& id) : SysfsAda
const unsigned int DEFAULT_RANGE = 65535;

int range = DEFAULT_RANGE;
QFile sysFile(Config::configuration()->value("als-ascii_range_sysfs_path").toString());
QFile sysFile(SensorFrameworkConfig::configuration()->value("als-ascii_range_sysfs_path").toString());

if (!(sysFile.open(QIODevice::ReadOnly))) {
sensordLogW() << "Unable to config ALS range from sysfs, using default value: " << DEFAULT_RANGE;
Expand All @@ -28,7 +28,7 @@ OEMTabletALSAdaptorAscii::OEMTabletALSAdaptorAscii(const QString& id) : SysfsAda
sensordLogT() << "Ambient light range: " << range;

// Locate the actual handle
QString devPath = Config::configuration()->value("als-ascii_sysfs_path").toString();
QString devPath = SensorFrameworkConfig::configuration()->value("als-ascii_sysfs_path").toString();

if (devPath.isEmpty())
{
Expand Down
2 changes: 1 addition & 1 deletion adaptors/pressureadaptor/pressureadaptor.cpp
Expand Up @@ -40,7 +40,7 @@ PressureAdaptor::PressureAdaptor(const QString& id) :
pressureBuffer_ = new DeviceAdaptorRingBuffer<TimedUnsigned>(1);
setAdaptedSensor("pressure", "Pressure values", pressureBuffer_);
setDescription("Input device pressure adaptor");
powerStatePath_ = Config::configuration()->value("pressure/powerstate_path").toByteArray();
powerStatePath_ = SensorFrameworkConfig::configuration()->value("pressure/powerstate_path").toByteArray();
introduceAvailableDataRange(DataRange(0, 4095, 1));
setDefaultInterval(10);
}
Expand Down
2 changes: 1 addition & 1 deletion adaptors/proximityadaptor-evdev/proximityadaptor-evdev.cpp
Expand Up @@ -46,7 +46,7 @@ ProximityAdaptorEvdev::ProximityAdaptorEvdev(const QString& id) :
{
proximityBuffer_ = new DeviceAdaptorRingBuffer<ProximityData>(1);
setAdaptedSensor("proximity", "Proximity state", proximityBuffer_);
powerStatePath_ = Config::configuration()->value("proximity/powerstate_path").toByteArray();
powerStatePath_ = SensorFrameworkConfig::configuration()->value("proximity/powerstate_path").toByteArray();
}

ProximityAdaptorEvdev::~ProximityAdaptorEvdev()
Expand Down
6 changes: 3 additions & 3 deletions adaptors/proximityadaptor/proximityadaptor.cpp
Expand Up @@ -53,9 +53,9 @@ struct apds990x_data {
ProximityAdaptor::ProximityAdaptor(const QString& id) :
SysfsAdaptor(id, SysfsAdaptor::SelectMode, false)
{
deviceType_ = (DeviceType)Config::configuration()->value<int>("proximity/driver_type", 0);
threshold_ = Config::configuration()->value<int>("proximity/threshold", 35);
powerStatePath_ = Config::configuration()->value("proximity/powerstate_path").toByteArray();
deviceType_ = (DeviceType)SensorFrameworkConfig::configuration()->value<int>("proximity/driver_type", 0);
threshold_ = SensorFrameworkConfig::configuration()->value<int>("proximity/threshold", 35);
powerStatePath_ = SensorFrameworkConfig::configuration()->value("proximity/powerstate_path").toByteArray();
proximityBuffer_ = new DeviceAdaptorRingBuffer<ProximityData>(1);
setAdaptedSensor("proximity", "Proximity state", proximityBuffer_);
setDescription("Proximity sensor readings (Dipro sensor)");
Expand Down

0 comments on commit 5ee46d8

Please sign in to comment.