| summaryrefslogtreecommitdiff |
diff options
| author | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2015-09-02 15:55:11 +0200 |
|---|---|---|
| committer | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2015-09-02 15:55:11 +0200 |
| commit | 26b95c0953b8024d487897bf2aaaf1a8836f23a7 (patch) | |
| tree | b6370c9eb56ab664f3ab1680dcca586b922f1ea6 /src/config.h | |
| parent | 60b7a25bf38dce957c937ff602c1c812faff8b0f (diff) | |
relabsd is no longer limited to 6DOF devices.
Diffstat (limited to 'src/config.h')
| -rw-r--r-- | src/config.h | 16 |
1 files changed, 11 insertions, 5 deletions
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 ); /* |


