Commit 7a648726 authored by Lorn Potter's avatar Lorn Potter

[sensorfw] correct adapted sensor for orientation is orientation.

stop the mag sensor from starting and calibrating at startup.
add more debug output.
parent b1c400f1
......@@ -44,7 +44,7 @@ HybrisOrientationAdaptor::HybrisOrientationAdaptor(const QString& id) :
HybrisAdaptor(id,SENSOR_TYPE_ORIENTATION)
{
buffer = new DeviceAdaptorRingBuffer<TimedXyzData>(1);
setAdaptedSensor("accelerometer", "Internal orientation coordinates", buffer);
setAdaptedSensor("orientation", "Internal orientation coordinates", buffer);
setDescription("Hybris orientation");
// setDefaultInterval(50);
......
......@@ -177,6 +177,7 @@ bool HybrisManager::setDelay(int sensorHandle, int interval)
void HybrisManager::startReader(HybrisAdaptor *adaptor)
{
if (registeredAdaptors.values().contains(adaptor)) {
sensordLogD() << "activating " << adaptor->name();
int error = device->activate(device, adaptor->sensorHandle, 1);
if (error != 0) {
sensordLogW() <<Q_FUNC_INFO<< "failed for"<< strerror(-error);
......@@ -200,6 +201,7 @@ void HybrisManager::stopReader(HybrisAdaptor *adaptor)
if (okToStop) {
adaptorReader.stopReader();
adaptorReader.wait();
sensordLogD() << "deactivating " << adaptor->name();
int error = device->activate(device, adaptor->sensorHandle, 0);
if (error != 0) {
sensordLogW() <<Q_FUNC_INFO<< "failed for"<< strerror(-error);
......@@ -221,6 +223,7 @@ bool HybrisManager::resumeReader(HybrisAdaptor *adaptor)
}
if (okToResume) {
sensordLogD() << "activating for resume" << adaptor->name();
int error = device->activate(device, adaptor->sensorHandle, 1);
if (error != 0) {
sensordLogW() <<Q_FUNC_INFO<< "failed for"<< strerror(-error);
......@@ -243,6 +246,7 @@ void HybrisManager::standbyReader(HybrisAdaptor *adaptor)
}
if (okToStandby) {
sensordLogD() << "deactivating for standby" << adaptor->name();
int error = device->activate(device, adaptor->sensorHandle, 0);
if (error != 0) {
sensordLogW() <<Q_FUNC_INFO<< "failed for"<< strerror(-error);
......
......@@ -7,7 +7,7 @@ Conflicts=actdead.target
[Service]
Type=forking
ExecStartPre=/bin/sh /usr/bin/sensord-daemon-conf-setup
ExecStart=/usr/sbin/sensord -c=/etc/sensorfw/primaryuse.conf -d --log-level=warning
ExecStart=/usr/sbin/sensord -c=/etc/sensorfw/primaryuse.conf -d --log-level=warning --no-magnetometer-bg-calibration
ExecReload=/bin/kill -HUP $MAINPID
Restart=always
RestartSec=1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment