From 26b95c0953b8024d487897bf2aaaf1a8836f23a7 Mon Sep 17 00:00:00 2001 From: Nathanael Sensfelder Date: Wed, 2 Sep 2015 15:55:11 +0200 Subject: relabsd is no longer limited to 6DOF devices. --- src/config.h | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'src/config.h') diff --git a/src/config.h b/src/config.h index 558ea98..1ede1f3 100644 --- a/src/config.h +++ b/src/config.h @@ -7,6 +7,7 @@ struct relabsd_config_axis { + int enabled; int min; int max; int fuzz; @@ -22,7 +23,7 @@ struct relabsd_config { const char * input_file; const char * device_name; - struct relabsd_config_axis axis[6]; + struct relabsd_config_axis axis[RELABSD_VALID_AXES_COUNT]; }; /* @@ -47,14 +48,19 @@ int relabsd_config_parse * with our REV_ABS axis configuration, such as the axis' minimum or maximum * values. * - * Returns 1 if 'conf' allows the axis to have this value, - * 0 otherwise. + * Returns 1 if 'conf' allows the value to be emitted, + * 0 if 'conf' wants the event to be transmitted as is. + * -1 if 'conf' doesn't want the event to be transmitted. + * + * If the return value is 0, this function will not have altered the value at + * 'value'. Otherwise, this function can have altered it to match its + * requierements. */ -int relabsd_config_allows +int relabsd_config_filter ( const struct relabsd_config * const conf, enum relabsd_axis const axis, - int const value + int * const value ); /* -- cgit v1.2.3-70-g09d2