X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=extras%2Faccelerometer%2Faccelerometer.c;h=59c2a4ece30592dd0bec3154188b6c8fe4aaec99;hp=e06bf190e5d22b123197a46ff7aa2024cfbfa94f;hb=7236c6c40a730d053141d9fe797dc65dc2ecd1f1;hpb=24569e24dc94a7cffb8031eb0055e8d06cbdcb72 diff --git a/extras/accelerometer/accelerometer.c b/extras/accelerometer/accelerometer.c index e06bf190e..59c2a4ece 100644 --- a/extras/accelerometer/accelerometer.c +++ b/extras/accelerometer/accelerometer.c @@ -1,10 +1,28 @@ /* * accelerometer - exports device orientation through property * + * When an "change" event is received on an accelerometer, + * open its device node, and from the value, as well as the previous + * value of the property, calculate the device's new orientation, + * and export it as ID_INPUT_ACCELEROMETER_ORIENTATION. + * + * Possible values are: + * undefined + * * normal + * * bottom-up + * * left-up + * * right-up + * + * The property will be persistent across sessions, and the new + * orientations can be deducted from the previous one (it allows + * for a threshold for switching between opposite ends of the + * orientation). + * * Copyright (C) 2011 Red Hat, Inc. - * Author: Bastien Nocera + * Author: + * Bastien Nocera * - * orientation_calc() from the sensorfw package: + * orientation_calc() from the sensorfw package * Copyright (C) 2009-2010 Nokia Corporation * Authors: * Üstün Ergenoglu