summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2011-06-06 20:05:20 +0200
committerKay Sievers <kay.sievers@vrfy.org>2011-06-06 20:05:20 +0200
commit7236c6c40a730d053141d9fe797dc65dc2ecd1f1 (patch)
tree49105e798a26814ee5868eba60f16836f2e53056
parentac5c41ab70b1975d880ba86ece6f49bbc6bac44a (diff)
accelerometer: add documentation
-rw-r--r--extras/accelerometer/accelerometer.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/extras/accelerometer/accelerometer.c b/extras/accelerometer/accelerometer.c
index e06bf190e5..59c2a4ece3 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 <hadess@hadess.net>
+ * Author:
+ * Bastien Nocera <hadess@hadess.net>
*
- * orientation_calc() from the sensorfw package:
+ * orientation_calc() from the sensorfw package
* Copyright (C) 2009-2010 Nokia Corporation
* Authors:
* Üstün Ergenoglu <ext-ustun.ergenoglu@nokia.com>