diff options
author | Ramona Bolboaca <ramona.bolboaca@analog.com> | 2023-08-08 10:50:58 +0300 |
---|---|---|
committer | Jonathan Cameron <jonathan.cameron@huawei.com> | 2023-09-12 10:42:03 +0100 |
commit | 94a39f2c443b3fc5efe31a68502991020eefa3d2 (patch) | |
tree | ee15d117b44fe8b018af872b514386118d3df417 /tools/iio | |
parent | 744f4990ee0519ebef21fa7db094240bbaf3d746 (diff) |
iio: Add IIO_DELTA_VELOCITY channel type
The delta velocity is defined as a piece-wise integration of
acceleration data. The delta velocity represents the linear velocity
change between two consecutive measurements and it
is measured in m / s (meters per second).
In order to track the total linear velocity change during a desired
period of time, simply sum-up the delta velocity 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-3-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.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/iio/iio_event_monitor.c b/tools/iio/iio_event_monitor.c index 3505450060e6..7e6761612246 100644 --- a/tools/iio/iio_event_monitor.c +++ b/tools/iio/iio_event_monitor.c @@ -60,6 +60,7 @@ static const char * const iio_chan_type_name_spec[] = { [IIO_PHASE] = "phase", [IIO_MASSCONCENTRATION] = "massconcentration", [IIO_DELTA_ANGL] = "deltaangl", + [IIO_DELTA_VELOCITY] = "deltavelocity", }; static const char * const iio_ev_type_text[] = { @@ -175,6 +176,7 @@ static bool event_is_known(struct iio_event_data *event) case IIO_PHASE: case IIO_MASSCONCENTRATION: case IIO_DELTA_ANGL: + case IIO_DELTA_VELOCITY: break; default: return false; |