kulve/sensorfw-iioadaptor — pull request #2 by glueckself (2013-01-29 15:41:58+00:00)
Title: Almost working adaptor

I fixed the usage of addPath and the sensor annoucement (acceleratoradaptor instead of iioadaptor). Also changed the adaptor to IntervalMode (for development, I'm not sure if the driver supports SelectMode).

After starting the accelerometer sensor, it will segfault in processSample(), thus the "almost" :)

To start the sensor, you will need 3 more dbus calls:
...loadPlugin "accelerometersensor"
...requestSensor "accelerometersensor" $pid (pid can be anything)
and "$ gdbus call -y -d com.nokia.SensorService -o /SensorManager/accelerometersensor -m local.AccelerometerSensor.start 1"

Please note that I had to use gdbus, because qdbus had a assertion there.

PS.: Because I forgot the comment: The fileId argument of processSample describes the device and the channel, by fileId = device*max_channels+channel, see IioAdaptor::addDevice()
I hope I got the calculations right.