[-]
[+]
|
Changed |
_service:tar_git:sensorfw.changes
|
|
[-]
[+]
|
Changed |
_service:tar_git:sensorfw-qt5-hybris.spec
^
|
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/adaptors/accelerometeradaptor/accelerometeradaptor.cpp
^
|
@@ -44,8 +44,8 @@
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()
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/adaptors/alsadaptor-ascii/alsadaptor-ascii.cpp
^
|
@@ -52,7 +52,7 @@
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_);
@@ -66,8 +66,8 @@
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()
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/adaptors/alsadaptor-evdev/alsevdevadaptor.cpp
^
|
@@ -43,7 +43,7 @@
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);
}
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/adaptors/alsadaptor/alsadaptor.cpp
^
|
@@ -62,8 +62,8 @@
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,
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/adaptors/gyroscopeadaptor-evdev/gyroevdevadaptor.cpp
^
|
@@ -43,7 +43,7 @@
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);
}
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/adaptors/gyroscopeadaptor/gyroscopeadaptor.cpp
^
|
@@ -41,7 +41,7 @@
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()
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/adaptors/humidityadaptor/humidityadaptor.cpp
^
|
@@ -40,7 +40,7 @@
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);
}
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/adaptors/hybrisaccelerometer/hybrisaccelerometeradaptor.cpp
^
|
@@ -33,7 +33,7 @@
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);
}
@@ -44,20 +44,19 @@
bool HybrisAccelerometerAdaptor::startSensor()
{
- if(!powerStatePath.isEmpty())
- writeToFile(powerStatePath, "1");
if (!(HybrisAdaptor::startSensor()))
return false;
-
+ if (isRunning() && !powerStatePath.isEmpty())
+ writeToFile(powerStatePath, "1");
sensordLogD() << "Hybris AccelAdaptor start\n";
return true;
}
void HybrisAccelerometerAdaptor::stopSensor()
{
- if(!powerStatePath.isEmpty())
- writeToFile(powerStatePath, "0");
HybrisAdaptor::stopSensor();
+ if (!isRunning() && !powerStatePath.isEmpty())
+ writeToFile(powerStatePath, "0");
sensordLogD() << "Hybris AccelAdaptor stop\n";
}
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/adaptors/hybrisalsadaptor/hybrisalsadaptor.cpp
^
|
@@ -37,7 +37,7 @@
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;
@@ -52,11 +52,10 @@
bool HybrisAlsAdaptor::startSensor()
{
- if(!powerStatePath.isEmpty())
- writeToFile(powerStatePath, "1");
if (!(HybrisAdaptor::startSensor()))
return false;
-
+ if (isRunning() && !powerStatePath.isEmpty())
+ writeToFile(powerStatePath, "1");
sensordLogD() << "Hybris HybrisAlsAdaptor start\n";
return true;
}
@@ -120,9 +119,9 @@
void HybrisAlsAdaptor::stopSensor()
{
- if(!powerStatePath.isEmpty())
- writeToFile(powerStatePath, "0");
HybrisAdaptor::stopSensor();
+ if (!isRunning() && !powerStatePath.isEmpty())
+ writeToFile(powerStatePath, "0");
sensordLogD() << "Hybris HybrisAlsAdaptor stop\n";
}
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/adaptors/hybrisgyroscopeadaptor/hybrisgyroscopeadaptor.cpp
^
|
@@ -35,7 +35,7 @@
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;
@@ -51,20 +51,19 @@
bool HybrisGyroscopeAdaptor::startSensor()
{
- if(!powerStatePath.isEmpty())
- writeToFile(powerStatePath, "1");
if (!(HybrisAdaptor::startSensor()))
return false;
-
+ if (isRunning() && !powerStatePath.isEmpty())
+ writeToFile(powerStatePath, "1");
sensordLogD() << "HybrisGyroscopeAdaptor start\n";
return true;
}
void HybrisGyroscopeAdaptor::stopSensor()
{
- if(!powerStatePath.isEmpty())
- writeToFile(powerStatePath, "0");
HybrisAdaptor::stopSensor();
+ if (!isRunning() &&!powerStatePath.isEmpty())
+ writeToFile(powerStatePath, "0");
sensordLogD() << "HybrisGyroscopeAdaptor stop\n";
}
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/adaptors/hybrismagnetometeradaptor/hybrismagnetometeradaptor.cpp
^
|
@@ -31,7 +31,7 @@
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;
@@ -48,20 +48,19 @@
bool HybrisMagnetometerAdaptor::startSensor()
{
- if(!powerStatePath.isEmpty())
- writeToFile(powerStatePath, "1");
if (!(HybrisAdaptor::startSensor()))
return false;
-
+ if (isRunning() &&!powerStatePath.isEmpty())
+ writeToFile(powerStatePath, "1");
sensordLogD() << "HybrisMagnetometerAdaptor start\n";
return true;
}
void HybrisMagnetometerAdaptor::stopSensor()
{
- if(!powerStatePath.isEmpty())
- writeToFile(powerStatePath, "0");
HybrisAdaptor::stopSensor();
+ if (!isRunning() && !powerStatePath.isEmpty())
+ writeToFile(powerStatePath, "0");
sensordLogD() << "HybrisMagnetometerAdaptor stop\n";
}
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/adaptors/hybrisorientationadaptor/hybrisorientationadaptor.cpp
^
|
@@ -48,7 +48,7 @@
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;
@@ -64,20 +64,19 @@
bool HybrisOrientationAdaptor::startSensor()
{
- if(!powerStatePath.isEmpty())
- writeToFile(powerStatePath, "1");
if (!(HybrisAdaptor::startSensor()))
return false;
-
+ if (isRunning() && !powerStatePath.isEmpty())
+ writeToFile(powerStatePath, "1");
sensordLogD() << "Hybris OrientationAdaptor start\n";
return true;
}
void HybrisOrientationAdaptor::stopSensor()
{
- if(!powerStatePath.isEmpty())
- writeToFile(powerStatePath, "0");
HybrisAdaptor::stopSensor();
+ if (!isRunning() && !powerStatePath.isEmpty())
+ writeToFile(powerStatePath, "0");
sensordLogD() << "Hybris OrientationAdaptor stop\n";
}
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/adaptors/hybrispressureadaptor/hybrispressureadaptor.cpp
^
|
@@ -35,7 +35,7 @@
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;
@@ -50,20 +50,19 @@
bool HybrisPressureAdaptor::startSensor()
{
- if(!powerStatePath.isEmpty())
- writeToFile(powerStatePath, "1");
if (!(HybrisAdaptor::startSensor()))
return false;
-
+ if (isRunning() && !powerStatePath.isEmpty())
+ writeToFile(powerStatePath, "1");
sensordLogD() << "Hybris HybrisPressureAdaptor start\n";
return true;
}
void HybrisPressureAdaptor::stopSensor()
{
- if(!powerStatePath.isEmpty())
- writeToFile(powerStatePath, "0");
HybrisAdaptor::stopSensor();
+ if (!isRunning() && !powerStatePath.isEmpty())
+ writeToFile(powerStatePath, "0");
sensordLogD() << "Hybris HybrisPressureAdaptor stop\n";
}
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/adaptors/hybrisproximityadaptor/hybrisproximityadaptor.cpp
^
|
@@ -39,7 +39,7 @@
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;
@@ -57,10 +57,10 @@
bool HybrisProximityAdaptor::startSensor()
{
- if(!powerStatePath.isEmpty())
- writeToFile(powerStatePath, "1");
if (!(HybrisAdaptor::startSensor()))
return false;
+ if (isRunning() && !powerStatePath.isEmpty())
+ writeToFile(powerStatePath, "1");
sensordLogD() << "HybrisProximityAdaptor start\n";
return true;
}
@@ -127,9 +127,9 @@
void HybrisProximityAdaptor::stopSensor()
{
- if(!powerStatePath.isEmpty())
- writeToFile(powerStatePath, "0");
HybrisAdaptor::stopSensor();
+ if (!isRunning() && !powerStatePath.isEmpty())
+ writeToFile(powerStatePath, "0");
sensordLogD() << "HybrisProximityAdaptor stop\n";
}
@@ -138,7 +138,7 @@
ProximityData *d = buffer->nextSlot();
d->timestamp_ = quint64(data.timestamp * .001);
bool near = false;
- if (data.distance < maxRange) {
+ if (data.distance < maxRange()) {
near = true;
}
d->withinProximity_ = near;
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/adaptors/hybrisstepcounteradaptor/hybrisstepcounteradaptor.cpp
^
|
@@ -41,7 +41,7 @@
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;
@@ -56,11 +56,10 @@
bool HybrisStepCounterAdaptor::startSensor()
{
- if(!powerStatePath.isEmpty())
- writeToFile(powerStatePath, "1");
if (!(HybrisAdaptor::startSensor()))
return false;
-
+ if (isRunning() && !powerStatePath.isEmpty())
+ writeToFile(powerStatePath, "1");
sensordLogD() << "Hybris HybrisStepCounterAdaptor start\n";
return true;
}
@@ -72,9 +71,9 @@
void HybrisStepCounterAdaptor::stopSensor()
{
- if(!powerStatePath.isEmpty())
- writeToFile(powerStatePath, "0");
HybrisAdaptor::stopSensor();
+ if (!isRunning() && !powerStatePath.isEmpty())
+ writeToFile(powerStatePath, "0");
sensordLogD() << "Hybris HybrisStepCounterAdaptor stop\n";
}
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/adaptors/iioadaptor/iioadaptor.cpp
^
|
@@ -81,7 +81,7 @@
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);
@@ -96,7 +96,7 @@
}
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);
@@ -110,7 +110,7 @@
}
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);
@@ -125,7 +125,7 @@
}
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) {
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/adaptors/lidsensoradaptor-evdev/lidsensoradaptor-evdev.cpp
^
|
@@ -47,7 +47,7 @@
{
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();
}
@@ -76,7 +76,7 @@
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)) {
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/adaptors/magnetometeradaptor-evdev/magnetometerevdevadaptor.cpp
^
|
@@ -42,7 +42,7 @@
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);
}
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/adaptors/magnetometeradaptor-ncdk/magnetometeradaptor-ncdk.cpp
^
|
@@ -34,9 +34,9 @@
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");
@@ -44,7 +44,7 @@
//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()
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/adaptors/magnetometeradaptor/magnetometeradaptor.cpp
^
|
@@ -46,10 +46,10 @@
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)");
}
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/adaptors/mpu6050accelerometer/mpu6050accelerometeradaptor.cpp
^
|
@@ -40,21 +40,21 @@
{
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;
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/adaptors/oaktrailaccelerometer/oaktrailaccelerometeradaptor.cpp
^
|
@@ -13,7 +13,7 @@
{
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;
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/adaptors/oemtabletaccelerometer/oemtabletaccelerometeradaptor.cpp
^
|
@@ -13,7 +13,7 @@
{
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;
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/adaptors/oemtabletalsadaptor-ascii/oemtabletalsadaptor-ascii.cpp
^
|
@@ -16,7 +16,7 @@
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;
@@ -28,7 +28,7 @@
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())
{
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/adaptors/pressureadaptor/pressureadaptor.cpp
^
|
@@ -40,7 +40,7 @@
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);
}
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/adaptors/proximityadaptor-evdev/proximityadaptor-evdev.cpp
^
|
@@ -46,7 +46,7 @@
{
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()
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/adaptors/proximityadaptor/proximityadaptor.cpp
^
|
@@ -53,9 +53,9 @@
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)");
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/adaptors/steaccelerometeradaptor/steaccelerometeradaptor.cpp
^
|
@@ -26,8 +26,8 @@
1: +/- 4g (2 mg/LSB)
2: +/- 8g (4 mg/LSB)
*/
- QByteArray rangePath = Config::configuration()->value("accelerometer/range_path").toByteArray();
- range = Config::configuration()->value("accelerometer/range_mode").toByteArray();
+ QByteArray rangePath = SensorFrameworkConfig::configuration()->value("accelerometer/range_path").toByteArray();
+ range = SensorFrameworkConfig::configuration()->value("accelerometer/range_mode").toByteArray();
if(!rangePath.isEmpty()) {
writeToFile(rangePath, range);
}
@@ -44,8 +44,8 @@
7: 400 Hz
*/
- powerStatePath = Config::configuration()->value("accelerometer/mode_path").toByteArray();
- frequency = Config::configuration()->value("accelerometer/frequency_mode").toInt();
+ powerStatePath = SensorFrameworkConfig::configuration()->value("accelerometer/mode_path").toByteArray();
+ frequency = SensorFrameworkConfig::configuration()->value("accelerometer/frequency_mode").toInt();
setDescription("ste accelerometer");
}
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/adaptors/temperatureadaptor/temperatureadaptor.cpp
^
|
@@ -40,7 +40,7 @@
temperatureBuffer_ = new DeviceAdaptorRingBuffer<TimedUnsigned>(1);
setAdaptedSensor("temperature", "Temperature values", temperatureBuffer_);
setDescription("Input device temperature adaptor");
- powerStatePath_ = Config::configuration()->value("temperature/powerstate_path").toByteArray();
+ powerStatePath_ = SensorFrameworkConfig::configuration()->value("temperature/powerstate_path").toByteArray();
introduceAvailableDataRange(DataRange(0, 4095, 1));
setDefaultInterval(10);
}
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/chains/accelerometerchain/accelerometerchain.cpp
^
|
@@ -52,7 +52,7 @@
accelerometerReader_ = new BufferReader<AccelerationData>(1);
// Get the transformation matrix from config file
- QString aconvString = Config::configuration()->value<QString>("accelerometer/transformation_matrix", "");
+ QString aconvString = SensorFrameworkConfig::configuration()->value<QString>("accelerometer/transformation_matrix", "");
if (aconvString.size() > 0)
{
if (!setMatrixFromString(aconvString))
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/chains/compasschain/compasschainplugin.cpp
^
|
@@ -37,7 +37,7 @@
}
QStringList CompassChainPlugin::Dependencies() {
- QByteArray orientationConfiguration = Config::configuration()->value("plugins/orientationadaptor").toByteArray();
+ QByteArray orientationConfiguration = SensorFrameworkConfig::configuration()->value("plugins/orientationadaptor").toByteArray();
if (orientationConfiguration.isEmpty()) {
return QString("accelerometerchain:magcalibrationchain:declinationfilter:downsamplefilter:avgaccfilter").split(":", QString::SkipEmptyParts);
} else {
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/chains/magcalibrationchain/calibrationfilter.cpp
^
|
@@ -47,7 +47,7 @@
minMaxList.insert(1,qMakePair(0,0));
minMaxList.insert(2,qMakePair(0,0));
- manualCalibration = Config::configuration()->value<bool>("magnetometer/needs_calibration", false);
+ manualCalibration = SensorFrameworkConfig::configuration()->value<bool>("magnetometer/needs_calibration", false);
qDebug() << Q_FUNC_INFO << manualCalibration;
#ifdef CALIBRATE_DATA
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/chains/magcalibrationchain/magcalibrationchain.cpp
^
|
@@ -54,16 +54,16 @@
if (magAdaptor)
setValid(magAdaptor->isValid());
-// Config::configuration()->value<int>("magnetometer/interval_compensation", 16);
+// SensorFrameworkConfig::configuration()->value<int>("magnetometer/interval_compensation", 16);
// Get the transformation matrix from config file
- QString aconvString = Config::configuration()->value<QString>("magnetometer/transformation_matrix", "");
+ QString aconvString = SensorFrameworkConfig::configuration()->value<QString>("magnetometer/transformation_matrix", "");
if (aconvString.size() > 0) {
if (!setMatrixFromString(aconvString)) {
sensordLogW() << "Failed to parse 'transformation_matrix' configuration key. Coordinate alignment may be invalid";
}
}
- needsCalibration = Config::configuration()->value<bool>("magnetometer/needs_calibration", true);
+ needsCalibration = SensorFrameworkConfig::configuration()->value<bool>("magnetometer/needs_calibration", true);
calibratedMagnetometerData = new RingBuffer<CalibratedMagneticFieldData>(1);
nameOutputBuffer("calibratedmagnetometerdata", calibratedMagnetometerData);
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/core/config.cpp
^
|
@@ -33,23 +33,23 @@
#include <QDir>
#include <QList>
-static Config *static_configuration = 0;
+static SensorFrameworkConfig *static_configuration = 0;
-Config::Config() {
+SensorFrameworkConfig::SensorFrameworkConfig() {
}
-Config::~Config() {
+SensorFrameworkConfig::~SensorFrameworkConfig() {
}
-void Config::clearConfig() {
+void SensorFrameworkConfig::clearConfig() {
m_settings.clear();
}
-bool Config::loadConfig(const QString &defConfigPath, const QString &configDPath) {
+bool SensorFrameworkConfig::loadConfig(const QString &defConfigPath, const QString &configDPath) {
/* Not having config files is ok, failing to load one that exists is not */
bool ret = true;
if (!static_configuration) {
- static_configuration = new Config();
+ static_configuration = new SensorFrameworkConfig();
}
/* Process config.d dir in alnum order */
if (!configDPath.isEmpty()) {
@@ -68,7 +68,7 @@
return ret;
}
-bool Config::loadConfigFile(const QString &configFileName) {
+bool SensorFrameworkConfig::loadConfigFile(const QString &configFileName) {
/* Success means the file was loaded and processed without hiccups */
bool loaded = false;
if (!QFile::exists(configFileName)) {
@@ -90,7 +90,7 @@
return loaded;
}
-QVariant Config::value(const QString &key) const {
+QVariant SensorFrameworkConfig::value(const QString &key) const {
QVariant var = m_settings.value(key, QVariant());
if(var.isValid()) {
sensordLogT() << "Value for key" << key << ":" << var.toString();
@@ -98,25 +98,25 @@
return var;
}
-QStringList Config::groups() const
+QStringList SensorFrameworkConfig::groups() const
{
QStringList groups = m_settings.childGroups();
return groups;
}
-Config *Config::configuration() {
+SensorFrameworkConfig *SensorFrameworkConfig::configuration() {
if (!static_configuration) {
sensordLogW() << "Configuration has not been loaded";
}
return static_configuration;
}
-void Config::close() {
+void SensorFrameworkConfig::close() {
delete static_configuration;
static_configuration = 0;
}
-bool Config::exists(const QString &key) const
+bool SensorFrameworkConfig::exists(const QString &key) const
{
return value(key).isValid();
}
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/core/config.h
^
|
@@ -35,16 +35,16 @@
/**
* Sensord configuration parser. Configuration is read and parsed with
- * the QSettings class. Config is a singleton instance to which configuration
+ * the QSettings class. SensorFrameworkConfig is a singleton instance to which configuration
* is loaded once during startup.
*/
-class Config
+class SensorFrameworkConfig
{
public:
/**
* Destructor.
*/
- ~Config();
+ ~SensorFrameworkConfig();
/**
* Find value for given key. Default QVariant is returned if key does
@@ -86,7 +86,7 @@
*
* @return configuration instance.
*/
- static Config *configuration();
+ static SensorFrameworkConfig *configuration();
/**
* Load configuration from given paths and append them to singleton
@@ -106,14 +106,14 @@
/**
* Constructor.
*/
- Config();
+ SensorFrameworkConfig();
/**
* Copy constructor.
*
* @param c source object.
*/
- Config(const Config &c);
+ SensorFrameworkConfig(const SensorFrameworkConfig &c);
/**
* Assignment operator.
@@ -121,7 +121,7 @@
* @param c source object.
* @return current object.
*/
- Config& operator=(const Config &c);
+ SensorFrameworkConfig& operator=(const SensorFrameworkConfig &c);
/**
* Load configuration file from given path.
@@ -140,7 +140,7 @@
};
template<typename T>
-T Config::value(const QString &key, const T &def) const
+T SensorFrameworkConfig::value(const QString &key, const T &def) const
{
QVariant val(value(key));
if(!val.isValid())
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/core/hybrisadaptor.cpp
^
|
@@ -34,221 +34,430 @@
#include <time.h>
#include <signal.h>
+/* Older devices probably have old android hal and thus do
+ * not define sensor all sensor types that have been added
+ * later on -> In order to both use symbolic names and
+ * compile for all devices we need to fill in holes that
+ * android hal for some particular device might have.
+ */
+#ifndef SENSOR_TYPE_META_DATA
+#define SENSOR_TYPE_META_DATA (0)
+#endif
#ifndef SENSOR_TYPE_ACCELEROMETER
-#define SENSOR_TYPE_ACCELEROMETER (1)
+#define SENSOR_TYPE_ACCELEROMETER (1)
+#endif
+#ifndef SENSOR_TYPE_GEOMAGNETIC_FIELD
+#define SENSOR_TYPE_GEOMAGNETIC_FIELD (2) // alias for SENSOR_TYPE_MAGNETIC_FIELD
#endif
#ifndef SENSOR_TYPE_MAGNETIC_FIELD
-#define SENSOR_TYPE_MAGNETIC_FIELD (2)
+#define SENSOR_TYPE_MAGNETIC_FIELD (2) // alias for SENSOR_TYPE_GEOMAGNETIC_FIELD
#endif
#ifndef SENSOR_TYPE_ORIENTATION
-#define SENSOR_TYPE_ORIENTATION (3)
+#define SENSOR_TYPE_ORIENTATION (3)
#endif
#ifndef SENSOR_TYPE_GYROSCOPE
-#define SENSOR_TYPE_GYROSCOPE (4)
+#define SENSOR_TYPE_GYROSCOPE (4)
#endif
#ifndef SENSOR_TYPE_LIGHT
-#define SENSOR_TYPE_LIGHT (5)
+#define SENSOR_TYPE_LIGHT (5)
#endif
#ifndef SENSOR_TYPE_PRESSURE
-#define SENSOR_TYPE_PRESSURE (6)
+#define SENSOR_TYPE_PRESSURE (6)
#endif
#ifndef SENSOR_TYPE_TEMPERATURE
-#define SENSOR_TYPE_TEMPERATURE (7)
+#define SENSOR_TYPE_TEMPERATURE (7)
#endif
#ifndef SENSOR_TYPE_PROXIMITY
-#define SENSOR_TYPE_PROXIMITY (8)
+#define SENSOR_TYPE_PROXIMITY (8)
#endif
#ifndef SENSOR_TYPE_GRAVITY
-#define SENSOR_TYPE_GRAVITY (9)
+#define SENSOR_TYPE_GRAVITY (9)
#endif
#ifndef SENSOR_TYPE_LINEAR_ACCELERATION
-#define SENSOR_TYPE_LINEAR_ACCELERATION (10)
+#define SENSOR_TYPE_LINEAR_ACCELERATION (10)
#endif
#ifndef SENSOR_TYPE_ROTATION_VECTOR
-#define SENSOR_TYPE_ROTATION_VECTOR (11)
+#define SENSOR_TYPE_ROTATION_VECTOR (11)
#endif
#ifndef SENSOR_TYPE_RELATIVE_HUMIDITY
-#define SENSOR_TYPE_RELATIVE_HUMIDITY (12)
+#define SENSOR_TYPE_RELATIVE_HUMIDITY (12)
#endif
#ifndef SENSOR_TYPE_AMBIENT_TEMPERATURE
-#define SENSOR_TYPE_AMBIENT_TEMPERATURE (13)
+#define SENSOR_TYPE_AMBIENT_TEMPERATURE (13)
+#endif
+#ifndef SENSOR_TYPE_MAGNETIC_FIELD_UNCALIBRATED
+#define SENSOR_TYPE_MAGNETIC_FIELD_UNCALIBRATED (14)
+#endif
+#ifndef SENSOR_TYPE_GAME_ROTATION_VECTOR
+#define SENSOR_TYPE_GAME_ROTATION_VECTOR (15)
+#endif
+#ifndef SENSOR_TYPE_GYROSCOPE_UNCALIBRATED
+#define SENSOR_TYPE_GYROSCOPE_UNCALIBRATED (16)
+#endif
+#ifndef SENSOR_TYPE_SIGNIFICANT_MOTION
+#define SENSOR_TYPE_SIGNIFICANT_MOTION (17)
+#endif
+#ifndef SENSOR_TYPE_STEP_DETECTOR
+#define SENSOR_TYPE_STEP_DETECTOR (18)
#endif
-//#define SENSOR_TYPE_MAGNETIC_FIELD_UNCALIBRATED (14)
-//#define SENSOR_TYPE_GAME_ROTATION_VECTOR (15)
-//#define SENSOR_TYPE_GYROSCOPE_UNCALIBRATED (16)
-//#define SENSOR_TYPE_SIGNIFICANT_MOTION (17)
-//#define SENSOR_TYPE_STEP_DETECTOR (18)
#ifndef SENSOR_TYPE_STEP_COUNTER
-#define SENSOR_TYPE_STEP_COUNTER (19)
+#define SENSOR_TYPE_STEP_COUNTER (19)
#endif
-//#define SENSOR_TYPE_GEOMAGNETIC_ROTATION_VECTOR (20)
-
-Q_GLOBAL_STATIC(HybrisManager, hybrisManager)
-
-HybrisManager::HybrisManager(QObject *parent)
- : QObject(parent)
- , device(NULL)
- , sensorList(NULL)
- , module(NULL)
- , sensorsCount(0)
- , sensorMap()
- , registeredAdaptors()
- , adaptorReaderTid(0)
-{
- init();
+#ifndef SENSOR_TYPE_GEOMAGNETIC_ROTATION_VECTOR
+#define SENSOR_TYPE_GEOMAGNETIC_ROTATION_VECTOR (20)
+#endif
+#ifndef SENSOR_TYPE_HEART_RATE
+#define SENSOR_TYPE_HEART_RATE (21)
+#endif
+#ifndef SENSOR_TYPE_TILT_DETECTOR
+#define SENSOR_TYPE_TILT_DETECTOR (22)
+#endif
+#ifndef SENSOR_TYPE_WAKE_GESTURE
+#define SENSOR_TYPE_WAKE_GESTURE (23)
+#endif
+#ifndef SENSOR_TYPE_GLANCE_GESTURE
+#define SENSOR_TYPE_GLANCE_GESTURE (24)
+#endif
+#ifndef SENSOR_TYPE_PICK_UP_GESTURE
+#define SENSOR_TYPE_PICK_UP_GESTURE (25)
+#endif
+#ifndef SENSOR_TYPE_WRIST_TILT_GESTURE
+#define SENSOR_TYPE_WRIST_TILT_GESTURE (26)
+#endif
+
+/* ========================================================================= *
+ * UTILITIES
+ * ========================================================================= */
+
+static char const *
+sensorTypeName(int type)
+{
+ switch (type) {
+ case SENSOR_TYPE_META_DATA: return "META_DATA";
+ case SENSOR_TYPE_ACCELEROMETER: return "ACCELEROMETER";
+ case SENSOR_TYPE_GEOMAGNETIC_FIELD: return "GEOMAGNETIC_FIELD";
+ case SENSOR_TYPE_ORIENTATION: return "ORIENTATION";
+ case SENSOR_TYPE_GYROSCOPE: return "GYROSCOPE";
+ case SENSOR_TYPE_LIGHT: return "LIGHT";
+ case SENSOR_TYPE_PRESSURE: return "PRESSURE";
+ case SENSOR_TYPE_TEMPERATURE: return "TEMPERATURE";
+ case SENSOR_TYPE_PROXIMITY: return "PROXIMITY";
+ case SENSOR_TYPE_GRAVITY: return "GRAVITY";
+ case SENSOR_TYPE_LINEAR_ACCELERATION: return "LINEAR_ACCELERATION";
+ case SENSOR_TYPE_ROTATION_VECTOR: return "ROTATION_VECTOR";
+ case SENSOR_TYPE_RELATIVE_HUMIDITY: return "RELATIVE_HUMIDITY";
+ case SENSOR_TYPE_AMBIENT_TEMPERATURE: return "AMBIENT_TEMPERATURE";
+ case SENSOR_TYPE_MAGNETIC_FIELD_UNCALIBRATED: return "MAGNETIC_FIELD_UNCALIBRATED";
+ case SENSOR_TYPE_GAME_ROTATION_VECTOR: return "GAME_ROTATION_VECTOR";
+ case SENSOR_TYPE_GYROSCOPE_UNCALIBRATED: return "GYROSCOPE_UNCALIBRATED";
+ case SENSOR_TYPE_SIGNIFICANT_MOTION: return "SIGNIFICANT_MOTION";
+ case SENSOR_TYPE_STEP_DETECTOR: return "STEP_DETECTOR";
+ case SENSOR_TYPE_STEP_COUNTER: return "STEP_COUNTER";
+ case SENSOR_TYPE_GEOMAGNETIC_ROTATION_VECTOR: return "GEOMAGNETIC_ROTATION_VECTOR";
+ case SENSOR_TYPE_HEART_RATE: return "HEART_RATE";
+ case SENSOR_TYPE_TILT_DETECTOR: return "TILT_DETECTOR";
+ case SENSOR_TYPE_WAKE_GESTURE: return "WAKE_GESTURE";
+ case SENSOR_TYPE_GLANCE_GESTURE: return "GLANCE_GESTURE";
+ case SENSOR_TYPE_PICK_UP_GESTURE: return "PICK_UP_GESTURE";
+ case SENSOR_TYPE_WRIST_TILT_GESTURE: return "WRIST_TILT_GESTURE";
+ }
+
+ static char buf[32];
+ snprintf(buf, sizeof buf, "type%d", type);
+ return buf;
}
-HybrisManager::~HybrisManager()
+static void ObtainTemporaryWakeLock()
{
- closeAllSensors();
- if (adaptorReaderTid) {
- sensordLogD() << "Canceling hal reader thread";
- int err = pthread_cancel(adaptorReaderTid);
- if( err ) {
- sensordLogC() << "Failed to cancel hal reader thread";
- }
- else {
- sensordLogD() << "Waiting for hal reader thread to exit";
- void *ret = 0;
- struct timespec tmo = { 0, 0};
- clock_gettime(CLOCK_REALTIME, &tmo);
- tmo.tv_sec += 3;
- err = pthread_timedjoin_np(adaptorReaderTid, &ret, &tmo);
- if( err ) {
- sensordLogC() << "Hal reader thread did not exit";
- } else {
- sensordLogD() << "Hal reader thread terminated";
- adaptorReaderTid = 0;
- }
+ static bool triedToOpen = false;
+ static int wakeLockFd = -1;
+
+ if (!triedToOpen) {
+ triedToOpen = true;
+ wakeLockFd = ::open("/sys/power/wake_lock", O_RDWR);
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/core/hybrisadaptor.h
^
|
@@ -34,50 +34,70 @@
class HybrisAdaptor;
+struct HybrisSensorState
+{
+ HybrisSensorState();
+ ~HybrisSensorState();
+
+ int m_minDelay;
+ int m_maxDelay;
+ int m_delay;
+ int m_active;
+ sensors_event_t m_fallbackEvent;
+};
+
class HybrisManager : public QObject
{
Q_OBJECT
public:
- explicit HybrisManager(QObject *parent = 0);
static HybrisManager *instance();
- virtual ~HybrisManager();
-
- int handleForType(int sensorType);
- int maxRange(int sensorType);
- int minDelay(int sensorType);
- int resolution(int sensorType);
-
- bool setDelay(int handle, int interval);
- void startReader(HybrisAdaptor *adaptor);
- void stopReader(HybrisAdaptor *adaptor);
-
- bool resumeReader(HybrisAdaptor *adaptor);
- void standbyReader(HybrisAdaptor *adaptor);
-
- bool openSensors();
- bool closeSensors();
-
- void registerAdaptor(HybrisAdaptor * adaptor);
- void processSample(const sensors_event_t& data);
+ explicit HybrisManager(QObject *parent = 0);
+ virtual ~HybrisManager();
-protected:
- // methods
- void init();
- void closeAllSensors();
+ /* - - - - - - - - - - - - - - - - - - - *
+ * android sensor hal functions
+ * - - - - - - - - - - - - - - - - - - - */
+
+ sensors_event_t *halEventForHandle(int handle) const;
+ int halIndexForHandle(int handle) const;
+ int halIndexForType (int sensorType) const;
+ int halHandleForType (int sensorType) const;
+ float halGetMaxRange (int handle) const;
+ float halGetResolution (int handle) const;
+ int halGetMinDelay (int handle) const;
+ int halGetMaxDelay (int handle) const;
+ int halGetDelay (int handle) const;
+ bool halSetDelay (int handle, int delay_ms);
+ bool halGetActive (int handle) const;
+ bool halSetActive (int handle, bool active);
+
+ /* - - - - - - - - - - - - - - - - - - - *
+ * HybrisManager <--> sensorfwd
+ * - - - - - - - - - - - - - - - - - - - */
+
+ void startReader (HybrisAdaptor *adaptor);
+ void stopReader (HybrisAdaptor *adaptor);
+ void registerAdaptor (HybrisAdaptor * adaptor);
+ void processSample (const sensors_event_t& data);
+private:
// fields
- struct sensors_poll_device_t* device;
- struct sensor_t const* sensorList;
- struct sensors_module_t* module;
- int sensorsCount;
- QMap <int, int> sensorMap; //type, index
- QMap <int, HybrisAdaptor *> registeredAdaptors; //type, obj
- pthread_t adaptorReaderTid;
+ bool m_initialized;
+ QMap <int, HybrisAdaptor *> m_registeredAdaptors; // type -> obj
+ struct sensors_module_t *m_halModule;
+ struct sensors_poll_device_t *m_halDevice;
+ int m_halSensorCount;
+ const struct sensor_t *m_halSensorArray; // [m_halSensorCount]
+ HybrisSensorState *m_halSensorState; // [m_halSensorCount]
+ QMap <int, int> m_halIndexOfType; // type -> index
+ QMap <int, int> m_halIndexOfHandle; // handle -> index
+ pthread_t m_halEventReaderTid;
+
friend class HybrisAdaptorReader;
private:
- static void *adaptorReaderThread(void *aptr);
+ static void *halEventReaderThread(void *aptr);
};
class HybrisAdaptor : public DeviceAdaptor
@@ -87,47 +107,44 @@
virtual ~HybrisAdaptor();
virtual void init();
- bool addSensorType(int type);
+
virtual bool startAdaptor();
- bool isRunning() const;
+ bool isRunning() const;
virtual void stopAdaptor();
+ void evaluateSensor();
virtual bool startSensor();
virtual void stopSensor();
virtual bool standby();
-
virtual bool resume();
- qreal maxRange;
- qint32 minDelay;
- qreal resolution;
+ virtual void sendInitialData();
friend class HybrisManager;
- int sensorHandle;
- int sensorType;
- int cachedInterval;
-
- virtual void sendInitialData() {}
protected:
virtual void processSample(const sensors_event_t& data) = 0;
+ qreal minRange() const;
+ qreal maxRange() const;
+ qreal resolution() const;
+
+ unsigned int minInterval() const;
+ unsigned int maxInterval() const;
+
virtual unsigned int interval() const;
virtual bool setInterval(const unsigned int value, const int sessionId);
virtual unsigned int evaluateIntervalRequests(int& sessionId) const;
static bool writeToFile(const QByteArray& path, const QByteArray& content);
private:
- void stopReaderThread();
- bool startReaderThread();
-
- QList<int> sensorIds;
- unsigned int interval_;
- bool inStandbyMode_;
- volatile bool running_;
- bool shouldBeRunning_;
+ bool m_inStandbyMode;
+ volatile bool m_isRunning;
+ bool m_shouldBeRunning;
+ int m_sensorHandle;
+ int m_sensorType;
};
#endif // HybrisAdaptor_H
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/core/inputdevadaptor.cpp
^
|
@@ -59,14 +59,14 @@
int InputDevAdaptor::getInputDevices(const QString& typeName)
{
qDebug() << Q_FUNC_INFO << typeName;
- QString deviceSysPathString = Config::configuration()->value("global/device_sys_path").toString();
- QString devicePollFilePath = Config::configuration()->value("global/device_poll_file_path").toString();
+ QString deviceSysPathString = SensorFrameworkConfig::configuration()->value("global/device_sys_path").toString();
+ QString devicePollFilePath = SensorFrameworkConfig::configuration()->value("global/device_poll_file_path").toString();
int deviceNumber = 0;
deviceString_ = typeName;
// Check if this device name is defined in configuration
- QString deviceName = Config::configuration()->value<QString>(typeName + "/device", "");
+ QString deviceName = SensorFrameworkConfig::configuration()->value<QString>(typeName + "/device", "");
// Do not perform strict checks for the input device
if (deviceName.size() && checkInputDevice(deviceName, typeName, false)) {
@@ -90,8 +90,8 @@
}
QString pollConfigKey = QString(typeName + "/poll_file");
- if (Config::configuration()->exists(pollConfigKey)) {
- usedDevicePollFilePath_ = Config::configuration()->value<QString>(pollConfigKey, "");
+ if (SensorFrameworkConfig::configuration()->exists(pollConfigKey)) {
+ usedDevicePollFilePath_ = SensorFrameworkConfig::configuration()->value<QString>(pollConfigKey, "");
} else {
usedDevicePollFilePath_ = devicePollFilePath.arg(deviceNumber);
}
@@ -191,7 +191,7 @@
void InputDevAdaptor::init()
{
qDebug() << Q_FUNC_INFO << name();
- if (!getInputDevices(Config::configuration()->value<QString>(name() + "/input_match", name()))) {
+ if (!getInputDevices(SensorFrameworkConfig::configuration()->value<QString>(name() + "/input_match", name()))) {
sensordLogW() << "Input device not found.";
SysfsAdaptor::init();
}
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/core/loader.cpp
^
|
@@ -192,7 +192,7 @@
int end = file.size() - suffix.size();
const QString name(file.mid(beg, end-beg));
QString key = QString("available/%1").arg(name);
- QString val = Config::configuration()->value(key).toString();
+ QString val = SensorFrameworkConfig::configuration()->value(key).toString();
if( evaluateAvailabilityValue(name, val) ) {
res.append(name);
}
@@ -235,7 +235,7 @@
QString Loader::resolveRealPluginName(const QString& pluginName) const
{
QString key = QString("plugins/%1").arg(pluginName);
- QString nameFromConfig = Config::configuration()->value(key).toString();
+ QString nameFromConfig = SensorFrameworkConfig::configuration()->value(key).toString();
if (nameFromConfig.isEmpty()) {
sensordLogT() << "Plugin setting for " << pluginName << " not found from configuration. Using key as value.";
return pluginName;
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/core/logging.h
^
|
@@ -29,9 +29,9 @@
#include <QDebug>
-#define sensordLogT() (qDebug())
-#define sensordLogD() (qInfo())
-#define sensordLogW() (qWarning())
-#define sensordLogC() (qCritical())
+#define sensordLogT(ARGS_...) (qDebug(ARGS_))
+#define sensordLogD(ARGS_...) (qInfo(ARGS_))
+#define sensordLogW(ARGS_...) (qWarning(ARGS_))
+#define sensordLogC(ARGS_...) (qCritical(ARGS_))
#endif //LOGGING_H
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/core/nodebase.cpp
^
|
@@ -87,7 +87,7 @@
void NodeBase::introduceAvailableDataRanges(const QString& typeName)
{
- QVariant ranges = Config::configuration()->value(typeName + "/dataranges");
+ QVariant ranges = SensorFrameworkConfig::configuration()->value(typeName + "/dataranges");
if(ranges.isValid())
{
DataRangeList list(parseDataRangeList(ranges.toString(), 1));
@@ -280,7 +280,7 @@
void NodeBase::introduceAvailableIntervals(const QString& typeName)
{
- QVariant ranges = Config::configuration()->value(typeName + "/intervals");
+ QVariant ranges = SensorFrameworkConfig::configuration()->value(typeName + "/intervals");
if(ranges.isValid())
{
DataRangeList list(parseDataRangeList(ranges.toString(), 0));
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/core/sysfsadaptor.cpp
^
|
@@ -478,7 +478,7 @@
void SysfsAdaptor::init()
{
- QString path = Config::configuration()->value(name() + "/path").toString();
+ QString path = SensorFrameworkConfig::configuration()->value(name() + "/path").toString();
if(!path.isEmpty())
{
addPath(path);
@@ -487,10 +487,10 @@
{
sensordLogW() << "No sysfs path defined for: " << name();
}
- mode_ = (PollMode)Config::configuration()->value<int>(name() + "/mode", mode_);
- doSeek_ = Config::configuration()->value<bool>(name() + "/seek", doSeek_);
+ mode_ = (PollMode)SensorFrameworkConfig::configuration()->value<int>(name() + "/mode", mode_);
+ doSeek_ = SensorFrameworkConfig::configuration()->value<bool>(name() + "/seek", doSeek_);
introduceAvailableDataRanges(name());
introduceAvailableIntervals(name());
- setDefaultInterval(Config::configuration()->value<int>(name() + "/default_interval", 0));
+ setDefaultInterval(SensorFrameworkConfig::configuration()->value<int>(name() + "/default_interval", 0));
}
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/debian/changelog
^
|
@@ -94,13 +94,13 @@
* Proximity sensor dataflow now uses datatype ProximityData.
* ProximitySensorChannelInterface provides signal and accessor for getting proximity reading with reflectance value.
* c-api removed from doxygen targets.
- * Config-class now better handles errors.
+ * SensorFrameworkConfig-class now better handles errors.
* AccelerometerAdaptor used for some reason OrientationData. Should have
been AccelerometerData. Only cosmetic change.
* Implemented new downsampling logic (Fixes: NB#234563):
- AccelerometerAdaptor, MagnetometerAdaptor and RotationSensorChannel interval rangelist has been limited to certain sizes.
- AccelerometerSensorChannel, RotationSensorChannel and MagnetometerSensorChannel downsamples data before propagating it.
- * Config-class has now more friendly API.
+ * SensorFrameworkConfig-class has now more friendly API.
* sensorfw-qt5testapp improvements.
* API documentation improvements.
* Improved dataflowtests.
@@ -431,7 +431,7 @@
- Replaced direct usage of qDebug() with logging macros.
- Improved error-handling in Loader.
- Sensorfw-Qt5Logger now correctly prints QStrings.
- - Config/Logging singletons are now unloaded before exitting from main().
+ - SensorFrameworkConfig/Logging singletons are now unloaded before exitting from main().
-- Timo Rongas <ext-timo.2.rongas@nokia.com> Tue, 21 Sep 2010 10:32:41 +0300
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/filters/declinationfilter/declinationfilter.cpp
^
|
@@ -37,7 +37,7 @@
Filter<CompassData, DeclinationFilter, CompassData>(this, &DeclinationFilter::correct),
declinationCorrection_(0)
{
- updateInterval_ = Config::configuration()->value<quint64>("compass/declination_update_interval", 1000 * 60 * 60) * 1000;
+ updateInterval_ = SensorFrameworkConfig::configuration()->value<quint64>("compass/declination_update_interval", 1000 * 60 * 60) * 1000;
loadSettings();
}
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/filters/orientationinterpreter/orientationinterpreter.cpp
^
|
@@ -59,13 +59,13 @@
addSource(&faceSource, "face");
addSource(&orientationSource, "orientation");
- minLimit = Config::configuration()->value("orientation/overflow_min", QVariant(OVERFLOW_MIN)).toInt();
- maxLimit = Config::configuration()->value("orientation/overflow_max", QVariant(OVERFLOW_MAX)).toInt();
+ minLimit = SensorFrameworkConfig::configuration()->value("orientation/overflow_min", QVariant(OVERFLOW_MIN)).toInt();
+ maxLimit = SensorFrameworkConfig::configuration()->value("orientation/overflow_max", QVariant(OVERFLOW_MAX)).toInt();
- angleThresholdPortrait = Config::configuration()->value("orientation/threshold_portrait",QVariant(THRESHOLD_PORTRAIT)).toInt();
- angleThresholdLandscape = Config::configuration()->value("orientation/threshold_landscape",QVariant(THRESHOLD_LANDSCAPE)).toInt();
- discardTime = Config::configuration()->value("orientation/discard_time", QVariant(DISCARD_TIME)).toUInt();
- maxBufferSize = Config::configuration()->value("orientation/buffer_size", QVariant(AVG_BUFFER_MAX_SIZE)).toInt();
+ angleThresholdPortrait = SensorFrameworkConfig::configuration()->value("orientation/threshold_portrait",QVariant(THRESHOLD_PORTRAIT)).toInt();
+ angleThresholdLandscape = SensorFrameworkConfig::configuration()->value("orientation/threshold_landscape",QVariant(THRESHOLD_LANDSCAPE)).toInt();
+ discardTime = SensorFrameworkConfig::configuration()->value("orientation/discard_time", QVariant(DISCARD_TIME)).toUInt();
+ maxBufferSize = SensorFrameworkConfig::configuration()->value("orientation/buffer_size", QVariant(AVG_BUFFER_MAX_SIZE)).toInt();
// Open the handle for boosting cpu on changes that affect orientation
if (cpuBoostFile.exists()) {
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/sensord/calibrationhandler.cpp
^
|
@@ -41,8 +41,8 @@
{
m_timer.setSingleShot(true);
- m_calibRate = Config::configuration()->value<int>("magnetometer/calibration_rate", 100);
- m_calibTimeout = Config::configuration()->value<int>("magnetometer/calibration_timeout", 60000);
+ m_calibRate = SensorFrameworkConfig::configuration()->value<int>("magnetometer/calibration_rate", 100);
+ m_calibTimeout = SensorFrameworkConfig::configuration()->value<int>("magnetometer/calibration_timeout", 60000);
}
CalibrationHandler::~CalibrationHandler()
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/sensord/main.cpp
^
|
@@ -227,10 +227,10 @@
defConfigDir = parser.configDirPath();
}
- if (!Config::loadConfig(defConfigFile, defConfigDir))
+ if (!SensorFrameworkConfig::loadConfig(defConfigFile, defConfigDir))
{
- sensordLogC() << "Config file error! Load using default paths.";
- if (!Config::loadConfig(CONFIG_FILE_PATH, CONFIG_DIR_PATH))
+ sensordLogC() << "SensorFrameworkConfig file error! Load using default paths.";
+ if (!SensorFrameworkConfig::loadConfig(CONFIG_FILE_PATH, CONFIG_DIR_PATH))
{
sensordLogC() << "Which also failed. Bailing out";
return 1;
@@ -287,7 +287,7 @@
delete signalNotifier; signalNotifier = 0;
sensordLogD() << "Exiting...";
- Config::close();
+ SensorFrameworkConfig::close();
return ret;
}
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/sensors/contextplugin/orientationbin.cpp
^
|
@@ -101,7 +101,7 @@
start();
orientationChain->start();
- unsigned int pollInterval = Config::configuration()->value("context/orientation_poll_interval", QVariant(POLL_INTERVAL)).toUInt();
+ unsigned int pollInterval = SensorFrameworkConfig::configuration()->value("context/orientation_poll_interval", QVariant(POLL_INTERVAL)).toUInt();
orientationChain->setIntervalRequest(sessionId, pollInterval);
}
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/sensors/contextplugin/screeninterpreterfilter.cpp
^
|
@@ -47,7 +47,7 @@
topEdge("top")
{
// Get offset from config
- offset = Config::configuration()->value("context/orientation_offset", QVariant(0)).toInt();
+ offset = SensorFrameworkConfig::configuration()->value("context/orientation_offset", QVariant(0)).toInt();
}
void ScreenInterpreterFilter::interpret(unsigned, const PoseData* data)
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/sensors/contextplugin/stabilityfilter.cpp
^
|
@@ -38,7 +38,7 @@
unstableProperty(unstableProperty)
{
connect(&timer, SIGNAL(timeout()), this, SLOT(timeoutTriggered()));
- timeout = Config::configuration()->value("context/stability_timeout", QVariant(defaultTimeout)).toInt() * 1000;
+ timeout = SensorFrameworkConfig::configuration()->value("context/stability_timeout", QVariant(defaultTimeout)).toInt() * 1000;
}
void StabilityFilter::interpret(unsigned, const QPair<double, double>* data)
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/sensors/magnetometersensor/magnetometerscalefilter.cpp
^
|
@@ -30,7 +30,7 @@
MagnetometerScaleFilter::MagnetometerScaleFilter() :
Filter<CalibratedMagneticFieldData, MagnetometerScaleFilter, CalibratedMagneticFieldData>(this, &MagnetometerScaleFilter::filter)
{
- factor = Config::configuration()->value("magnetometer/scale_coefficient", QVariant(1)).toInt();
+ factor = SensorFrameworkConfig::configuration()->value("magnetometer/scale_coefficient", QVariant(1)).toInt();
}
void MagnetometerScaleFilter::filter(unsigned, const CalibratedMagneticFieldData* data)
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/sensors/magnetometersensor/magnetometersensor.cpp
^
|
@@ -49,7 +49,7 @@
magnetometerReader_ = new BufferReader<CalibratedMagneticFieldData>(1);
- scaleCoefficient_ = Config::configuration()->value("magnetometer/scale_coefficient", QVariant(300)).toInt();
+ scaleCoefficient_ = SensorFrameworkConfig::configuration()->value("magnetometer/scale_coefficient", QVariant(300)).toInt();
if (scaleCoefficient_ != 1)
{
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/tests/adaptors/adaptortest.cpp
^
|
@@ -45,7 +45,7 @@
void AdaptorTest::initTestCase()
{
- Config::loadConfig("/etc/sensorfw/sensord.conf", "/etc/sensorfw/sensord.conf.d");
+ SensorFrameworkConfig::loadConfig("/etc/sensorfw/sensord.conf", "/etc/sensorfw/sensord.conf.d");
}
void AdaptorTest::init() {}
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/tests/chains/chainstest.cpp
^
|
@@ -33,7 +33,7 @@
void ChainTest::initTestCase()
{
- Config::loadConfig("/etc/sensorfw/sensord.conf", "/etc/sensorfw/sensord.conf.d");
+ SensorFrameworkConfig::loadConfig("/etc/sensorfw/sensord.conf", "/etc/sensorfw/sensord.conf.d");
}
void ChainTest::init() {}
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/tests/dataflow/dataflowtests.cpp
^
|
@@ -47,7 +47,7 @@
void DataFlowTest::initTestCase()
{
- Config::loadConfig("/etc/sensorfw/sensord.conf", "/etc/sensorfw/sensord.conf.d");
+ SensorFrameworkConfig::loadConfig("/etc/sensorfw/sensord.conf", "/etc/sensorfw/sensord.conf.d");
// Initialise sensormanager
SensorManager& sm = SensorManager::instance();
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/tests/filters/filtertests.cpp
^
|
@@ -44,7 +44,7 @@
void FilterApiTest::initTestCase()
{
- Config::loadConfig(CONFIG_FILE_PATH, CONFIG_DIR_PATH);
+ SensorFrameworkConfig::loadConfig(CONFIG_FILE_PATH, CONFIG_DIR_PATH);
}
/**
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/tests/testapp/abstractsensorhandler.cpp
^
|
@@ -38,13 +38,13 @@
frameCount_(0),
downsample_(false)
{
- if (Config::configuration() != NULL)
+ if (SensorFrameworkConfig::configuration() != NULL)
{
- interval_ = Config::configuration()->value(sensorName_ + "/interval", 100);
- bufferinterval_ = Config::configuration()->value(sensorName_ + "/bufferinterval", 0);
- standbyoverride_ = Config::configuration()->value(sensorName_ + "/standbyoverride", false);
- buffersize_ = Config::configuration()->value(sensorName_ + "/buffersize", 0);
- downsample_ = Config::configuration()->value(sensorName_ + "/downsample", false);
+ interval_ = SensorFrameworkConfig::configuration()->value(sensorName_ + "/interval", 100);
+ bufferinterval_ = SensorFrameworkConfig::configuration()->value(sensorName_ + "/bufferinterval", 0);
+ standbyoverride_ = SensorFrameworkConfig::configuration()->value(sensorName_ + "/standbyoverride", false);
+ buffersize_ = SensorFrameworkConfig::configuration()->value(sensorName_ + "/buffersize", 0);
+ downsample_ = SensorFrameworkConfig::configuration()->value(sensorName_ + "/downsample", false);
}
}
|
[-]
[+]
|
Changed |
_service:tar_git:hybris-libsensorfw-qt5-0.10.8.tar.bz2/tests/testapp/clientadmin.cpp
^
|
@@ -51,24 +51,24 @@
if (parser.configFileInput())
{
QString defConfigFile = parser.configFilePath();
- if (Config::loadConfig(defConfigFile, ""))
- sensordLogT() << "Config file is loading successfully.";
+ if (SensorFrameworkConfig::loadConfig(defConfigFile, ""))
+ sensordLogT() << "SensorFrameworkConfig file is loading successfully.";
else
{
- sensordLogW() << "Config file error! Load using default path.";
- Config::loadConfig(CONFIG_FILE_PATH, "");
+ sensordLogW() << "SensorFrameworkConfig file error! Load using default path.";
+ SensorFrameworkConfig::loadConfig(CONFIG_FILE_PATH, "");
}
} else {
- Config::loadConfig(CONFIG_FILE_PATH, "");
+ SensorFrameworkConfig::loadConfig(CONFIG_FILE_PATH, "");
}
- if (Config::configuration() == NULL)
+ if (SensorFrameworkConfig::configuration() == NULL)
{
sensordLogC() << "Failed to load configuration. Aborting.";
exit(EXIT_FAILURE);
}
- if (!SensorHandler::init(Config::configuration()->groups()))
+ if (!SensorHandler::init(SensorFrameworkConfig::configuration()->groups()))
{
sensordLogC() << "Failed to initialize SensorHandler. Aborting.";
exit(EXIT_FAILURE);
@@ -79,9 +79,9 @@
{
init();
- foreach (const QString& sensorName, Config::configuration()->groups())
+ foreach (const QString& sensorName, SensorFrameworkConfig::configuration()->groups())
{
- int count = Config::configuration()->value<int>(sensorName + "/instances", 0);
+ int count = SensorFrameworkConfig::configuration()->value<int>(sensorName + "/instances", 0);
for(int i = 0; i < count; ++i)
{
SensorHandler* handler = new SensorHandler(sensorName, this);
@@ -120,5 +120,5 @@
}
delete handler;
}
- Config::close();
+ SensorFrameworkConfig::close();
}
|