summaryrefslogtreecommitdiff
path: root/tools/iio
diff options
context:
space:
mode:
authorRamona Bolboaca <ramona.bolboaca@analog.com>2023-08-08 10:50:57 +0300
committerJonathan Cameron <jonathan.cameron@huawei.com>2023-09-12 10:42:03 +0100
commit744f4990ee0519ebef21fa7db094240bbaf3d746 (patch)
tree8cee09f623590a3dbe0ccd56a8926239e83e2682 /tools/iio
parent8c337436e6da6ac1dcc2d2f990489c9ebfe429f1 (diff)
iio: Add IIO_DELTA_ANGL channel type
The delta angle is defined as a piece-wise integration of angular velocity data. The delta angle represents the amount of angular displacement between two consecutive measurements and it is measured in radians. In order to track the total angular displacement during a desired period of time, simply sum-up the delta angle samples acquired during that time. IIO currently does not offer a suitable channel type for this type of measurements hence this patch adds it. Signed-off-by: Ramona Bolboaca <ramona.bolboaca@analog.com> Reviewed-by: Nuno Sa <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20230808075059.645525-2-ramona.bolboaca@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'tools/iio')
-rw-r--r--tools/iio/iio_event_monitor.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/iio/iio_event_monitor.c b/tools/iio/iio_event_monitor.c
index 0a5c2bb60030..3505450060e6 100644
--- a/tools/iio/iio_event_monitor.c
+++ b/tools/iio/iio_event_monitor.c
@@ -59,6 +59,7 @@ static const char * const iio_chan_type_name_spec[] = {
[IIO_POSITIONRELATIVE] = "positionrelative",
[IIO_PHASE] = "phase",
[IIO_MASSCONCENTRATION] = "massconcentration",
+ [IIO_DELTA_ANGL] = "deltaangl",
};
static const char * const iio_ev_type_text[] = {
@@ -173,6 +174,7 @@ static bool event_is_known(struct iio_event_data *event)
case IIO_POSITIONRELATIVE:
case IIO_PHASE:
case IIO_MASSCONCENTRATION:
+ case IIO_DELTA_ANGL:
break;
default:
return false;